update 20250406

This commit is contained in:
Stefan Hutter
2025-04-06 07:39:53 +02:00
parent 632b97c292
commit 42c86d957c
155 changed files with 1725 additions and 607 deletions

View File

@@ -30,29 +30,56 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DokTypDetails));
this.dokTypDetail1 = new OnDoc.UIControls.DokTypDetail();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// dokTypDetail1
//
this.dokTypDetail1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dokTypDetail1.dokumentpaket = false;
this.dokTypDetail1.dokumenttypnr = 0;
this.dokTypDetail1.Location = new System.Drawing.Point(2, 2);
this.dokTypDetail1.einzeldokument = 0;
this.dokTypDetail1.Location = new System.Drawing.Point(2, 47);
this.dokTypDetail1.Name = "dokTypDetail1";
this.dokTypDetail1.Size = new System.Drawing.Size(1144, 777);
this.dokTypDetail1.Size = new System.Drawing.Size(1144, 732);
this.dokTypDetail1.TabIndex = 0;
//
// button1
//
this.button1.Location = new System.Drawing.Point(6, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(122, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Office-Datei öffnen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(2, 2);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1144, 45);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
//
// DokTypDetails
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1148, 781);
this.Controls.Add(this.dokTypDetail1);
this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "DokTypDetails";
this.Style.MdiChild.IconHorizontalAlignment = System.Windows.Forms.HorizontalAlignment.Center;
this.Style.MdiChild.IconVerticalAlignment = System.Windows.Forms.VisualStyles.VerticalAlignment.Center;
this.Text = "Vorlagen_Details";
this.Load += new System.EventHandler(this.DokTypDetails_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -60,5 +87,7 @@
#endregion
private UIControls.DokTypDetail dokTypDetail1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox1;
}
}

View File

@@ -66,10 +66,20 @@ namespace OnDoc.DocMgmt
private void DokTypDetails_Load(object sender, EventArgs e)
{
this.groupBox1.Visible = true;
if (this.dokumentpaket == true)
{
groupBox1.Visible = false;
}
dokTypDetail1.dokumenttypnr=dokumenttypnr;
dokTypDetail1.einzeldokument = einzeldokument;
dokTypDetail1.dokumentpaket = dokumentpaket;
dokTypDetail1.Refresh_Details();
}
private void button1_Click(object sender, EventArgs e)
{
dokTypDetail1.opensource();
}
}
}

View File

