update 20241011
This commit is contained in:
@@ -262,7 +262,8 @@ db=null;
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
InputDialog dlg = new InputDialog();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
Client/DocMgmt/Dokumenterstellung.Designer.cs
generated
57
Client/DocMgmt/Dokumenterstellung.Designer.cs
generated
@@ -37,9 +37,9 @@
|
||||
this.GrpFnkt = new System.Windows.Forms.GroupBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.ribbonButtonVersandstrasse = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.button4 = new System.Windows.Forms.Button();
|
||||
this.ribbonButtonArchiv = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
@@ -95,9 +95,9 @@
|
||||
this.GrpFnkt.BackColor = System.Drawing.Color.SeaShell;
|
||||
this.GrpFnkt.Controls.Add(this.label6);
|
||||
this.GrpFnkt.Controls.Add(this.label5);
|
||||
this.GrpFnkt.Controls.Add(this.button5);
|
||||
this.GrpFnkt.Controls.Add(this.ribbonButtonVersandstrasse);
|
||||
this.GrpFnkt.Controls.Add(this.label4);
|
||||
this.GrpFnkt.Controls.Add(this.button4);
|
||||
this.GrpFnkt.Controls.Add(this.ribbonButtonArchiv);
|
||||
this.GrpFnkt.Controls.Add(this.label3);
|
||||
this.GrpFnkt.Controls.Add(this.label2);
|
||||
this.GrpFnkt.Controls.Add(this.button3);
|
||||
@@ -132,16 +132,16 @@
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "Archivieren";
|
||||
//
|
||||
// button5
|
||||
// ribbonButtonVersandstrasse
|
||||
//
|
||||
this.button5.Image = global::OnDoc.Properties.Resources.Versandstrasse_48x48_32;
|
||||
this.button5.Location = new System.Drawing.Point(338, 15);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(75, 81);
|
||||
this.button5.TabIndex = 9;
|
||||
this.button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||
this.ribbonButtonVersandstrasse.Image = global::OnDoc.Properties.Resources.Versandstrasse_48x48_32;
|
||||
this.ribbonButtonVersandstrasse.Location = new System.Drawing.Point(338, 15);
|
||||
this.ribbonButtonVersandstrasse.Name = "ribbonButtonVersandstrasse";
|
||||
this.ribbonButtonVersandstrasse.Size = new System.Drawing.Size(75, 81);
|
||||
this.ribbonButtonVersandstrasse.TabIndex = 9;
|
||||
this.ribbonButtonVersandstrasse.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.ribbonButtonVersandstrasse.UseVisualStyleBackColor = true;
|
||||
this.ribbonButtonVersandstrasse.Click += new System.EventHandler(this.button5_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
@@ -152,16 +152,16 @@
|
||||
this.label4.TabIndex = 8;
|
||||
this.label4.Text = "Archivieren";
|
||||
//
|
||||
// button4
|
||||
// ribbonButtonArchiv
|
||||
//
|
||||
this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
|
||||
this.button4.Location = new System.Drawing.Point(257, 16);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(75, 81);
|
||||
this.button4.TabIndex = 7;
|
||||
this.button4.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||
this.ribbonButtonArchiv.Image = ((System.Drawing.Image)(resources.GetObject("ribbonButtonArchiv.Image")));
|
||||
this.ribbonButtonArchiv.Location = new System.Drawing.Point(257, 16);
|
||||
this.ribbonButtonArchiv.Name = "ribbonButtonArchiv";
|
||||
this.ribbonButtonArchiv.Size = new System.Drawing.Size(75, 81);
|
||||
this.ribbonButtonArchiv.TabIndex = 7;
|
||||
this.ribbonButtonArchiv.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.ribbonButtonArchiv.UseVisualStyleBackColor = true;
|
||||
this.ribbonButtonArchiv.Click += new System.EventHandler(this.button4_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
@@ -234,6 +234,10 @@
|
||||
//
|
||||
// ucAllgemeineDokumentParam1
|
||||
//
|
||||
this.ucAllgemeineDokumentParam1.ausDokumentpaket = false;
|
||||
this.ucAllgemeineDokumentParam1.barcode = false;
|
||||
this.ucAllgemeineDokumentParam1.bpperson_error_type = 0;
|
||||
this.ucAllgemeineDokumentParam1.check_error = "";
|
||||
this.ucAllgemeineDokumentParam1.checkpartner = true;
|
||||
clsdocgendata1.bezeichnung = null;
|
||||
clsdocgendata1.digitaleunterschrift = false;
|
||||
@@ -258,12 +262,17 @@
|
||||
clsdocgendata1.zustelladresse = null;
|
||||
this.ucAllgemeineDokumentParam1.docgendata = clsdocgendata1;
|
||||
this.ucAllgemeineDokumentParam1.dokumenttypnr = 0;
|
||||
this.ucAllgemeineDokumentParam1.genertated_dokumentid = null;
|
||||
this.ucAllgemeineDokumentParam1.interop = false;
|
||||
this.ucAllgemeineDokumentParam1.Location = new System.Drawing.Point(5, 15);
|
||||
this.ucAllgemeineDokumentParam1.Name = "ucAllgemeineDokumentParam1";
|
||||
this.ucAllgemeineDokumentParam1.partnernr = 0;
|
||||
this.ucAllgemeineDokumentParam1.personendokument = false;
|
||||
this.ucAllgemeineDokumentParam1.profilnr = 0;
|
||||
this.ucAllgemeineDokumentParam1.runmacros = false;
|
||||
this.ucAllgemeineDokumentParam1.Size = new System.Drawing.Size(1047, 617);
|
||||
this.ucAllgemeineDokumentParam1.TabIndex = 0;
|
||||
this.ucAllgemeineDokumentParam1.uniqid = "f8c10a65-c251-4f8e-9ff7-4ae4d900a268";
|
||||
//
|
||||
// Dokumenterstellung
|
||||
//
|
||||
@@ -299,9 +308,9 @@
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.Button ribbonButtonVersandstrasse;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private System.Windows.Forms.Button ribbonButtonArchiv;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button button3;
|
||||
|
||||
@@ -18,6 +18,7 @@ using OnDoc.UIControls;
|
||||
using BroadcastListener.Classes;
|
||||
using BroadcastListener.Interfaces;
|
||||
using static BroadcastListener.Classes.Factory;
|
||||
using OnDoc.Helper;
|
||||
|
||||
namespace OnDoc.DocMgmt
|
||||
{
|
||||
@@ -89,6 +90,9 @@ namespace OnDoc.DocMgmt
|
||||
//{
|
||||
// btnDokumenterstellen.Enabled = false;
|
||||
//}
|
||||
Security security = new Security();
|
||||
security.set_security(this);
|
||||
security = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +112,7 @@ namespace OnDoc.DocMgmt
|
||||
DOCGEN.DocGen docgen = new DOCGEN.DocGen(AppParams.connectionstring);
|
||||
string dokumentid = docgen.GenDocID(dokdata);
|
||||
dokdata.Dokumentid = dokumentid;
|
||||
ucAllgemeineDokumentParam1.genertated_dokumentid = dokumentid;
|
||||
this.dokumentid=dokdata.Dokumentid;
|
||||
Logging.DocLog.Info("Dokumenterstellung", "frmDokumenterstellung", dokumentid, ucAllgemeineDokumentParam1.partnernr.ToString(), "Dokumenterstellung");
|
||||
if (dokumentid != "")
|
||||
@@ -162,9 +167,9 @@ namespace OnDoc.DocMgmt
|
||||
}
|
||||
if (ucAllgemeineDokumentParam1.docgendata.versandstrasse_moeglich == true)
|
||||
{
|
||||
button5.Enabled = true;
|
||||
ribbonButtonVersandstrasse.Enabled = true;
|
||||
}
|
||||
else { button5.Enabled = false; }
|
||||
else { ribbonButtonVersandstrasse.Enabled = false; }
|
||||
|
||||
PnlPreview.Visible = true;
|
||||
PnlPreview.Dock = DockStyle.Fill;
|
||||
@@ -173,15 +178,15 @@ namespace OnDoc.DocMgmt
|
||||
db1.Get_Tabledata("Select coldstatus from dokument where dokumentid='"+dokumentid+"'",false,true);
|
||||
if (Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]) == 1)
|
||||
{
|
||||
button4.Enabled = false;
|
||||
button5.Enabled = false;
|
||||
ribbonButtonArchiv.Enabled = false;
|
||||
ribbonButtonVersandstrasse.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
button4.Enabled = true;
|
||||
button5.Enabled = true;
|
||||
ribbonButtonArchiv.Enabled = true;
|
||||
ribbonButtonVersandstrasse.Enabled = true;
|
||||
}
|
||||
if (ucAllgemeineDokumentParam1.docgendata.versandstrasse_moeglich == false) { button5.Enabled = false; }
|
||||
if (ucAllgemeineDokumentParam1.docgendata.versandstrasse_moeglich == false) { ribbonButtonVersandstrasse.Enabled = false; }
|
||||
docPreview1.Show_Doc(dokumentid);
|
||||
docPreview1.Hide_Editbuttons();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="button4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ribbonButtonArchiv.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAADSdJREFUaEPV
|
||||
WXlQVecVj2s0JtNmmsykTdMl/6RtFpPaZNJpjUnUJjOJ4sbqklRMosgmJIpRaxFREzYFwQCKu+KGOwhP
|
||||
|
||||
@@ -23,10 +23,13 @@ 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
|
||||
public partial class Dokumentpaket : SfForm, IMessageListener1
|
||||
{
|
||||
private List<UCAllgemeineDokumentParam> doclist = new List<UCAllgemeineDokumentParam>();
|
||||
private DataTable dokumentpaket = new DataTable();
|
||||
@@ -40,17 +43,36 @@ namespace OnDoc.DocMgmt
|
||||
InitializeComponent();
|
||||
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
||||
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
||||
Broadcaster().AddListener(this);
|
||||
Closing += Form_Closing;
|
||||
}
|
||||
|
||||
|
||||
public Dokumentpaket(int profilnr)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
||||
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
||||
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();
|
||||
@@ -352,76 +374,99 @@ namespace OnDoc.DocMgmt
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void RibbonButtonGenerieren_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (check_all_doks()==false)
|
||||
if (check_all_doks() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string filter = "dokumentid in ('";
|
||||
if (!dokList1.grid_empty())
|
||||
{
|
||||
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;
|
||||
progressBarAdv1.Value = progressBarAdv1.Value + 1;
|
||||
Application.DoEvents();
|
||||
|
||||
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
|
||||
// uc.partnernr = Convert.ToInt32(txtbpnummer.Text);
|
||||
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;
|
||||
filter = filter + dokumentid + "','";
|
||||
dokumentid = dokdata.Dokumentid;
|
||||
if (dokumentid != "")
|
||||
if (idokumentid == "" || uc.genertated_dokumentid == idokumentid)
|
||||
{
|
||||
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);
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
||||
|
||||
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
|
||||
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 (dokumentid != "")
|
||||
{
|
||||
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;
|
||||
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);
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
||||
|
||||
System.Diagnostics.Process.Start("winword.exe", filename);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
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) + ")";
|
||||
@@ -433,6 +478,8 @@ namespace OnDoc.DocMgmt
|
||||
{
|
||||
if (!NeuesDokumentpaket()) { return; }
|
||||
Update_PaketDetails();
|
||||
dokList1.datafilter = "dokumentid in ('n.a.')";
|
||||
dokList1.refresh_dokumente();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,9 @@ namespace OnDoc.DocMgmt
|
||||
private void btntoapproval_Click(object sender, EventArgs e)
|
||||
{
|
||||
DB dB = new DB(AppParams.connectionstring);
|
||||
|
||||
dB.Get_Tabledata_for_Update("select top 1 * from dokument_bewilligung where id=-2", false, true);
|
||||
|
||||
if (pxapproval1.Visible == false)
|
||||
{
|
||||
DataRow dr = dB.daten.Tables[0].NewRow();
|
||||
@@ -110,9 +112,7 @@ namespace OnDoc.DocMgmt
|
||||
}
|
||||
if (txtnachricht.Text.Trim() != "")
|
||||
{
|
||||
|
||||
dB.insert_note(AppParams.CurrentMitarbieter, "Hinweis zur Unterschriftenprüfung", txtnachricht.Text, dokumentid);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user