diff --git a/API_NetFramework/Controllers/ArchivController.cs b/API_NetFramework/Controllers/ArchivController.cs index 5d2decea..41aefe37 100644 --- a/API_NetFramework/Controllers/ArchivController.cs +++ b/API_NetFramework/Controllers/ArchivController.cs @@ -10,6 +10,9 @@ using Model; using Database; using Newtonsoft.Json; using API_NetFramework.Models; +using System.Runtime.Remoting.Messaging; +using System.IO; +using System.Web; namespace API_NetFramework.Controllers { @@ -51,6 +54,7 @@ namespace API_NetFramework.Controllers } } + [HttpGet] [Route("API/ArchiveDocBase64")] /// @@ -63,6 +67,7 @@ namespace API_NetFramework.Controllers /// Dokumenthandle aus OnBase /// /// + // public IHttpActionResult ArchivDocBase64(string Dokument, string Dokumenttyp) { if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false) @@ -139,8 +144,36 @@ namespace API_NetFramework.Controllers return Content(HttpStatusCode.InternalServerError, e.Message); } } + [HttpPost] + [Route("API/ArchivSBDoc")] + + public IHttpActionResult ArchivSBDoc(string sbnr, string intid, int partnernr ) + { + string json = ""; + if (HttpContext.Current.Request.InputStream.Length > 0) + { + using (var inputStream = new StreamReader(HttpContext.Current.Request.InputStream)) + { + json = inputStream.ReadToEnd(); + } + } + string debugfilename = @"X:\\jsontemp\" + sbnr.ToString() + "_" + intid.ToString() + "_"+partnernr.ToString()+".json"; + string SendToOnBase = System.Configuration.ConfigurationManager.AppSettings["SendToOnBase"]; + string SendToFile = System.Configuration.ConfigurationManager.AppSettings["SendToFile"]; + string debugdir = System.Configuration.ConfigurationManager.AppSettings["DebugDir"]; + string jsonstring = json; - + + //jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(od); + if (SendToOnBase != "Yes") + { + if (SendToFile == "Yes") + { + System.IO.File.WriteAllText(debugfilename, jsonstring); + } + } + return Content(HttpStatusCode.OK, ""); + } } } \ No newline at end of file diff --git a/API_NetFramework/Web.config b/API_NetFramework/Web.config index a3ee8589..8ad378f5 100644 --- a/API_NetFramework/Web.config +++ b/API_NetFramework/Web.config @@ -13,6 +13,9 @@ + + + diff --git a/API_NetFramework/bin/Model.dll b/API_NetFramework/bin/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/API_NetFramework/bin/Model.dll and b/API_NetFramework/bin/Model.dll differ diff --git a/API_NetFramework/bin/Model.pdb b/API_NetFramework/bin/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/API_NetFramework/bin/Model.pdb and b/API_NetFramework/bin/Model.pdb differ diff --git a/API_NetFramework/bin/OnDoc_NetFramework.dll b/API_NetFramework/bin/OnDoc_NetFramework.dll index a2611625..9c5bd86b 100644 Binary files a/API_NetFramework/bin/OnDoc_NetFramework.dll and b/API_NetFramework/bin/OnDoc_NetFramework.dll differ diff --git a/API_NetFramework/bin/OnDoc_NetFramework.dll.config b/API_NetFramework/bin/OnDoc_NetFramework.dll.config index a3ee8589..8ad378f5 100644 --- a/API_NetFramework/bin/OnDoc_NetFramework.dll.config +++ b/API_NetFramework/bin/OnDoc_NetFramework.dll.config @@ -13,6 +13,9 @@ + + + diff --git a/API_NetFramework/bin/OnDoc_NetFramework.pdb b/API_NetFramework/bin/OnDoc_NetFramework.pdb index 0052fbe0..4f3c602d 100644 Binary files a/API_NetFramework/bin/OnDoc_NetFramework.pdb and b/API_NetFramework/bin/OnDoc_NetFramework.pdb differ diff --git a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache index 506a1b82..0d84ed54 100644 Binary files a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache and b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache differ diff --git a/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll b/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll index a2611625..9c5bd86b 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll differ diff --git a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb index 0052fbe0..4f3c602d 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb differ diff --git a/BarcodeLib/bin/Debug/Model.dll b/BarcodeLib/bin/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/BarcodeLib/bin/Debug/Model.dll and b/BarcodeLib/bin/Debug/Model.dll differ diff --git a/BarcodeLib/bin/Debug/Model.pdb b/BarcodeLib/bin/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/BarcodeLib/bin/Debug/Model.pdb and b/BarcodeLib/bin/Debug/Model.pdb differ diff --git a/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache b/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache index d9b8a028..3ff8240b 100644 Binary files a/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache and b/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache differ diff --git a/Client/App.config b/Client/App.config index 14ef0629..f6c78e2a 100644 --- a/Client/App.config +++ b/Client/App.config @@ -19,6 +19,12 @@ Data Source=shu01\shu00;Initial Catalog=edoka;Persist Security Info=True;User ID=sa;Password=*shu29; + + https://localhost:44334/ + + + NO + diff --git a/Client/Client.csproj b/Client/Client.csproj index 2a1a9d85..071b3cb8 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -374,6 +374,7 @@ frmDocPreview.cs + Designer DokTypSelect.cs @@ -792,6 +793,11 @@ + + + + + diff --git a/Client/DocMgmt/Serienbrief.Designer.cs b/Client/DocMgmt/Serienbrief.Designer.cs index a2327ba5..14a0c1d4 100644 --- a/Client/DocMgmt/Serienbrief.Designer.cs +++ b/Client/DocMgmt/Serienbrief.Designer.cs @@ -30,12 +30,23 @@ { this.components = new System.ComponentModel.Container(); Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo(); + Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo2 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo(); Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv(); Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv2 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv(); Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv3 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv(); Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv4 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Serienbrief)); this.GrpDokumentInhalt = new System.Windows.Forms.GroupBox(); + this.grpDruckstapel = new System.Windows.Forms.GroupBox(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.treeviewDruckstapel = new Syncfusion.Windows.Forms.Tools.TreeViewAdv(); + this.pnlprogress = new System.Windows.Forms.Panel(); + this.progressBarAdv1 = new Syncfusion.Windows.Forms.Tools.ProgressBarAdv(); + this.lblProgressTitel = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.groupBox8 = new System.Windows.Forms.GroupBox(); this.cbboxteam = new Syncfusion.WinForms.ListView.SfComboBox(); this.groupBox7 = new System.Windows.Forms.GroupBox(); @@ -87,6 +98,7 @@ this.ribbonButton2 = new System.Windows.Forms.RibbonButton(); this.ribbonPanel8 = new System.Windows.Forms.RibbonPanel(); this.RibbonButtonGenerateSB = new System.Windows.Forms.RibbonButton(); + this.ribbonButtonDruckstapel = new System.Windows.Forms.RibbonButton(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.pnlLoad = new System.Windows.Forms.Panel(); this.sfdatagridsbload = new Syncfusion.WinForms.DataGrid.SfDataGrid(); @@ -94,9 +106,15 @@ this.btnsbloadok = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); - this.docPreview1 = new OnDoc.UIControls.DocPreview(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ribbonPanel9 = new System.Windows.Forms.RibbonPanel(); + this.RibbonButtonArchivierenUndAbschlessen = new System.Windows.Forms.RibbonButton(); + this.docPreview1 = new OnDoc.UIControls.DocPreview(); this.GrpDokumentInhalt.SuspendLayout(); + this.grpDruckstapel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.treeviewDruckstapel)).BeginInit(); + this.pnlprogress.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.progressBarAdv1)).BeginInit(); this.groupBox8.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbboxteam)).BeginInit(); this.groupBox7.SuspendLayout(); @@ -123,6 +141,8 @@ // // GrpDokumentInhalt // + this.GrpDokumentInhalt.Controls.Add(this.grpDruckstapel); + this.GrpDokumentInhalt.Controls.Add(this.pnlprogress); this.GrpDokumentInhalt.Controls.Add(this.groupBox8); this.GrpDokumentInhalt.Controls.Add(this.groupBox7); this.GrpDokumentInhalt.Controls.Add(this.groupBox6); @@ -136,6 +156,157 @@ this.GrpDokumentInhalt.TabStop = false; this.GrpDokumentInhalt.Text = "Dokument-Inahalt"; // + // grpDruckstapel + // + this.grpDruckstapel.Controls.Add(this.button2); + this.grpDruckstapel.Controls.Add(this.button1); + this.grpDruckstapel.Controls.Add(this.treeviewDruckstapel); + this.grpDruckstapel.Location = new System.Drawing.Point(1086, 23); + this.grpDruckstapel.Name = "grpDruckstapel"; + this.grpDruckstapel.Size = new System.Drawing.Size(477, 210); + this.grpDruckstapel.TabIndex = 19; + this.grpDruckstapel.TabStop = false; + this.grpDruckstapel.Text = "Druckstapel"; + this.grpDruckstapel.Visible = false; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(396, 184); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 20; + this.button2.Text = "Schliessen"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(240, 15); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(169, 23); + this.button1.TabIndex = 19; + this.button1.Text = "öffnen zum Drucken"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // treeviewDruckstapel + // + treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1; + treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true; + treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210))))); + treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black; + this.treeviewDruckstapel.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] { + new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)}); + this.treeviewDruckstapel.BeforeTouchSize = new System.Drawing.Size(215, 191); + this.treeviewDruckstapel.Dock = System.Windows.Forms.DockStyle.Left; + // + // + // + this.treeviewDruckstapel.HelpTextControl.BaseThemeName = null; + this.treeviewDruckstapel.HelpTextControl.Location = new System.Drawing.Point(0, 0); + this.treeviewDruckstapel.HelpTextControl.Name = ""; + this.treeviewDruckstapel.HelpTextControl.Size = new System.Drawing.Size(392, 112); + this.treeviewDruckstapel.HelpTextControl.TabIndex = 0; + this.treeviewDruckstapel.HelpTextControl.Visible = true; + this.treeviewDruckstapel.InactiveSelectedNodeForeColor = System.Drawing.SystemColors.ControlText; + this.treeviewDruckstapel.Location = new System.Drawing.Point(3, 16); + this.treeviewDruckstapel.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220))))); + this.treeviewDruckstapel.Name = "treeviewDruckstapel"; + this.treeviewDruckstapel.SelectedNodeForeColor = System.Drawing.SystemColors.HighlightText; + this.treeviewDruckstapel.Size = new System.Drawing.Size(215, 191); + this.treeviewDruckstapel.TabIndex = 18; + this.treeviewDruckstapel.Text = "treeViewAdv2"; + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.CheckBoxTickThickness = 1; + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.EnsureDefaultOptionedChild = true; + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.treeviewDruckstapel.ThemeStyle.TreeNodeAdvStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210))))); + // + // + // + this.treeviewDruckstapel.ToolTipControl.BaseThemeName = null; + this.treeviewDruckstapel.ToolTipControl.Location = new System.Drawing.Point(0, 0); + this.treeviewDruckstapel.ToolTipControl.Name = ""; + this.treeviewDruckstapel.ToolTipControl.Size = new System.Drawing.Size(392, 112); + this.treeviewDruckstapel.ToolTipControl.TabIndex = 0; + this.treeviewDruckstapel.ToolTipControl.Visible = true; + // + // pnlprogress + // + this.pnlprogress.BackColor = System.Drawing.Color.Gainsboro; + this.pnlprogress.Controls.Add(this.progressBarAdv1); + this.pnlprogress.Controls.Add(this.lblProgressTitel); + this.pnlprogress.Controls.Add(this.label3); + this.pnlprogress.Controls.Add(this.label2); + this.pnlprogress.Controls.Add(this.progressBar1); + this.pnlprogress.Location = new System.Drawing.Point(1086, 23); + this.pnlprogress.Name = "pnlprogress"; + this.pnlprogress.Size = new System.Drawing.Size(477, 99); + this.pnlprogress.TabIndex = 17; + this.pnlprogress.Visible = false; + // + // progressBarAdv1 + // + this.progressBarAdv1.BackgroundStyle = Syncfusion.Windows.Forms.Tools.ProgressBarBackgroundStyles.Office2016Colorful; + this.progressBarAdv1.BackMultipleColors = new System.Drawing.Color[] { + System.Drawing.Color.Empty}; + this.progressBarAdv1.BackSegments = false; + this.progressBarAdv1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(147)))), ((int)(((byte)(149)))), ((int)(((byte)(152))))); + this.progressBarAdv1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.progressBarAdv1.CustomText = null; + this.progressBarAdv1.CustomWaitingRender = false; + this.progressBarAdv1.ForegroundImage = null; + this.progressBarAdv1.GradientEndColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220))))); + this.progressBarAdv1.GradientStartColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220))))); + this.progressBarAdv1.Location = new System.Drawing.Point(12, 46); + this.progressBarAdv1.MultipleColors = new System.Drawing.Color[] { + System.Drawing.Color.Empty}; + this.progressBarAdv1.Name = "progressBarAdv1"; + this.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.Office2016Colorful; + this.progressBarAdv1.SegmentWidth = 12; + this.progressBarAdv1.Size = new System.Drawing.Size(448, 23); + this.progressBarAdv1.TabIndex = 20; + this.progressBarAdv1.Text = "progressBarAdv1"; + this.progressBarAdv1.ThemeName = "Office2016Colorful"; + this.progressBarAdv1.WaitingGradientWidth = 400; + // + // lblProgressTitel + // + this.lblProgressTitel.AutoSize = true; + this.lblProgressTitel.Location = new System.Drawing.Point(12, 9); + this.lblProgressTitel.Name = "lblProgressTitel"; + this.lblProgressTitel.Size = new System.Drawing.Size(0, 13); + this.lblProgressTitel.TabIndex = 19; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(435, 78); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(25, 13); + this.label3.TabIndex = 18; + this.label3.Text = "100"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 78); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(13, 13); + this.label2.TabIndex = 17; + this.label2.Text = "0"; + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(12, 46); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(448, 23); + this.progressBar1.TabIndex = 16; + // // groupBox8 // this.groupBox8.Controls.Add(this.cbboxteam); @@ -444,15 +615,15 @@ // // treeViewAdv1 // - treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1; - treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true; - treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210))))); - treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black; + treeNodeAdvStyleInfo2.CheckBoxTickThickness = 1; + treeNodeAdvStyleInfo2.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo2.EnsureDefaultOptionedChild = true; + treeNodeAdvStyleInfo2.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo2.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + treeNodeAdvStyleInfo2.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210))))); + treeNodeAdvStyleInfo2.TextColor = System.Drawing.Color.Black; this.treeViewAdv1.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] { - new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)}); + new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo2)}); this.treeViewAdv1.BeforeTouchSize = new System.Drawing.Size(230, 579); this.treeViewAdv1.Dock = System.Windows.Forms.DockStyle.Left; // @@ -577,6 +748,7 @@ this.ribbonTab1.Panels.Add(this.ribbonPanel6); this.ribbonTab1.Panels.Add(this.ribbonPanel7); this.ribbonTab1.Panels.Add(this.ribbonPanel8); + this.ribbonTab1.Panels.Add(this.ribbonPanel9); this.ribbonTab1.Text = "Funktionen"; // // ribbonPanel1 @@ -716,6 +888,7 @@ // ribbonPanel8 // this.ribbonPanel8.Items.Add(this.RibbonButtonGenerateSB); + this.ribbonPanel8.Items.Add(this.ribbonButtonDruckstapel); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Text = ""; // @@ -728,6 +901,15 @@ this.RibbonButtonGenerateSB.Text = "Serienbrief_generieren"; this.RibbonButtonGenerateSB.Click += new System.EventHandler(this.RibbonButtonGenerateSB_Click); // + // ribbonButtonDruckstapel + // + this.ribbonButtonDruckstapel.Image = global::OnDoc.Properties.Resources.SB_Druckstapel_32x32_32; + this.ribbonButtonDruckstapel.LargeImage = global::OnDoc.Properties.Resources.SB_Druckstapel_32x32_32; + this.ribbonButtonDruckstapel.Name = "ribbonButtonDruckstapel"; + this.ribbonButtonDruckstapel.SmallImage = global::OnDoc.Properties.Resources.SB_Druckstapel_24x24_32; + this.ribbonButtonDruckstapel.Text = "Druckstapel Generieren"; + this.ribbonButtonDruckstapel.Click += new System.EventHandler(this.ribbonButtonDruckstapel_Click); + // // openFileDialog1 // this.openFileDialog1.FileName = "openFileDialog1"; @@ -740,9 +922,9 @@ this.pnlLoad.Controls.Add(this.btnsbloadcancel); this.pnlLoad.Controls.Add(this.btnsbloadok); this.pnlLoad.Controls.Add(this.panel1); - this.pnlLoad.Location = new System.Drawing.Point(795, 45); + this.pnlLoad.Location = new System.Drawing.Point(193, 50); this.pnlLoad.Name = "pnlLoad"; - this.pnlLoad.Size = new System.Drawing.Size(965, 637); + this.pnlLoad.Size = new System.Drawing.Size(493, 634); this.pnlLoad.TabIndex = 4; this.pnlLoad.Visible = false; // @@ -753,7 +935,7 @@ this.sfdatagridsbload.Dock = System.Windows.Forms.DockStyle.Top; this.sfdatagridsbload.Location = new System.Drawing.Point(0, 47); this.sfdatagridsbload.Name = "sfdatagridsbload"; - this.sfdatagridsbload.Size = new System.Drawing.Size(961, 489); + this.sfdatagridsbload.Size = new System.Drawing.Size(489, 489); this.sfdatagridsbload.TabIndex = 3; this.sfdatagridsbload.Text = "sfDataGrid1"; this.sfdatagridsbload.CellClick += new Syncfusion.WinForms.DataGrid.Events.CellClickEventHandler(this.sfdatagridsbload_CellClick); @@ -787,7 +969,7 @@ this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(961, 47); + this.panel1.Size = new System.Drawing.Size(489, 47); this.panel1.TabIndex = 1; // // label1 @@ -800,14 +982,6 @@ this.label1.TabIndex = 0; this.label1.Text = "Serienbrief öffnen"; // - // docPreview1 - // - this.docPreview1.Dock = System.Windows.Forms.DockStyle.Fill; - this.docPreview1.Location = new System.Drawing.Point(0, 0); - this.docPreview1.Name = "docPreview1"; - this.docPreview1.Size = new System.Drawing.Size(725, 598); - this.docPreview1.TabIndex = 4; - // // splitContainer1 // this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -825,13 +999,37 @@ this.splitContainer1.SplitterDistance = 900; this.splitContainer1.TabIndex = 5; // + // ribbonPanel9 + // + this.ribbonPanel9.Items.Add(this.RibbonButtonArchivierenUndAbschlessen); + this.ribbonPanel9.Name = "ribbonPanel9"; + this.ribbonPanel9.Text = "ribbonPanel9"; + // + // RibbonButtonArchivierenUndAbschlessen + // + this.RibbonButtonArchivierenUndAbschlessen.Image = ((System.Drawing.Image)(resources.GetObject("RibbonButtonArchivierenUndAbschlessen.Image"))); + this.RibbonButtonArchivierenUndAbschlessen.LargeImage = ((System.Drawing.Image)(resources.GetObject("RibbonButtonArchivierenUndAbschlessen.LargeImage"))); + this.RibbonButtonArchivierenUndAbschlessen.Name = "RibbonButtonArchivierenUndAbschlessen"; + this.RibbonButtonArchivierenUndAbschlessen.SmallImage = ((System.Drawing.Image)(resources.GetObject("RibbonButtonArchivierenUndAbschlessen.SmallImage"))); + this.RibbonButtonArchivierenUndAbschlessen.Text = "Archivieren_und_abschliessen"; + this.RibbonButtonArchivierenUndAbschlessen.Click += new System.EventHandler(this.RibbonButtonArchivierenUndAbschlessen_Click); + this.RibbonButtonArchivierenUndAbschlessen.CanvasChanged += new System.EventHandler(this.RibbonButtonArchivierenUndAbschlessen_CanvasChanged); + // + // docPreview1 + // + this.docPreview1.Dock = System.Windows.Forms.DockStyle.Fill; + this.docPreview1.Location = new System.Drawing.Point(0, 0); + this.docPreview1.Name = "docPreview1"; + this.docPreview1.Size = new System.Drawing.Size(725, 598); + this.docPreview1.TabIndex = 4; + // // Serienbrief // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1633, 955); - this.Controls.Add(this.splitContainer1); this.Controls.Add(this.pnlLoad); + this.Controls.Add(this.splitContainer1); this.Controls.Add(this.GrpDokumentInhalt); this.Controls.Add(this.ribbon1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -842,6 +1040,11 @@ this.Text = "Serienbrief"; this.Load += new System.EventHandler(this.Serienbrief_Load); this.GrpDokumentInhalt.ResumeLayout(false); + this.grpDruckstapel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.treeviewDruckstapel)).EndInit(); + this.pnlprogress.ResumeLayout(false); + this.pnlprogress.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.progressBarAdv1)).EndInit(); this.groupBox8.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.cbboxteam)).EndInit(); this.groupBox7.ResumeLayout(false); @@ -934,5 +1137,18 @@ private System.Windows.Forms.RibbonButton RibbonButtonGenerateSB; private DocPreview docPreview1; private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Panel pnlprogress; + private System.Windows.Forms.Label lblProgressTitel; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private Syncfusion.Windows.Forms.Tools.ProgressBarAdv progressBarAdv1; + private System.Windows.Forms.RibbonButton ribbonButtonDruckstapel; + private Syncfusion.Windows.Forms.Tools.TreeViewAdv treeviewDruckstapel; + private System.Windows.Forms.GroupBox grpDruckstapel; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.RibbonPanel ribbonPanel9; + private System.Windows.Forms.RibbonButton RibbonButtonArchivierenUndAbschlessen; } } \ No newline at end of file diff --git a/Client/DocMgmt/Serienbrief.cs b/Client/DocMgmt/Serienbrief.cs index 9fccc703..59fcca69 100644 --- a/Client/DocMgmt/Serienbrief.cs +++ b/Client/DocMgmt/Serienbrief.cs @@ -5,6 +5,8 @@ using System.Data; using System.Drawing; using System.IO; using System.Linq; +using System.Net; +using System.Runtime.CompilerServices; using System.Runtime.Remoting.Messaging; using System.Text; using System.Threading.Tasks; @@ -20,13 +22,18 @@ using OnDoc.DocMgmt; using OnDoc.Helper; using OnDoc.Klassen; using OnDoc.UIControls.Administrator; +using Syncfusion.Pdf; using Syncfusion.Windows.Forms.Tools; +using Syncfusion.Windows.Forms.Tools.Navigation; using Syncfusion.Windows.Forms.Tools.Renderers; using Syncfusion.WinForms.Controls; using Syncfusion.WinForms.DataGrid; using Syncfusion.WinForms.DataGrid.Interactivity; using Windows.ApplicationModel.Activation; +using Windows.ApplicationModel.VoiceCommands; using Windows.Media.Ocr; +using Windows.Perception.Spatial; +using static Model.OnBaseDocUpload; namespace OnDoc.UIControls @@ -339,6 +346,7 @@ namespace OnDoc.UIControls try { sb.unterschriftrechts = Convert.ToInt32(cbboxunterschriftrechts.SelectedValue.ToString()); } catch { sb.unterschriftrechts = 0; } try { sb.team = Convert.ToInt32(cbboxteam.SelectedValue.ToString()); } catch { sb.team = 0; } sb.archivdatum = Convert.ToDateTime(DateDokumentDatum.Value); + sb.dokumentdatum= Convert.ToDateTime(DateDokumentDatum.Value); DB db = new DB(AppParams.connectionstring); sb.serienbriefnr = db.Save_Serienbrief(sb, AppParams.tempdir); db.save_sb_vorlage_to_db(sb.filename, "", sb.serienbriefnr); @@ -554,10 +562,13 @@ namespace OnDoc.UIControls System.Data.DataTable dt = new System.Data.DataTable(); dt = db.Check_sb_Data(AppParams.CurrentMitarbieter, sb); string msg = ""; + init_progressbar("Partnerliste prüfen", dt.Rows.Count); bool bldossier = false; System.Data.DataRow[] dr; for (int i = 0, loopTo = dt.Rows.Count - 1; i <= loopTo; i++) { + add_progress(); + System.Windows.Forms.Application.DoEvents(); dr = sb.dsempfaenger.Tables[0].Select("Partnernr='" + dt.Rows[i][0].ToString() + "'"); if (dr.Length == 0) { @@ -596,6 +607,7 @@ namespace OnDoc.UIControls if (Convert.ToInt32(dt.Rows[i][4]) == 1) { bldossier = true; }; } if (sb.dsempfaenger.Tables[0].Columns.Count > 20) { check_zwingende_felder(); } + finish_progress(); refresh_empfaenger(sb.dsempfaenger.Tables[0]); if (msg != "") { MessageBox.Show(msg, "Serienbrief", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -605,31 +617,40 @@ namespace OnDoc.UIControls for (int i = 20; i < sb.dsempfaenger.Tables[0].Columns.Count; i++) { - if (Convert.ToInt32(sb.dsempfaenger.Tables[1].Rows[0][sb.dsempfaenger.Tables[0].Columns[i].ColumnName]) == 1) + try { - System.Data.DataRow[] dr = sb.dsempfaenger.Tables[0].Select("[" + sb.dsempfaenger.Tables[0].Columns[i].ColumnName + "] <>''"); - foreach (System.Data.DataRow dr2 in dr) + if (Convert.ToInt32(sb.dsempfaenger.Tables[1].Rows[0][sb.dsempfaenger.Tables[0].Columns[i].ColumnName]) == 1) { - if (Convert.ToInt32(dr2["Status"]) == 0) { dr2["Status"] = 1; } - } - dr = sb.dsempfaenger.Tables[0].Select("[" + sb.dsempfaenger.Tables[0].Columns[i].ColumnName + "] =''"); - foreach (System.Data.DataRow dr2 in dr) - { - if (Convert.ToInt32(dr2["Status"]) == 0) + System.Data.DataRow[] dr = sb.dsempfaenger.Tables[0].Select("[" + sb.dsempfaenger.Tables[0].Columns[i].ColumnName + "] <>''"); + foreach (System.Data.DataRow dr2 in dr) { - dr2["Status"] = -1; - dr2["Fehlercode"] = 2; + if (Convert.ToInt32(dr2["Status"]) == 0) { dr2["Status"] = 1; } + } + + dr = sb.dsempfaenger.Tables[0].Select("[" + sb.dsempfaenger.Tables[0].Columns[i].ColumnName + "] =''"); + foreach (System.Data.DataRow dr2 in dr) + { + if (Convert.ToInt32(dr2["Status"]) == 0) + { + dr2["Status"] = -1; + dr2["Fehlercode"] = 2; + } } } } + catch { } + } } private void ribbonButton2_Click(object sender, EventArgs e) { + lblProgressTitel.Text = "Partnerliste prüfen"; + pnlprogress.Visible = true; Partnerliste_Pruefen(); treeViewAdv1_AfterSelect(sender, e); + pnlprogress.Visible = false; } System.Data.DataTable vorlagendaten = new System.Data.DataTable(); @@ -647,14 +668,19 @@ namespace OnDoc.UIControls sb.VorlageBase64 = dB.dsdaten.Tables[0].Rows[0][0].ToString(); sb.DocValues = new List(); vorlagendaten_aufbereiten(); - + update_serienbriefdaten(false); + update_zahlen(); + } private void vorlagendaten_aufbereiten() { + + init_progressbar("Dokumente generieren", vorlagendaten.Rows.Count); for (int i = 0, loopTo = vorlagendaten.Rows.Count - 1; i <= loopTo; i++) { - + add_progress(); + System.Windows.Forms.Application.DoEvents(); string sp1 = ""; string[] sp2; @@ -714,7 +740,7 @@ namespace OnDoc.UIControls if (vorlagendaten.Rows[i]["Briefanrede1"] != "") { s = vorlagendaten.Rows[i]["Briefanrede1"].ToString(); - if (s.Substring(0,4)=="Herr") + if (s.Substring(0, 4) == "Herr") { s = "r " + s; } @@ -728,7 +754,7 @@ namespace OnDoc.UIControls if (!string.IsNullOrEmpty(s)) s = s + Environment.NewLine; s1 = vorlagendaten.Rows[i]["Briefanrede2"].ToString(); - if (s.Substring(0,4)=="Herr") + if (s.Substring(0, 4) == "Herr") { s = s + "Sehr geehrter " + s1; } @@ -824,7 +850,7 @@ namespace OnDoc.UIControls { Insert_Value(vorlagendaten.Rows[i][i1].ToString(), vorlagendaten.Columns[i1].ColumnName); } - }catch { } + } catch { } try { if (vorlagendaten.Columns[i1].ColumnName.ToString().Substring(0, 5) == "I_09_") @@ -844,18 +870,29 @@ namespace OnDoc.UIControls // IntWert = RenCol(IntWert) Insert_Value(vorlagendaten.Rows[i][IntWert].ToString(), Intbookmark); } - }catch { } + } catch { } } string pdfdoc = dget.Convert_Word_To_PDF(dg.generate_serienbrief(sb.VorlageBase64, sb)); Helper.FileHelper fh = new FileHelper(); DB db = new DB(AppParams.connectionstring); string filename = "SB_" + sb.serienbriefnr.ToString() + vorlagendaten.Rows[i]["intEintragnr"].ToString() + ".pdf"; - fh.SaveBase64ToFile(pdfdoc,AppParams.tempdir + filename); - db.save_serienbrief_datei(sb.serienbriefnr, Convert.ToInt32(vorlagendaten.Rows[i]["IntEintragnr"]), AppParams.tempdir+filename); - //db = null; + fh.SaveBase64ToFile(pdfdoc, AppParams.tempdir + filename); + db.save_serienbrief_datei(sb.serienbriefnr, Convert.ToInt32(vorlagendaten.Rows[i]["IntEintragnr"]), AppParams.tempdir + filename); + System.IO.File.Delete(AppParams.tempdir + filename); + db = null; + System.Data.DataRow dr = sb.dsempfaenger.Tables[0].Select("intEintragnr = '" + vorlagendaten.Rows[i]["IntEintragnr"].ToString()+"'").FirstOrDefault(); + if (dr != null) + { + dr["STATUS"] = "1"; + } + + + sb.DocValues.Clear(); - + } + finish_progress(); + } private void insert_PPZeile(string position, string typ) @@ -938,12 +975,12 @@ namespace OnDoc.UIControls } clsDocValue dv = new clsDocValue(); - dv.TMBeginn=beginntextmarke; ; + dv.TMBeginn = beginntextmarke; ; dv.TMEnd = endetextmarke; dv.Value = feldwert; - dv.FieldName=feldname; + dv.FieldName = feldname; sb.DocValues.Add(dv); - + } private string Insert_DT_Column(ref System.Data.DataTable dt, string colname) @@ -1075,12 +1112,237 @@ namespace OnDoc.UIControls { if (docPreview1.Visible == true) { - var selectedItem = e.DataRow; - var dataRow = (e.DataRow.RowData as DataRowView).Row; - string inteintragnr = "0"; - inteintragnr = dataRow["inteintragnr"].ToString(); - docPreview1.Show_Serienbrief_Dokument(sb.serienbriefnr, Convert.ToInt32(inteintragnr)); + try + { + var selectedItem = e.DataRow; + var dataRow = (e.DataRow.RowData as DataRowView).Row; + string inteintragnr = "0"; + inteintragnr = dataRow["inteintragnr"].ToString(); + docPreview1.Show_Serienbrief_Dokument(sb.serienbriefnr, Convert.ToInt32(inteintragnr)); + } + catch { } + } + } + + private void init_progressbar(string title, int maxvalue) + { + progressBarAdv1.Value = 0; + progressBarAdv1.Maximum = maxvalue; + progressBarAdv1.Minimum = 0; + lblProgressTitel.Text = title; + pnlprogress.Visible = true; + } + + private void add_progress() + { + progressBarAdv1.Value = progressBarAdv1.Value + 1; + System.Windows.Forms.Application.DoEvents(); + } + private void finish_progress() + { + pnlprogress.Visible = false; + } + + private void merge() + { + + DataView dv = new DataView(sb.dsempfaenger.Tables[0]); + + dv.RowFilter = "Status = 1"; + dv.Sort = "Partnernr"; + PdfDocument finalDoc = new PdfDocument(); + + DB db = new DB(AppParams.connectionstring); + int stapelgroesse = 100; + int stapel = 1; + int i = 0; + int anzahl_stapel = (dv.Count / 100) + 1; + Stream[] streams = null; + if (dv.Count > stapelgroesse) { streams = new Stream[stapelgroesse]; } else streams = new Stream[dv.Count]; + init_progressbar("Druckstapel generieren", dv.Count); + foreach (DataRowView rowView in dv) + { + add_progress(); + System.Data.DataRow dr = rowView.Row; + db.Get_Tabledata("Select dbo.BinaryToBase64(dokument) from edex_sb_serienbrief_dokument where serienbriefnr=" + sb.serienbriefnr.ToString() + " and inteintragnr=" + dr["IntEintragNr"].ToString(), false, true); + var stream = new MemoryStream(Convert.FromBase64String(db.dsdaten.Tables[0].Rows[0][0].ToString())); + if (stream.Length > 0) + { + streams[i] = stream; + i++; + if (i >= stapelgroesse) + { + save_stapel(stapel, ref streams); + + i = 0; + streams = new Stream[dv.Count-(stapel*stapelgroesse)]; + stapel++; + } + } + } + save_stapel(stapel, ref streams); + //PdfDocumentBase.Merge(finalDoc, streams); + //FileStream fs = new FileStream(AppParams.tempdir+sb.serienbriefnr.ToString()+".pdf",FileMode.Create); + //finalDoc.Save(fs); + //finalDoc.Close(); + //finalDoc.Dispose(); + //fs.Close(); + //fs.Dispose(); + //for (i = 0; i < streams.Length; i++) + //{ + // streams[i].Dispose(); + //} + streams = null; + dv = null; + finish_progress(); + } + + private void save_stapel(int stapelnr, ref Stream[] streams) + { + try + { + PdfDocument finalDoc = new PdfDocument(); + PdfDocumentBase.Merge(finalDoc, streams); + string filename = AppParams.tempdir + DateTime.Now.ToString("yyyyhhmmHHmmss") + "_" + stapelnr.ToString() + "_" + sb.serienbriefnr.ToString() + ".pdf"; + FileStream fs = new FileStream(filename, FileMode.Create); + finalDoc.Save(fs); + finalDoc.Close(); + finalDoc.Dispose(); + fs.Close(); + fs.Dispose(); + TreeNodeAdv tn = new TreeNodeAdv(); + tn.Text = "Druckstapel " + stapelnr.ToString()+" ("+streams.Length.ToString()+")"; + tn.Tag = stapelnr.ToString(); + tn.TagObject = filename; + treeviewDruckstapel.Nodes.Add(tn); + for (int i = 0; i < streams.Length; i++) + { + streams[i].Dispose(); + } + streams = null; } + catch { } + } + + private void ribbonButtonDruckstapel_Click(object sender, EventArgs e) + { + treeviewDruckstapel.Nodes.Clear(); + merge(); + try + { + treeviewDruckstapel.SelectedNode = treeviewDruckstapel.Nodes[0]; + } + catch { } + grpDruckstapel.Visible = true; + } + + private void button1_Click(object sender, EventArgs e) + { + System.Diagnostics.Process.Start(treeviewDruckstapel.SelectedNode.TagObject.ToString()); + } + + private void button2_Click(object sender, EventArgs e) + { + grpDruckstapel.Visible = false; + } + + private void RibbonButtonArchivierenUndAbschlessen_CanvasChanged(object sender, EventArgs e) + { + + } + + private void RibbonButtonArchivierenUndAbschlessen_Click(object sender, EventArgs e) + { + DB db = new DB(AppParams.connectionstring); + DataView dv = new DataView(sb.dsempfaenger.Tables[0]); + dv.RowFilter = "Status = 1"; + dv.Sort = "Partnernr"; + foreach (DataRowView rowView in dv) + { + OnBaseDocUpload.OnBaseDokument onbasedoc = new OnBaseDocUpload.OnBaseDokument(); + System.Data.DataRow dr = rowView.Row; + db.clear_parameter(); + db.add_parameter("@serienbriefnr", sb.serienbriefnr.ToString()); + db.add_parameter("@intEintragnr", dr["intEintragnr"].ToString()); + db.add_parameter("@partnernr", dr["Partnernr"].ToString()); + db.Get_Tabledata("sp_get_onbase_parameters_sb", true, false); + if (db.dsdaten.Tables[0].Rows[0]["BpNummer"].ToString() == "") + { + onbasedoc.personNummer = db.dsdaten.Tables[0].Rows[0]["PersonNummer"].ToString(); + onbasedoc.bpNummer = ""; + } + else + { + onbasedoc.bpNummer = db.dsdaten.Tables[0].Rows[0]["BpNummer"].ToString(); + onbasedoc.personNummer = ""; + } + onbasedoc.dokumentDatum = db.dsdaten.Tables[0].Rows[0]["DokumentDatum"].ToString(); + onbasedoc.dokumentTyp = db.dsdaten.Tables[0].Rows[0]["dokumenttyp"].ToString(); + onbasedoc.dateiTyp= db.dsdaten.Tables[0].Rows[0]["dateityp"].ToString(); + var Attribute = new List(); + foreach (System.Data.DataRow rw in db.dsdaten.Tables[1].Rows) + { + var p = new OnBaseDocUpload.attribute() + { + fieldname = rw["fieldname"].ToString(), + fieldvalue = rw["fieldvalue"].ToString() + }; + Attribute.Add(p); + } + onbasedoc.attributes = Attribute; + db.Get_Tabledata("Select dbo.BinaryToBase64(dokument) from edex_sb_serienbrief_dokument where serienbriefnr=" + sb.serienbriefnr.ToString() + " and inteintragnr=" + dr["IntEintragNr"].ToString(), false, true); + onbasedoc.dokumentDatei = db.dsdaten.Tables[0].Rows[0][0].ToString(); + string URL = ""; + string response = ""; + + string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(onbasedoc); + URL = AppParams.RESTURI + "api/ArchivSBDoc"; + URL = URL + "?sbnr=" + sb.serienbriefnr.ToString(); + URL = URL + "&intid=" + dr["inteintragnr"].ToString(); + URL = URL + "&partnernr=" + dr["partnernr"].ToString(); + + HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(URL); + + httpWebRequest.ContentType = "text/json"; + httpWebRequest.Method = "POST"; + + + using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) + { + string json = jsonstring; + + streamWriter.Write(json); + streamWriter.Flush(); + } + + var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); + using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) + { + var result = streamReader.ReadToEnd(); + if (httpResponse.StatusCode == HttpStatusCode.OK) + { + dr["STATUS"] = 2; ; + } + } + + + //using (HttpWebResponse response = webRequest.GetResponse() as HttpWebResponse) + //{ + // if (response.StatusCode == HttpStatusCode.OK) + // { + // StreamReader reader = new StreamReader(response.GetResponseStream()); + // string responseContent = reader.ReadToEnd(); + + // dok = Newtonsoft.Json.JsonConvert.DeserializeObject(responseContent); + // } + // else + // { + // Logging.Logging.Error(URL + ": " + response.StatusCode.ToString() + " / " + response.StatusDescription, "Clinet - DokList GetDocument", ""); + // } + //} + } + sb.dsempfaenger.AcceptChanges(); + update_zahlen(); } } } diff --git a/Client/DocMgmt/Serienbrief.resx b/Client/DocMgmt/Serienbrief.resx index c7f796ba..e45afe0f 100644 --- a/Client/DocMgmt/Serienbrief.resx +++ b/Client/DocMgmt/Serienbrief.resx @@ -120,10 +120,28 @@ 156, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wAAADsABataJCQAAABpJREFUWEftwQEBAAAAgiD/r25IQAAAAMC5GhAgAAGdeElDAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wAAADsABataJCQAAABpJREFUWEftwQEBAAAAgiD/r25IQAAAAMC5GhAgAAGdeElDAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wAAADsABataJCQAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII= + + 17, 17 - AAABAAUAAAAAAAEAIABVIgAAVgAAADAwAAABACAAqCUAAKsiAAAgIAAAAQAgAKgQAABTSAAAGBgAAAEA diff --git a/Client/Helper/TableHelper.cs b/Client/Helper/TableHelper.cs index 0de79415..ddae5b44 100644 --- a/Client/Helper/TableHelper.cs +++ b/Client/Helper/TableHelper.cs @@ -85,6 +85,11 @@ namespace OnDoc.Helper } catch { return ""; } } - + public static DataTable resort(DataTable dt, string colName, string direction) + { + dt.DefaultView.Sort = colName + " " + direction; + dt = dt.DefaultView.ToTable(); + return dt; + } } } diff --git a/Client/Klassen/clsAppParams.cs b/Client/Klassen/clsAppParams.cs index 18f48d03..9cc5dc33 100644 --- a/Client/Klassen/clsAppParams.cs +++ b/Client/Klassen/clsAppParams.cs @@ -2,6 +2,7 @@ using Microsoft.Toolkit.Uwp.Notifications; using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -37,6 +38,9 @@ namespace OnDoc.Klassen db = null; StaticValues.UserID = "Stefan Hutter"; + UseAPI = Properties.Settings.Default.UseAPI; + RESTURI = Properties.Settings.Default.RESTURI; + } } diff --git a/Client/Properties/Resources.Designer.cs b/Client/Properties/Resources.Designer.cs index 08708744..dca68f78 100644 --- a/Client/Properties/Resources.Designer.cs +++ b/Client/Properties/Resources.Designer.cs @@ -2010,6 +2010,56 @@ namespace OnDoc.Properties { } } + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SB_Druckstapel_16x16_32 { + get { + object obj = ResourceManager.GetObject("SB_Druckstapel_16x16_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SB_Druckstapel_24x24_32 { + get { + object obj = ResourceManager.GetObject("SB_Druckstapel_24x24_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SB_Druckstapel_256x256_32 { + get { + object obj = ResourceManager.GetObject("SB_Druckstapel_256x256_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SB_Druckstapel_32x32_32 { + get { + object obj = ResourceManager.GetObject("SB_Druckstapel_32x32_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SB_Druckstapel_48x48_32 { + get { + object obj = ResourceManager.GetObject("SB_Druckstapel_48x48_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// diff --git a/Client/Properties/Resources.resx b/Client/Properties/Resources.resx index 7fdbbd88..8837e472 100644 --- a/Client/Properties/Resources.resx +++ b/Client/Properties/Resources.resx @@ -703,6 +703,21 @@ ..\Resources\save_48x48-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\SB_Druckstapel_16x16-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SB_Druckstapel_24x24-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SB_Druckstapel_256x256-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SB_Druckstapel_32x32-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SB_Druckstapel_48x48-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\SB_Generierung_16x16-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Client/Properties/Settings.Designer.cs b/Client/Properties/Settings.Designer.cs index cec4b4a4..2a6ba055 100644 --- a/Client/Properties/Settings.Designer.cs +++ b/Client/Properties/Settings.Designer.cs @@ -60,5 +60,29 @@ namespace OnDoc.Properties { this["Connectionstring_Prod"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("https://localhost:44334/")] + public string RESTURI { + get { + return ((string)(this["RESTURI"])); + } + set { + this["RESTURI"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("NO")] + public string UseAPI { + get { + return ((string)(this["UseAPI"])); + } + set { + this["UseAPI"] = value; + } + } } } diff --git a/Client/Properties/Settings.settings b/Client/Properties/Settings.settings index 662170cc..894f9e39 100644 --- a/Client/Properties/Settings.settings +++ b/Client/Properties/Settings.settings @@ -11,5 +11,11 @@ Data Source=shu01\shu00;Initial Catalog=edoka;Persist Security Info=True;User ID=sa;Password=*shu29; + + https://localhost:44334/ + + + NO + \ No newline at end of file diff --git a/Client/Resources/SB_Druckstapel_16x16-32.png b/Client/Resources/SB_Druckstapel_16x16-32.png new file mode 100644 index 00000000..79ca2be1 Binary files /dev/null and b/Client/Resources/SB_Druckstapel_16x16-32.png differ diff --git a/Client/Resources/SB_Druckstapel_24x24-32.png b/Client/Resources/SB_Druckstapel_24x24-32.png new file mode 100644 index 00000000..314e80c1 Binary files /dev/null and b/Client/Resources/SB_Druckstapel_24x24-32.png differ diff --git a/Client/Resources/SB_Druckstapel_256x256-32.png b/Client/Resources/SB_Druckstapel_256x256-32.png new file mode 100644 index 00000000..f463591d Binary files /dev/null and b/Client/Resources/SB_Druckstapel_256x256-32.png differ diff --git a/Client/Resources/SB_Druckstapel_32x32-32.png b/Client/Resources/SB_Druckstapel_32x32-32.png new file mode 100644 index 00000000..e535249b Binary files /dev/null and b/Client/Resources/SB_Druckstapel_32x32-32.png differ diff --git a/Client/Resources/SB_Druckstapel_48x48-32.png b/Client/Resources/SB_Druckstapel_48x48-32.png new file mode 100644 index 00000000..bcebf666 Binary files /dev/null and b/Client/Resources/SB_Druckstapel_48x48-32.png differ diff --git a/Client/bin/Debug/Model.dll b/Client/bin/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/Client/bin/Debug/Model.dll and b/Client/bin/Debug/Model.dll differ diff --git a/Client/bin/Debug/Model.pdb b/Client/bin/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/Client/bin/Debug/Model.pdb and b/Client/bin/Debug/Model.pdb differ diff --git a/Client/bin/Debug/OnDoc.exe b/Client/bin/Debug/OnDoc.exe index f3d08a8e..60842dde 100644 Binary files a/Client/bin/Debug/OnDoc.exe and b/Client/bin/Debug/OnDoc.exe differ diff --git a/Client/bin/Debug/OnDoc.exe.config b/Client/bin/Debug/OnDoc.exe.config index 6b7d9b2d..e089967f 100644 --- a/Client/bin/Debug/OnDoc.exe.config +++ b/Client/bin/Debug/OnDoc.exe.config @@ -19,6 +19,12 @@ Data Source=shu01\shu00;Initial Catalog=edoka;Persist Security Info=True;User ID=sa;Password=*shu29; + + https://localhost:44334/ + + + NO + diff --git a/Client/bin/Debug/OnDoc.pdb b/Client/bin/Debug/OnDoc.pdb index 278e5a27..b38eae51 100644 Binary files a/Client/bin/Debug/OnDoc.pdb and b/Client/bin/Debug/OnDoc.pdb differ diff --git a/Client/bin/Debug/de-DE/OnDoc.resources.dll b/Client/bin/Debug/de-DE/OnDoc.resources.dll index d424617b..e6fe817c 100644 Binary files a/Client/bin/Debug/de-DE/OnDoc.resources.dll and b/Client/bin/Debug/de-DE/OnDoc.resources.dll differ diff --git a/Client/obj/Debug/Client.csproj.AssemblyReference.cache b/Client/obj/Debug/Client.csproj.AssemblyReference.cache index 2f85fa0f..295a33c8 100644 Binary files a/Client/obj/Debug/Client.csproj.AssemblyReference.cache and b/Client/obj/Debug/Client.csproj.AssemblyReference.cache differ diff --git a/Client/obj/Debug/Client.csproj.GenerateResource.cache b/Client/obj/Debug/Client.csproj.GenerateResource.cache index 2aa30453..39e5e8af 100644 Binary files a/Client/obj/Debug/Client.csproj.GenerateResource.cache and b/Client/obj/Debug/Client.csproj.GenerateResource.cache differ diff --git a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 84c3d059..6214c526 100644 Binary files a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 175ba054..815c4387 100644 Binary files a/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Client/obj/Debug/OnDoc.Properties.Resources.resources b/Client/obj/Debug/OnDoc.Properties.Resources.resources index ede94854..d0ec0cbd 100644 Binary files a/Client/obj/Debug/OnDoc.Properties.Resources.resources and b/Client/obj/Debug/OnDoc.Properties.Resources.resources differ diff --git a/Client/obj/Debug/OnDoc.UIControls.Serienbrief.resources b/Client/obj/Debug/OnDoc.UIControls.Serienbrief.resources index cc34211a..af4df9bf 100644 Binary files a/Client/obj/Debug/OnDoc.UIControls.Serienbrief.resources and b/Client/obj/Debug/OnDoc.UIControls.Serienbrief.resources differ diff --git a/Client/obj/Debug/OnDoc.exe b/Client/obj/Debug/OnDoc.exe index f3d08a8e..60842dde 100644 Binary files a/Client/obj/Debug/OnDoc.exe and b/Client/obj/Debug/OnDoc.exe differ diff --git a/Client/obj/Debug/OnDoc.exe.config b/Client/obj/Debug/OnDoc.exe.config index 6b7d9b2d..e089967f 100644 --- a/Client/obj/Debug/OnDoc.exe.config +++ b/Client/obj/Debug/OnDoc.exe.config @@ -19,6 +19,12 @@ Data Source=shu01\shu00;Initial Catalog=edoka;Persist Security Info=True;User ID=sa;Password=*shu29; + + https://localhost:44334/ + + + NO + diff --git a/Client/obj/Debug/OnDoc.pdb b/Client/obj/Debug/OnDoc.pdb index 278e5a27..b38eae51 100644 Binary files a/Client/obj/Debug/OnDoc.pdb and b/Client/obj/Debug/OnDoc.pdb differ diff --git a/Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll index f0d484bf..15ea4e14 100644 Binary files a/Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll and b/Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/Client/obj/Debug/de-DE/OnDoc.resources.dll b/Client/obj/Debug/de-DE/OnDoc.resources.dll index d424617b..e6fe817c 100644 Binary files a/Client/obj/Debug/de-DE/OnDoc.resources.dll and b/Client/obj/Debug/de-DE/OnDoc.resources.dll differ diff --git a/DOCGEN/bin/Debug/Model.dll b/DOCGEN/bin/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/DOCGEN/bin/Debug/Model.dll and b/DOCGEN/bin/Debug/Model.dll differ diff --git a/DOCGEN/bin/Debug/Model.pdb b/DOCGEN/bin/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/DOCGEN/bin/Debug/Model.pdb and b/DOCGEN/bin/Debug/Model.pdb differ diff --git a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache index fc17a336..d33083cb 100644 Binary files a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache and b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache differ diff --git a/Database/bin/Debug/Model.dll b/Database/bin/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/Database/bin/Debug/Model.dll and b/Database/bin/Debug/Model.dll differ diff --git a/Database/bin/Debug/Model.pdb b/Database/bin/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/Database/bin/Debug/Model.pdb and b/Database/bin/Debug/Model.pdb differ diff --git a/Database/obj/Debug/Database.csproj.AssemblyReference.cache b/Database/obj/Debug/Database.csproj.AssemblyReference.cache index a26cf799..7385afea 100644 Binary files a/Database/obj/Debug/Database.csproj.AssemblyReference.cache and b/Database/obj/Debug/Database.csproj.AssemblyReference.cache differ diff --git a/Images/Icons/Icons/Blue/Images/SB_Druckstapel_16x16-32.png b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_16x16-32.png new file mode 100644 index 00000000..79ca2be1 Binary files /dev/null and b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_16x16-32.png differ diff --git a/Images/Icons/Icons/Blue/Images/SB_Druckstapel_24x24-32.png b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_24x24-32.png new file mode 100644 index 00000000..314e80c1 Binary files /dev/null and b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_24x24-32.png differ diff --git a/Images/Icons/Icons/Blue/Images/SB_Druckstapel_256x256-32.png b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_256x256-32.png new file mode 100644 index 00000000..f463591d Binary files /dev/null and b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_256x256-32.png differ diff --git a/Images/Icons/Icons/Blue/Images/SB_Druckstapel_32x32-32.png b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_32x32-32.png new file mode 100644 index 00000000..e535249b Binary files /dev/null and b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_32x32-32.png differ diff --git a/Images/Icons/Icons/Blue/Images/SB_Druckstapel_48x48-32.png b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_48x48-32.png new file mode 100644 index 00000000..bcebf666 Binary files /dev/null and b/Images/Icons/Icons/Blue/Images/SB_Druckstapel_48x48-32.png differ diff --git a/Images/Icons/Icons/Blue/SB_Druckstapel.ico b/Images/Icons/Icons/Blue/SB_Druckstapel.ico new file mode 100644 index 00000000..310cf5fc Binary files /dev/null and b/Images/Icons/Icons/Blue/SB_Druckstapel.ico differ diff --git a/Model/Model.csproj b/Model/Model.csproj index 57c422aa..00b47e28 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -47,6 +47,7 @@ + diff --git a/Model/OnBaseDocUpload.cs b/Model/OnBaseDocUpload.cs new file mode 100644 index 00000000..28e7a82c --- /dev/null +++ b/Model/OnBaseDocUpload.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class OnBaseDocUpload + { + public class OnBaseDokument + { + public string dokumentTyp { get; set; } + public string dokumentDatum { get; set; } + public string dateiTyp { get; set; } + public string bpNummer { get; set; } + public string personNummer { get; set; } + public string dokumentDatei { get; set; } + public List attributes { get; set; } + } + + public class attribute + { + public string fieldname { get; set; } + public string fieldvalue { get; set; } + } + + public class OnBaseDokumentFileUpload + { + public string dokumentTyp { get; set; } + public string dokumentDatum { get; set; } + public string dateiTyp { get; set; } + public string bpNummer { get; set; } + public string personNummer { get; set; } + + public List attributes { get; set; } + } + } + +} diff --git a/Model/bin/Debug/Model.dll b/Model/bin/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/Model/bin/Debug/Model.dll and b/Model/bin/Debug/Model.dll differ diff --git a/Model/bin/Debug/Model.pdb b/Model/bin/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/Model/bin/Debug/Model.pdb and b/Model/bin/Debug/Model.pdb differ diff --git a/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache b/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache index 2787a2fb..479c8520 100644 --- a/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache +++ b/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -360cbe71b183e2000d2a6e9a40a1eec981199b034a930103ec6ff55518a1d358 +fc1d8bbc41fd2408ff9b201a7d09bc7e0158619a1c90238c2c2a10dc7b57732f diff --git a/Model/obj/Debug/Model.dll b/Model/obj/Debug/Model.dll index 91ba45c6..c93b0ee9 100644 Binary files a/Model/obj/Debug/Model.dll and b/Model/obj/Debug/Model.dll differ diff --git a/Model/obj/Debug/Model.pdb b/Model/obj/Debug/Model.pdb index 056fa267..fe3263e2 100644 Binary files a/Model/obj/Debug/Model.pdb and b/Model/obj/Debug/Model.pdb differ