@@ -324,33 +324,34 @@ namespace OnDoc.DocMgmt
//
// contextMenuStripVorlagen
//
this.contextMenuStripVorlagen.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStripVorlagen.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ctxmenuerstellen,
this.zuFavoritenHinzufügenToolStripMenuItem,
this.detailsAnzeigenToolStripMenuItem});
this.contextMenuStripVorlagen.Name = "contextMenuStrip1";
this.contextMenuStripVorlagen.Size = new System.Drawing.Size(204, 70);
this.contextMenuStripVorlagen.Size = new System.Drawing.Size(208, 82);
this.contextMenuStripVorlagen.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// ctxmenuerstellen
//
this.ctxmenuerstellen.Image = global::OnDoc.Properties.Resources.NewDoc_16x16_32;
this.ctxmenuerstellen.Name = "ctxmenuerstellen";
this.ctxmenuerstellen.Size = new System.Drawing.Size(203, 22);
this.ctxmenuerstellen.Size = new System.Drawing.Size(207, 26);
this.ctxmenuerstellen.Text = "Erstellen";
this.ctxmenuerstellen.Click += new System.EventHandler(this.ctxmenuerstellen_Click);
//
// zuFavoritenHinzufügenToolStripMenuItem
//
this.zuFavoritenHinzufügenToolStripMenuItem.Name = "zuFavoritenHinzufügenToolStripMenuItem";
this.zuFavoritenHinzufügenToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.zuFavoritenHinzufügenToolStripMenuItem.Size = new System.Drawing.Size(207, 26);
this.zuFavoritenHinzufügenToolStripMenuItem.Text = "Zu Favoriten hinzufügen";
this.zuFavoritenHinzufügenToolStripMenuItem.Click += new System.EventHandler(this.zuFavoritenHinzufügenToolStripMenuItem_Click);
//
// detailsAnzeigenToolStripMenuItem
//
this.detailsAnzeigenToolStripMenuItem.Name = "detailsAnzeigenToolStripMenuItem";
this.detailsAnzeigenToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.detailsAnzeigenToolStripMenuItem.Size = new System.Drawing.Size(207, 26);
this.detailsAnzeigenToolStripMenuItem.Text = "Details anzeigen";
this.detailsAnzeigenToolStripMenuItem.Click += new System.EventHandler(this.detailsAnzeigenToolStripMenuItem_Click);
//
@@ -421,6 +422,7 @@ namespace OnDoc.DocMgmt
//
// contextMenuStripFavoriten
//
this.contextMenuStripFavoriten.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStripFavoriten.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.neuerOrdnerAufObesterEbeneToolStripMenuItem,
this.neuerUnterordnerToolStripMenuItem,
@@ -512,6 +514,7 @@ namespace OnDoc.DocMgmt
// toolStrip1
//
this.toolStrip1.AutoSize = false;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbtnNewRoot,
this.tsbtnNewFolder,
@@ -619,6 +622,7 @@ namespace OnDoc.DocMgmt
this.toolStrip2.AutoSize = false;
this.toolStrip2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip2.ImageScalingSize = new System.Drawing.Size(20, 20);
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripLabel1,
this.toolstriptextboxsearch,
@@ -653,7 +657,7 @@ namespace OnDoc.DocMgmt
this.toolStripButton1.Image = global::OnDoc.Properties.Resources.Search_24x24_32;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 45);
this.toolStripButton1.Size = new System.Drawing.Size(24, 45);
this.toolStripButton1.Text = "Suchen";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
@@ -663,7 +667,7 @@ namespace OnDoc.DocMgmt
this.toolStripButton2.Image = global::OnDoc.Properties.Resources.CloseApplication_24x24_32;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(23, 45);
this.toolStripButton2.Size = new System.Drawing.Size(24, 45);
this.toolStripButton2.Text = "Suchfeld initialisieren";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
@@ -691,7 +695,7 @@ namespace OnDoc.DocMgmt
this.toolStripButton4.Image = global::OnDoc.Properties.Resources.CloseApplication_24x24_32;
this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton4.Name = "toolStripButton4";
this.toolStripButton4.Size = new System.Drawing.Size(23, 45);
this.toolStripButton4.Size = new System.Drawing.Size(24, 45);
this.toolStripButton4.Text = "Fachverantwortung initialisieren";
this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
//

View File

