You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
561 lines
23 KiB
561 lines
23 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Security.Policy;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using OnDoc.Klassen;
|
|
using OnDoc.UIControls;
|
|
using Model;
|
|
using Database;
|
|
using Syncfusion.Windows.Forms;
|
|
using Syncfusion.Windows.Forms.Tools;
|
|
using Syncfusion.WinForms.Controls;
|
|
using Syncfusion.WinForms.DataGrid;
|
|
using Syncfusion.WinForms.DataGrid.Interactivity;
|
|
using Syncfusion.WinForms.ListView.Enums;
|
|
using Syncfusion.WinForms.ListView.Events;
|
|
using Syncfusion.WinForms.ListView;
|
|
using OnDoc.UIControls.Administrator;
|
|
using System.Diagnostics;
|
|
using NLog.LayoutRenderers.Wrappers;
|
|
using BroadcastListener.Classes;
|
|
using BroadcastListener.Interfaces;
|
|
using static BroadcastListener.Classes.Factory;
|
|
|
|
namespace OnDoc.DocMgmt
|
|
{
|
|
public partial class Dokumentpaket : SfForm, IMessageListener1
|
|
{
|
|
private List<UCAllgemeineDokumentParam> doclist = new List<UCAllgemeineDokumentParam>();
|
|
private DataTable dokumentpaket = new DataTable();
|
|
private DataTable dokumentpaketvorlagen = new DataTable();
|
|
private DataTable dokumentpaketvorlagen_Original = new DataTable();
|
|
private int profilnr {get;set;}
|
|
public int dokumentpaketnr { get; set; } = 0;
|
|
public int partnernr { get; set; } = 0;
|
|
|
|
public Dokumentpaket()
|
|
{
|
|
InitializeComponent();
|
|
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
|
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
|
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
|
|
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
|
Broadcaster().AddListener(this);
|
|
Closing += Form_Closing;
|
|
}
|
|
|
|
public Dokumentpaket(int dokumentpaketnr, int partnernr)
|
|
{
|
|
InitializeComponent();
|
|
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
|
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
|
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
|
|
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
|
Broadcaster().AddListener(this);
|
|
Closing += Form_Closing;
|
|
this.dokumentpaketnr = dokumentpaketnr;
|
|
this.partnernr = partnernr;
|
|
}
|
|
|
|
public Dokumentpaket(int profilnr)
|
|
{
|
|
InitializeComponent();
|
|
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
|
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
|
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
|
|
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
|
this.profilnr = profilnr;
|
|
Broadcaster().AddListener(this);
|
|
Closing += Form_Closing;
|
|
}
|
|
private void Form_Closing(object sender, CancelEventArgs e)
|
|
{
|
|
Broadcaster().RemoveListener(this);
|
|
}
|
|
|
|
public void OnListen(string message, SenderInfo sender)
|
|
{
|
|
if (message == "DokumentPaket")
|
|
{
|
|
if (sender.Function == "NeuGenerierung")
|
|
{
|
|
string dokumentid = sender.Details;
|
|
dokList1.dokument_loeschen(dokumentid);
|
|
Generate_Docs(dokumentid);
|
|
}
|
|
}
|
|
}
|
|
private bool NeuesDokumentpaket()
|
|
{
|
|
DokTypSelect dt = new DokTypSelect();
|
|
dt.vorlagentype = 2;
|
|
dt.ShowDialog();
|
|
if (dt.DialogResult == DialogResult.OK) { dokumentpaketnr = Convert.ToInt32(dt.dokumenttypnr); return true; } else { return false; }
|
|
}
|
|
private void Dokumentpaket_Load(object sender, EventArgs e)
|
|
{
|
|
this.BeginUpdate();
|
|
if (dokumentpaketnr == 0)
|
|
{
|
|
if (!NeuesDokumentpaket()){ this.Close(); return; };
|
|
}
|
|
Update_PaketDetails();
|
|
dokList1.set_vorschau_aus_dp();
|
|
if (this.txtbpnummer.Text == "") { btnSearchBP_Click(sender, e); }
|
|
|
|
this.EndUpdate();
|
|
}
|
|
private void Update_PaketDetails() {
|
|
Cursor = Cursors.WaitCursor;
|
|
DB db = new DB(AppParams.connectionstring);
|
|
db.Get_Tabledata("Select * from edex_dokumentpaket where dokumentpaketnr="+dokumentpaketnr.ToString(), false, true);
|
|
dokumentpaket = db.dsdaten.Tables[0].Copy();
|
|
string sql = "SELECT dbo.edex_dokumentpaket.dokumentpaketnr, dbo.edex_dokumentpaket.bezeichnung, dbo.dokumenttyp.dokumenttypnr, ";
|
|
sql = sql + "dbo.dokumenttyp.bezeichnung AS dokumenttypbezeichnung, dbo.edex_dokumentpaketvorlage.zwingend, ";
|
|
sql = sql + "dbo.edex_dokumentpaketvorlage.sort FROM dbo.edex_dokumentpaket INNER JOIN dbo.edex_dokumentpaketvorlage ON ";
|
|
sql = sql + "dbo.edex_dokumentpaket.dokumentpaketnr = dbo.edex_dokumentpaketvorlage.dokumentpaketnr INNER JOIN dbo.dokumenttyp ON ";
|
|
sql = sql + "dbo.edex_dokumentpaketvorlage.dokumenttypnr = dbo.dokumenttyp.dokumenttypnr ";
|
|
sql = sql + " WHERE edex_dokumentpaket.dokumentpaketnr="+dokumentpaketnr.ToString()+" and (dbo.edex_dokumentpaket.aktiv = 1) AND ";
|
|
sql = sql + " dbo.edex_dokumentpaketvorlage.aktiv = 1 ORDER BY dbo.edex_dokumentpaketvorlage.sort";
|
|
db.Get_Tabledata(sql,false,true);
|
|
dokumentpaketvorlagen=db.dsdaten.Tables[0].Copy();
|
|
dokumentpaketvorlagen_Original = db.dsdaten.Tables[0].Copy();
|
|
sfListView1.DataSource = dokumentpaketvorlagen;
|
|
sfListView1.DisplayMember = "dokumenttypbezeichnung";
|
|
sfListView1.ValueMember = "dokumentpaketvorlagenr";
|
|
sfListView1.ShowCheckBoxes = true;
|
|
sfListView1.AllowTriStateMode = false;
|
|
sfListView1.CheckedMember = "zwingend";
|
|
TabControlDokuments.TabPages.Clear();
|
|
foreach(System.Data.DataRow r in dokumentpaketvorlagen.Rows)
|
|
{
|
|
if (Convert.ToInt32(r[4]) == 1) { add_uc(r); }
|
|
}
|
|
Config_Doklist();
|
|
Cursor = Cursors.Default;
|
|
try
|
|
{
|
|
this.Text = "Dokumentpaket " + dokumentpaket.Rows[0]["bezeichnung"].ToString();
|
|
}
|
|
catch { }
|
|
if (this.dokumentpaketnr == 0)
|
|
{
|
|
this.RibbonButtonGenerieren.Enabled = false;
|
|
this.groupBox1.Enabled = false;
|
|
this.groupBox2.Enabled=false;
|
|
this.groupBox3.Enabled=false;
|
|
}
|
|
this.EndUpdate();
|
|
}
|
|
private void Config_Doklist()
|
|
{
|
|
dokList1.profilnr = this.profilnr;
|
|
dokList1.hide_panels();
|
|
dokList1.dokpaket_update_grid();
|
|
|
|
|
|
}
|
|
|
|
private void tsbtnPartnerSearch_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void tsbtnPartnerSuche_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btnSearchBP_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.partnernr == 0) {
|
|
Partnersuche ps = new Partnersuche();
|
|
ps.ShowDialog();
|
|
if (ps.DialogResult == DialogResult.OK)
|
|
{
|
|
this.txtbpnummer.Text = ps.partnernr.ToString(); ;
|
|
this.lblKurznameBP.Text = ps.partnerkurzname.ToString();
|
|
if (this.txtbpnummer.Text.Length > 9)
|
|
{
|
|
MessageBox.Show("Beim gewählten Partner handelt es ich nicht um einBP.", "Partnerselektion", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
this.txtbpnummer.Text = "";
|
|
this.lblKurznameBP.Text = "";
|
|
return;
|
|
}
|
|
}
|
|
|
|
set_bp_person(ps.partnernr,0);
|
|
}
|
|
else
|
|
{
|
|
this.txtbpnummer.Text = partnernr.ToString();
|
|
set_bp_person(partnernr, 0);
|
|
|
|
}
|
|
}
|
|
|
|
private void btnSearchPerson_Click(object sender, EventArgs e)
|
|
{
|
|
Partnersuche ps = new Partnersuche();
|
|
ps.ShowDialog();
|
|
if (ps.DialogResult == DialogResult.OK)
|
|
{
|
|
this.txtpersonnummer.Text = ps.partnernr.ToString();
|
|
this.lblKurznamePerson.Text = ps.partnerkurzname.ToString();
|
|
if (this.txtpersonnummer.Text.Length < 9) {
|
|
MessageBox.Show("Beim gewählten Partner handelt es ich nicht um eine Person.", "Partnerselektion", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
this.txtpersonnummer.Text = "";
|
|
this.lblKurznamePerson.Text = "";
|
|
return;
|
|
}
|
|
set_bp_person(0,ps.partnernr);
|
|
}
|
|
}
|
|
private void add_uc(System.Data.DataRow r)
|
|
{
|
|
UCAllgemeineDokumentParam newdoc = new UCAllgemeineDokumentParam();
|
|
newdoc.profilnr = profilnr;
|
|
newdoc.Dock= DockStyle.Fill;
|
|
newdoc.checkpartner = false;
|
|
newdoc.dokumenttypnr = Convert.ToInt32(r[2]);
|
|
if (newdoc.set_personendokument() == true)
|
|
{
|
|
if (txtpersonnummer.Text != "") { newdoc.partnernr = Convert.ToInt32(txtpersonnummer.Text); }
|
|
}
|
|
else
|
|
{
|
|
if (txtbpnummer.Text != "") { newdoc.partnernr = Convert.ToInt32(txtbpnummer.Text); }
|
|
}
|
|
|
|
newdoc.Refresh_Details();
|
|
TabPageAdv tabPage = new TabPageAdv(r[3].ToString());
|
|
tabPage.Controls.Add(newdoc);
|
|
TabControlDokuments.TabPages.Add(tabPage);
|
|
}
|
|
private void remove_uc(System.Data.DataRow r)
|
|
{
|
|
foreach (TabPageAdv tab in TabControlDokuments.TabPages)
|
|
{
|
|
if (tab.Text == r[3].ToString()) { TabControlDokuments.TabPages.Remove(tab); return; }
|
|
|
|
}
|
|
}
|
|
|
|
private void Refresh_DocTab()
|
|
{
|
|
TabControlDokuments.TabPages.Clear();
|
|
foreach (UCAllgemeineDokumentParam uc in doclist)
|
|
{
|
|
TabPageAdv tabPage = new TabPageAdv("gummi");
|
|
tabPage.Controls.Add(uc);
|
|
TabControlDokuments.TabPages.Add(tabPage);
|
|
}
|
|
}
|
|
|
|
private void sfListView1_ItemChecked(object sender, Syncfusion.WinForms.ListView.Events.ItemCheckedEventArgs e)
|
|
{
|
|
var dataRow = (e.ItemData as DataRowView).Row;
|
|
int vorlagenr = Convert.ToInt32(dataRow[2]);
|
|
int zwingend = Convert.ToInt32(dataRow[4]);
|
|
foreach (System.Data.DataRow r in dokumentpaketvorlagen_Original.Rows)
|
|
{
|
|
if (Convert.ToInt32(r[2]) == vorlagenr)
|
|
{
|
|
if (Convert.ToInt32(r[4])==1 && Convert.ToInt32(r[4]) != zwingend)
|
|
{
|
|
MessageBox.Show("Zwingende Dokumentte können nicht abgewählt werden");
|
|
dataRow[4] = 1;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (Convert.ToInt32(dataRow[4]) == 1)
|
|
{
|
|
foreach (System.Data.DataRow r in dokumentpaketvorlagen_Original.Rows)
|
|
{
|
|
if (Convert.ToInt32(r[2]) == vorlagenr)
|
|
{
|
|
add_uc(r);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
foreach (System.Data.DataRow r in dokumentpaketvorlagen_Original.Rows)
|
|
{
|
|
if (Convert.ToInt32(r[2]) == vorlagenr)
|
|
{
|
|
remove_uc(r);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private void set_bp_person(int bpnummer, int personnummer)
|
|
{
|
|
Database.DB db = new Database.DB(AppParams.connectionstring);
|
|
db.clear_parameter();
|
|
if (bpnummer !=0) db.add_parameter("@partnernr", bpnummer.ToString());
|
|
if (personnummer !=0) db.add_parameter("@partnernr", personnummer.ToString());
|
|
db.Get_Tabledata("sp_ondoc_bp_person", true, false);
|
|
|
|
if (bpnummer!=0 && db.dsdaten.Tables[0].Rows.Count ==1)
|
|
{
|
|
txtbpnummer.Text = db.dsdaten.Tables[0].Rows[0]["bp_nr"].ToString();
|
|
lblKurznameBP.Text = db.dsdaten.Tables[0].Rows[0]["bp_kurzname"].ToString();
|
|
txtpersonnummer.Text = "";
|
|
if (txtpersonnummer.Text=="")
|
|
{
|
|
txtpersonnummer.Text = db.dsdaten.Tables[0].Rows[0]["pers_nr"].ToString();
|
|
lblKurznamePerson.Text = db.dsdaten.Tables[0].Rows[0]["person_kurzname"].ToString();
|
|
}
|
|
update_dokumente_bp_person(bpnummer, true);
|
|
if (txtpersonnummer.Text!="") { update_dokumente_bp_person(Convert.ToInt32(txtpersonnummer.Text), false); }
|
|
}
|
|
|
|
}
|
|
|
|
private void update_dokumente_bp_person(int partnernr, bool bp)
|
|
{
|
|
try
|
|
{
|
|
foreach (TabPageAdv tab in TabControlDokuments.TabPages)
|
|
{
|
|
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
|
|
uc.ausDokumentpaket = true;
|
|
if (bp && !uc.personendokument)
|
|
{
|
|
uc.partnernr = partnernr;
|
|
uc.update_partner();
|
|
}
|
|
if (!bp && uc.personendokument)
|
|
{
|
|
uc.partnernr = partnernr;
|
|
uc.update_partner();
|
|
}
|
|
uc.ausDokumentpaket = false;
|
|
}
|
|
}
|
|
catch { }
|
|
|
|
|
|
}
|
|
private void textBox1_Leave(object sender, EventArgs e)
|
|
{
|
|
//set_bp_person();
|
|
|
|
}
|
|
|
|
private void lblPaketDetails_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void sfDataGrid1_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void RibbonButtonExit_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private bool check_all_doks()
|
|
{
|
|
string errormessage = "";
|
|
string dokumenterror = "";
|
|
|
|
foreach (TabPageAdv tab in TabControlDokuments.TabPages)
|
|
{
|
|
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
|
|
uc.ausDokumentpaket = true;
|
|
dokumenterror = "";
|
|
|
|
if (uc.partnernr == 0) { dokumenterror = dokumenterror + "- Kein Partner gewählt" + Environment.NewLine; }
|
|
else
|
|
{
|
|
uc.check_bp_person();
|
|
if (uc.bpperson_error_type == 1) { dokumenterror = dokumenterror + "- Dokument muss für eine Person erstellt werden" + Environment.NewLine; }
|
|
if (uc.bpperson_error_type == 2) { dokumenterror = dokumenterror + "- Dokument muss für einen BP erstellt werden" + Environment.NewLine; }
|
|
}
|
|
if (!uc.check_fields())
|
|
{
|
|
dokumenterror = dokumenterror + uc.check_error + Environment.NewLine;
|
|
|
|
}
|
|
uc.ausDokumentpaket = false;
|
|
if (dokumenterror!="") { errormessage = errormessage + Environment.NewLine+ tab.Text +":"+ Environment.NewLine + dokumenterror; }
|
|
|
|
}
|
|
|
|
|
|
if (errormessage != "")
|
|
{
|
|
MessageBox.Show(errormessage, "Folgende Fehler korrigieren:", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
private void RibbonButtonGenerieren_Click(object sender, EventArgs e)
|
|
{
|
|
if (check_all_doks() == false)
|
|
{
|
|
return;
|
|
|
|
}
|
|
if (!dokList1.grid_empty() && dokList1.get_selected_records() != 0)
|
|
{
|
|
if (MessageBox.Show("Die bereits generierten Dokumente löschen?", "Generierung", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
{
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
dokList1.delete_doks_in_list();
|
|
}
|
|
}
|
|
|
|
progressBarAdv1.Minimum = 0;
|
|
progressBarAdv1.Maximum = TabControlDokuments.TabPages.Count;
|
|
progressBarAdv1.Value = 0;
|
|
progressBarAdv1.Visible = true;
|
|
Generate_Docs();
|
|
}
|
|
private void Generate_Docs(string idokumentid="") {
|
|
string filter = "dokumentid in ('";
|
|
foreach (TabPageAdv tab in TabControlDokuments.TabPages)
|
|
{
|
|
progressBarAdv1.Value = progressBarAdv1.Value + 1;
|
|
Application.DoEvents();
|
|
|
|
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
|
|
if (idokumentid == "" || uc.genertated_dokumentid == idokumentid)
|
|
{
|
|
|
|
//uc.Set_Edit_later();
|
|
uc.Update_DocGenData();
|
|
clsDocData dokdata = new clsDocData();
|
|
uc.update_dokdata(ref dokdata);
|
|
uc.update_partner();
|
|
DOCGEN.DocGen docgen = new DOCGEN.DocGen(AppParams.connectionstring);
|
|
string dokumentid = docgen.GenDocID(dokdata);
|
|
dokdata.Dokumentid = dokumentid;
|
|
uc.genertated_dokumentid = dokumentid;
|
|
uc.Show_Neugenerieren();
|
|
filter = filter + dokumentid + "','";
|
|
dokumentid = dokdata.Dokumentid;
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentPreview) { uc.docgendata.erstellungsart = Erstellungsart.DokumentSpäterBearbeiten; }
|
|
if (dokumentid != "")
|
|
{
|
|
Logging.DocLog.Info("Dokument erstellt", "Dokumentpaket", dokumentid, uc.partnernr.ToString(), "Dokument erstellt");
|
|
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir, AppParams.RESTURI,AppParams.apikey,AppParams.Office_Fill_DocIO);
|
|
clsdok dok = new clsdok("", "", "");
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
|
|
{
|
|
panelword.Visible = true;
|
|
lbldokumentname.Text = tab.Text;
|
|
Application.DoEvents();
|
|
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata,true,AppParams.OfficeSpleep1,AppParams.vbvorlagenmanagement=="Yes");
|
|
panelword.Visible = false;
|
|
Application.DoEvents();
|
|
|
|
}
|
|
else
|
|
{
|
|
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
|
|
|
}
|
|
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
|
|
{
|
|
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
|
string filename_temp = filename + ".tmp";
|
|
System.IO.File.WriteAllBytes(filename_temp, Convert.FromBase64String(dok.dokument));
|
|
DB db = new DB(AppParams.connectionstring);
|
|
db.Save_To_DB(dokdata.Dokumentid, filename_temp);
|
|
db.Dok_in_Bearbeitung(1,dokdata.Dokumentid, AppParams.CurrentMitarbieter);
|
|
db = null;
|
|
System.IO.File.Delete(filename_temp);
|
|
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
|
|
|
|
}
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
|
|
{
|
|
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
|
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
|
|
DB db = new DB(AppParams.connectionstring);
|
|
db.Save_To_DB(dokdata.Dokumentid, filename);
|
|
db = null;
|
|
|
|
System.Diagnostics.Process.Start("winword.exe", filename);
|
|
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
|
|
|
|
}
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF)
|
|
{
|
|
//Generator.DocToPDF(dokumentid, ref dok);
|
|
dok.extension = "pdf";
|
|
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
|
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
|
|
DB db = new DB(AppParams.connectionstring);
|
|
db.Save_To_DB(dokdata.Dokumentid, filename);
|
|
}
|
|
|
|
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentSpäterBearbeiten)
|
|
{
|
|
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
|
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
|
|
DB db = new DB(AppParams.connectionstring);
|
|
db.Save_To_DB(dokdata.Dokumentid, filename);
|
|
db = null;
|
|
}
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
filter = filter + uc.genertated_dokumentid + "','";
|
|
|
|
}
|
|
}
|
|
progressBarAdv1.Visible = false;
|
|
filter = filter.Substring(0, filter.Length - 2) + ")";
|
|
dokList1.datafilter = filter;
|
|
dokList1.refresh_dokumente("view_dokumentpaket");
|
|
dokList1.refresh_dokumente();
|
|
}
|
|
|
|
public void ribbonButtonNew_Click(object sender, EventArgs e)
|
|
{
|
|
if (!NeuesDokumentpaket()) { return; }
|
|
Update_PaketDetails();
|
|
dokList1.datafilter = "dokumentid in ('n.a.')";
|
|
dokList1.refresh_dokumente();
|
|
}
|
|
|
|
|
|
|
|
private void sfListView1_SelectionChanged(object sender, ItemSelectionChangedEventArgs e)
|
|
{
|
|
var dr = e.AddedItems[0] as DataRowView;
|
|
foreach (TabPageAdv p in TabControlDokuments.TabPages)
|
|
{
|
|
if (p.Text == dr[3].ToString())
|
|
{
|
|
TabControlDokuments.SelectedTab=p; return;
|
|
}
|
|
}
|
|
return;
|
|
|
|
}
|
|
}
|
|
}
|