@@ -283,7 +283,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACo
DQAAAk1TRnQBSQFMAgEBBwEAAVgBAQFYAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DQAAAk1TRnQBSQFMAgEBBwEAAWgBAQFoAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -24,6 +24,8 @@ using System.Globalization;
using System.Threading;
using Syncfusion.Windows.Forms;
using Syncfusion.Grouping;
using System.Xml.Linq;
using System.Reflection.Emit;
namespace OnDoc.DocMgmt
{
@@ -195,13 +197,25 @@ namespace OnDoc.DocMgmt
dB = null;
}
Logging.DocLog.Info("Dokumenterstellung", "frmDokumenterstellung", dokumentid, ucAllgemeineDokumentParam1.partnernr.ToString(), "Dokumenterstellung");
if (dokumentid != "")
{
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("", "", "", "");
Logging.Logging.Debug("Generate_Doc_EDOKA", "Dokumenterstellung", dokumentid);
//Generator.generate_docdata(dokumentid, ref dokdata);
//FrmDokumentwerte dw = new FrmDokumentwerte();
//dw.docData = dokdata;
//dw.ShowDialog();
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata, ucAllgemeineDokumentParam1.ErstellungInOffice,AppParams.OfficeSpleep1, AppParams.vbvorlagenmanagement=="Yes",this.editdoc);
Logging.Logging.Debug("Generate_Doc_EDOKA - Ende", "Dokumenterstellung", dokumentid);
if (dok.extension == "QDF") {

View File

@@ -44,6 +44,7 @@
this.ribbonButtonNew = new System.Windows.Forms.RibbonButton();
this.ribbonPanel3 = new System.Windows.Forms.RibbonPanel();
this.RibbonButtonGenerieren = new System.Windows.Forms.RibbonButton();
this.RibbonButtonEInzelgenerierung = new System.Windows.Forms.RibbonButton();
this.RibbonButtonGenerate = new System.Windows.Forms.RibbonButton();
this.sfListView1 = new Syncfusion.WinForms.ListView.SfListView();
this.TabControlDokuments = new Syncfusion.Windows.Forms.Tools.TabControlAdv();
@@ -152,7 +153,7 @@
this.ribbon1.OrbStyle = System.Windows.Forms.RibbonOrbStyle.Office_2013;
this.ribbon1.OrbVisible = false;
this.ribbon1.RibbonTabFont = new System.Drawing.Font("Trebuchet MS", 9F);
this.ribbon1.Size = new System.Drawing.Size(2120, 121);
this.ribbon1.Size = new System.Drawing.Size(1536, 121);
this.ribbon1.TabIndex = 17;
this.ribbon1.Tabs.Add(this.ribbonTab1);
this.ribbon1.TabSpacing = 4;
@@ -202,6 +203,7 @@
//
this.ribbonPanel3.ButtonMoreVisible = false;
this.ribbonPanel3.Items.Add(this.RibbonButtonGenerieren);
this.ribbonPanel3.Items.Add(this.RibbonButtonEInzelgenerierung);
this.ribbonPanel3.Name = "ribbonPanel3";
this.ribbonPanel3.Text = "";
//
@@ -210,10 +212,21 @@
this.RibbonButtonGenerieren.Image = global::OnDoc.Properties.Resources.DokumenteGenerieren_32x32_321;
this.RibbonButtonGenerieren.LargeImage = global::OnDoc.Properties.Resources.DokumenteGenerieren_32x32_321;
this.RibbonButtonGenerieren.Name = "RibbonButtonGenerieren";
this.RibbonButtonGenerieren.SmallImage = ((System.Drawing.Image)(resources.GetObject("RibbonButtonGenerieren.SmallImage")));
this.RibbonButtonGenerieren.SmallImage = global::OnDoc.Properties.Resources.DokumenteGenerieren_24x24_321;
this.RibbonButtonGenerieren.Text = "Dokumente generieren";
this.RibbonButtonGenerieren.ToolTip = "Alle Dokumente sofort generieren";
this.RibbonButtonGenerieren.Click += new System.EventHandler(this.RibbonButtonGenerieren_Click);
//
// RibbonButtonEInzelgenerierung
//
this.RibbonButtonEInzelgenerierung.Image = global::OnDoc.Properties.Resources.DokumenteGenerieren_32x32_321;
this.RibbonButtonEInzelgenerierung.LargeImage = global::OnDoc.Properties.Resources.DokumenteGenerieren_32x32_321;
this.RibbonButtonEInzelgenerierung.Name = "RibbonButtonEInzelgenerierung";
this.RibbonButtonEInzelgenerierung.SmallImage = global::OnDoc.Properties.Resources.DokumenteGenerieren_24x24_321;
this.RibbonButtonEInzelgenerierung.Text = "Einzeln generieren";
this.RibbonButtonEInzelgenerierung.ToolTip = "Dokumente nacheinander, einzeln generieren";
this.RibbonButtonEInzelgenerierung.Click += new System.EventHandler(this.RibbonButtonEInzelgenerierung_Click);
//
// RibbonButtonGenerate
//
this.RibbonButtonGenerate.Image = global::OnDoc.Properties.Resources.DokumenteGenerieren_32x32_321;
@@ -229,7 +242,7 @@
this.sfListView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.sfListView1.Location = new System.Drawing.Point(0, 149);
this.sfListView1.Name = "sfListView1";
this.sfListView1.Size = new System.Drawing.Size(249, 530);
this.sfListView1.Size = new System.Drawing.Size(249, 524);
this.sfListView1.TabIndex = 18;
this.sfListView1.Text = "sfListView1";
this.sfListView1.SelectionChanged += new System.EventHandler<Syncfusion.WinForms.ListView.Events.ItemSelectionChangedEventArgs>(this.sfListView1_SelectionChanged);
@@ -243,7 +256,7 @@
this.TabControlDokuments.Dock = System.Windows.Forms.DockStyle.Fill;
this.TabControlDokuments.Location = new System.Drawing.Point(3, 16);
this.TabControlDokuments.Name = "TabControlDokuments";
this.TabControlDokuments.Size = new System.Drawing.Size(1069, 660);
this.TabControlDokuments.Size = new System.Drawing.Size(1069, 654);
this.TabControlDokuments.TabIndex = 19;
this.TabControlDokuments.ThemeStyle.PrimitiveButtonStyle.DisabledNextPageImage = null;
//
@@ -254,7 +267,7 @@
this.tabPageAdv1.Location = new System.Drawing.Point(5, 25);
this.tabPageAdv1.Name = "tabPageAdv1";
this.tabPageAdv1.ShowCloseButton = true;
this.tabPageAdv1.Size = new System.Drawing.Size(1059, 630);
this.tabPageAdv1.Size = new System.Drawing.Size(1059, 624);
this.tabPageAdv1.Text = "tabPageAdv1";
this.tabPageAdv1.ThemesEnabled = false;
//
@@ -293,9 +306,9 @@
//
this.pnlfooter.Controls.Add(this.progressBarAdv1);
this.pnlfooter.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlfooter.Location = new System.Drawing.Point(2, 802);
this.pnlfooter.Location = new System.Drawing.Point(2, 796);
this.pnlfooter.Name = "pnlfooter";
this.pnlfooter.Size = new System.Drawing.Size(2120, 47);
this.pnlfooter.Size = new System.Drawing.Size(1536, 47);
this.pnlfooter.TabIndex = 20;
//
// progressBarAdv1
@@ -313,7 +326,7 @@
System.Drawing.Color.Empty};
this.progressBarAdv1.Name = "progressBarAdv1";
this.progressBarAdv1.SegmentWidth = 12;
this.progressBarAdv1.Size = new System.Drawing.Size(2120, 23);
this.progressBarAdv1.Size = new System.Drawing.Size(1536, 23);
this.progressBarAdv1.TabIndex = 0;
this.progressBarAdv1.Text = "progressBarGeneraate";
this.progressBarAdv1.Visible = false;
@@ -326,7 +339,7 @@
this.pnlleft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlleft.Location = new System.Drawing.Point(2, 123);
this.pnlleft.Name = "pnlleft";
this.pnlleft.Size = new System.Drawing.Size(249, 679);
this.pnlleft.Size = new System.Drawing.Size(249, 673);
this.pnlleft.TabIndex = 21;
//
// groupBox1
@@ -373,7 +386,7 @@
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Left;
this.groupBox2.Location = new System.Drawing.Point(251, 123);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1075, 679);
this.groupBox2.Size = new System.Drawing.Size(1075, 673);
this.groupBox2.TabIndex = 22;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Dokumente zur Erstellung";
@@ -384,7 +397,7 @@
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(1326, 123);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(796, 679);
this.groupBox3.Size = new System.Drawing.Size(212, 673);
this.groupBox3.TabIndex = 23;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Generierte Dokumente";
@@ -400,20 +413,22 @@
this.dokList1.mitarbeiternr = 0;
this.dokList1.Name = "dokList1";
this.dokList1.partnernr = 0;
this.dokList1.personbezeichnung = "";
this.dokList1.personnr = 0;
this.dokList1.profilnr = 0;
this.dokList1.runmacros = false;
this.dokList1.Search_Docid = "";
this.dokList1.selected_cellvalue = null;
this.dokList1.selected_dokumentid = null;
this.dokList1.selected_partnernr = null;
this.dokList1.Size = new System.Drawing.Size(790, 660);
this.dokList1.Size = new System.Drawing.Size(206, 654);
this.dokList1.TabIndex = 0;
//
// Dokumentpaket
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2124, 851);
this.ClientSize = new System.Drawing.Size(1540, 845);
this.Controls.Add(this.panelword);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
@@ -478,5 +493,6 @@
private System.Windows.Forms.Panel panelword;
private System.Windows.Forms.Label lbldokumentname;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RibbonButton RibbonButtonEInzelgenerierung;
}
}

View File

@@ -41,7 +41,7 @@ namespace OnDoc.DocMgmt
private int profilnr {get;set;}
public int dokumentpaketnr { get; set; } = 0;
public int partnernr { get; set; } = 0;
private bool EinzelGenerierung { get; set; } = false;
public Dokumentpaket()
{
InitializeComponent();
@@ -471,155 +471,178 @@ namespace OnDoc.DocMgmt
progressBarAdv1.Visible = true;
Generate_Docs();
}
private void Generate_Docs(string idokumentid="",UCAllgemeineDokumentParam iuc = null) {
private void Generate_Docs(string idokumentid = "", UCAllgemeineDokumentParam iuc = null)
{
int counter = 0;
string filter = "dokumentid in ('";
foreach (TabPageAdv tab in TabControlDokuments.TabPages)
{
progressBarAdv1.Value = progressBarAdv1.Value + 1;
Application.DoEvents();
//Thread.Sleep(1000);
try {
progressBarAdv1.Value = progressBarAdv1.Value + 1;
Application.DoEvents();
//Thread.Sleep(1000);
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
if (((idokumentid == "" || uc.genertated_dokumentid == idokumentid) && iuc==null) || uc==iuc)
{
//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, false, "");
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 != "")
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
if (((idokumentid == "" || uc.genertated_dokumentid == idokumentid) && iuc == null) || uc == iuc)
{
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 (dokdata.barcode_type == "1")
//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, false, "");
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 != "")
{
DB dB = new DB(AppParams.connectionstring);
dB.clear_parameter();
dB.add_parameter("@dokumentid", dokumentid);
dB.add_parameter("@DokumentidBR", "");
dB.add_parameter("@BARCODEFONTNAME", "");
dB.add_parameter("@BARCODEFONTSIZE", "");
dB.add_parameter("@BarcodeKantenlaenge", "");
dB.Get_Tabledata("sp_get_OnDoc_barcodetype_and_value", true, false);
dokdata.barcode_content = dB.dsdaten.Tables[0].Rows[0][1].ToString();
dokdata.barcode_formatn = dB.dsdaten.Tables[0].Rows[0][3].ToString();
dokdata.barcode_text = dB.dsdaten.Tables[0].Rows[0][4].ToString();
dokdata.barcode_kantenlaenge = dB.dsdaten.Tables[0].Rows[0][5].ToString();
dokdata.Zusatz_Font = dB.dsdaten.Tables[0].Rows[0][6].ToString();
dokdata.Zusatz_FontSize = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][7]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][8]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][9]);
//dokdata.barcode_type= dB.dsdaten.Tables[0].Rows[0][3].ToString();
string sql = "";
sql = "select bcpt, bcpl, bcw, bch, bchorizontal from OnDocBarcodeMpping ";
sql = sql + "where orig_bcpt = " + dokdata.barcode_top.ToString() + " and orig_bcpl=" + dokdata.barcode_left.ToString() + " ";
sql = sql + "and orig_bcw=" + dokdata.barcode_width.ToString() + " and orig_bch=" + dokdata.barcode_height.ToString();
dB.Get_Tabledata(sql, false, true);
if (dB.dsdaten.Tables[0].Rows.Count > 0)
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 (dokdata.barcode_type == "1")
{
Logging.Logging.Debug("Barcode-Übersteuerung" + dokdata.DokumenttypNr.ToString(), "Dokumenterstellung", "");
dokdata.barcode_left = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpl"]);
dokdata.barcode_top = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpt"]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcw"]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bch"]);
DB dB = new DB(AppParams.connectionstring);
dB.clear_parameter();
dB.add_parameter("@dokumentid", dokumentid);
dB.add_parameter("@DokumentidBR", "");
dB.add_parameter("@BARCODEFONTNAME", "");
dB.add_parameter("@BARCODEFONTSIZE", "");
dB.add_parameter("@BarcodeKantenlaenge", "");
dB.Get_Tabledata("sp_get_OnDoc_barcodetype_and_value", true, false);
dokdata.barcode_content = dB.dsdaten.Tables[0].Rows[0][1].ToString();
dokdata.barcode_formatn = dB.dsdaten.Tables[0].Rows[0][3].ToString();
dokdata.barcode_text = dB.dsdaten.Tables[0].Rows[0][4].ToString();
dokdata.barcode_kantenlaenge = dB.dsdaten.Tables[0].Rows[0][5].ToString();
dokdata.Zusatz_Font = dB.dsdaten.Tables[0].Rows[0][6].ToString();
dokdata.Zusatz_FontSize = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][7]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][8]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][9]);
//dokdata.barcode_type= dB.dsdaten.Tables[0].Rows[0][3].ToString();
string sql = "";
sql = "select bcpt, bcpl, bcw, bch, bchorizontal from OnDocBarcodeMpping ";
sql = sql + "where orig_bcpt = " + dokdata.barcode_top.ToString() + " and orig_bcpl=" + dokdata.barcode_left.ToString() + " ";
sql = sql + "and orig_bcw=" + dokdata.barcode_width.ToString() + " and orig_bch=" + dokdata.barcode_height.ToString();
dB.Get_Tabledata(sql, false, true);
if (dB.dsdaten.Tables[0].Rows.Count > 0)
{
Logging.Logging.Debug("Barcode-Übersteuerung" + dokdata.DokumenttypNr.ToString(), "Dokumenterstellung", "");
dokdata.barcode_left = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpl"]);
dokdata.barcode_top = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpt"]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcw"]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bch"]);
}
dB = null;
}
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);
}
dB = null;
}
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;
filename = AppParams.tempdir + dok.dokumentname;
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.CurrentMitarbeiter);
db = null;
System.IO.File.Delete(filename_temp);
Logging.Logging.Debug("Before Processwatch","DonDoc",dokumentid);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
}
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
//filename = AppParams.tempdir + dok.dokumentname;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
db.Save_To_DB(dokdata.Dokumentid, filename);
db = null;
switch (dok.doktype)
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
case "W":
System.Diagnostics.Process.Start("winword.exe", filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
break;
case "X":
System.Diagnostics.Process.Start("excel.exe", " " + filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Excel");
break;
case "P":
System.Diagnostics.Process.Start(filename);
break;
default:
break;
}
}
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);
}
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
filename = AppParams.tempdir + dok.dokumentname;
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.CurrentMitarbeiter);
db = null;
System.IO.File.Delete(filename_temp);
Logging.Logging.Debug("Before Processwatch", "DonDoc", dokumentid);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
}
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
//filename = AppParams.tempdir + dok.dokumentname;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
db.Save_To_DB(dokdata.Dokumentid, filename);
db = null;
switch (dok.doktype)
{
case "W":
System.Diagnostics.Process.Start("winword.exe", filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
break;
case "X":
System.Diagnostics.Process.Start("excel.exe", " " + filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Excel");
break;
case "P":
System.Diagnostics.Process.Start(filename);
break;
default:
break;
}
}
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.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 + "','";
}
counter = counter + 1;
if (this.EinzelGenerierung)
{
if (counter < TabControlDokuments.TabPages.Count)
{
if (MessageBox.Show("Nächstes Dokument generieren oder Generierung abbrechen?", "Dokumentgenerierung", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
{
progressBarAdv1.Visible = false;
filter = filter.Substring(0, filter.Length - 2) + ")";
dokList1.datafilter = filter;
dokList1.refresh_dokumente("view_dokumentpaket");
dokList1.refresh_dokumente();
return;
}
}
}
}
else
{
filter = filter + uc.genertated_dokumentid + "','";
}
catch { }
}
progressBarAdv1.Visible = false;
filter = filter.Substring(0, filter.Length - 2) + ")";
dokList1.datafilter = filter;
@@ -661,5 +684,12 @@ namespace OnDoc.DocMgmt
{
//int a = 1;
}
private void RibbonButtonEInzelgenerierung_Click(object sender, EventArgs e)
{
this.EinzelGenerierung = true;
RibbonButtonGenerieren_Click(sender, e);
this.EinzelGenerierung = false;
}
}
}

View File

@@ -161,12 +161,6 @@
B7FBYqiqcBiQ0HreI2vSk1kgZ4eUbLUEYRAbJAaSQ1aL1YCIqn2u8S1n5/rnrvIAORuEQWyQGEgOWS1W
A0AgrHyXX3LHlUkgP4MwiA0SQ1cH1gtKjqBkiS5JCMCTMigzJbVfIjkzgfSAMxOlAACf2BGuKP2MmgAA
AABJRU5ErkJggg==
</value>
</data>
<data name="RibbonButtonGenerieren.SmallImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABJJREFUOE9jYBgFo2AUjAIIAAAEEAABTLtGVQAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnSearchBP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -0,0 +1,62 @@
namespace OnDoc.DocMgmt
{
partial class FrmDokumentwerte
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.sfDataGrid1 = new Syncfusion.WinForms.DataGrid.SfDataGrid();
((System.ComponentModel.ISupportInitialize)(this.sfDataGrid1)).BeginInit();
this.SuspendLayout();
//
// sfDataGrid1
//
this.sfDataGrid1.AccessibleName = "Table";
this.sfDataGrid1.Location = new System.Drawing.Point(22, 13);
this.sfDataGrid1.Name = "sfDataGrid1";
this.sfDataGrid1.Size = new System.Drawing.Size(1046, 685);
this.sfDataGrid1.TabIndex = 0;
this.sfDataGrid1.Text = "sfDataGrid1";
//
// FrmDokumentwerte
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1093, 710);
this.Controls.Add(this.sfDataGrid1);
this.Name = "FrmDokumentwerte";
this.Text = "FrmDokumentwerte";
this.Load += new System.EventHandler(this.FrmDokumentwerte_Load);
((System.ComponentModel.ISupportInitialize)(this.sfDataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Syncfusion.WinForms.DataGrid.SfDataGrid sfDataGrid1;
}
}

View File

@@ -0,0 +1,28 @@
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnDoc.DocMgmt
{
public partial class FrmDokumentwerte : Form
{
public clsDocData docData = new clsDocData();
public FrmDokumentwerte()
{
InitializeComponent();
}
private void FrmDokumentwerte_Load(object sender, EventArgs e)
{
sfDataGrid1.DataSource = docData.DocValues;
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>