From 64b238acdd053e059629fc3e56cb839562a13795 Mon Sep 17 00:00:00 2001 From: Danil Markov Date: Fri, 5 May 2023 22:37:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=204=20pr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ReportLogic.cs | 12 +- .../LawFirmView/FormReportOrders.Designer.cs | 174 +++++++++--------- 2 files changed, 91 insertions(+), 95 deletions(-) diff --git a/LawFirm/LawFirmBusinessLogic/BusinessLogics/ReportLogic.cs b/LawFirm/LawFirmBusinessLogic/BusinessLogics/ReportLogic.cs index 403b878..2ad4a9a 100644 --- a/LawFirm/LawFirmBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/LawFirm/LawFirmBusinessLogic/BusinessLogics/ReportLogic.cs @@ -34,7 +34,6 @@ namespace LawFirmBusinessLogic.BusinessLogics /// public List GetDocumentBlank() { - var blanks = _blankStorage.GetFullList(); var documents = _documentStorage.GetFullList(); var list = new List(); foreach (var document in documents) @@ -45,14 +44,11 @@ namespace LawFirmBusinessLogic.BusinessLogics Blanks = new List>(), TotalCount = 0 }; - foreach (var blank in blanks) + foreach (var blank in document.DocumentBlanks) { - if (document.DocumentBlanks.ContainsKey(blank.Id)) - { - record.Blanks.Add(new Tuple(blank.BlankName, document.DocumentBlanks[blank.Id].Item2)); - record.TotalCount += - document.DocumentBlanks[blank.Id].Item2; - } + record.Blanks.Add(new(blank.Value.Item1.BlankName, + blank.Value.Item2)); + record.TotalCount += blank.Value.Item2; } list.Add(record); } diff --git a/LawFirm/LawFirmView/FormReportOrders.Designer.cs b/LawFirm/LawFirmView/FormReportOrders.Designer.cs index dd1733a..1a38da6 100644 --- a/LawFirm/LawFirmView/FormReportOrders.Designer.cs +++ b/LawFirm/LawFirmView/FormReportOrders.Designer.cs @@ -28,93 +28,93 @@ /// private void InitializeComponent() { - this.buttonMake = new System.Windows.Forms.Button(); - this.buttonToPdf = new System.Windows.Forms.Button(); - this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); - this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.panel = new System.Windows.Forms.Panel(); - this.panel.SuspendLayout(); - this.SuspendLayout(); - // - // buttonMake - // - this.buttonMake.Location = new System.Drawing.Point(354, 3); - this.buttonMake.Name = "buttonMake"; - this.buttonMake.Size = new System.Drawing.Size(127, 23); - this.buttonMake.TabIndex = 0; - this.buttonMake.Text = "Сформировать"; - this.buttonMake.UseVisualStyleBackColor = true; - this.buttonMake.Click += new System.EventHandler(this.ButtonMake_Click); - // - // buttonToPdf - // - this.buttonToPdf.Location = new System.Drawing.Point(487, 5); - this.buttonToPdf.Name = "buttonToPdf"; - this.buttonToPdf.Size = new System.Drawing.Size(75, 22); - this.buttonToPdf.TabIndex = 1; - this.buttonToPdf.Text = "В PDF"; - this.buttonToPdf.UseVisualStyleBackColor = true; - this.buttonToPdf.Click += new System.EventHandler(this.ButtonToPdf_Click); - // - // dateTimePickerFrom - // - this.dateTimePickerFrom.Location = new System.Drawing.Point(28, 3); - this.dateTimePickerFrom.Name = "dateTimePickerFrom"; - this.dateTimePickerFrom.Size = new System.Drawing.Size(144, 23); - this.dateTimePickerFrom.TabIndex = 2; - // - // dateTimePickerTo - // - this.dateTimePickerTo.Location = new System.Drawing.Point(204, 3); - this.dateTimePickerTo.Name = "dateTimePickerTo"; - this.dateTimePickerTo.Size = new System.Drawing.Size(144, 23); - this.dateTimePickerTo.TabIndex = 3; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(15, 15); - this.label1.TabIndex = 4; - this.label1.Text = "С"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(178, 9); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(21, 15); - this.label2.TabIndex = 5; - this.label2.Text = "по"; - // - // panel - // - this.panel.Controls.Add(this.dateTimePickerFrom); - this.panel.Controls.Add(this.buttonToPdf); - this.panel.Controls.Add(this.label1); - this.panel.Controls.Add(this.buttonMake); - this.panel.Controls.Add(this.label2); - this.panel.Controls.Add(this.dateTimePickerTo); - this.panel.Location = new System.Drawing.Point(0, 0); - this.panel.Name = "panel"; - this.panel.Size = new System.Drawing.Size(893, 32); - this.panel.TabIndex = 6; - // - // FormReportOrders - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(892, 325); - this.Controls.Add(this.panel); - this.Name = "FormReportOrders"; - this.Text = "FormReportOrders"; - this.Load += new System.EventHandler(this.FormReportOrders_Load); - this.panel.ResumeLayout(false); - this.panel.PerformLayout(); - this.ResumeLayout(false); + this.buttonMake = new System.Windows.Forms.Button(); + this.buttonToPdf = new System.Windows.Forms.Button(); + this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); + this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.panel = new System.Windows.Forms.Panel(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // buttonMake + // + this.buttonMake.Location = new System.Drawing.Point(354, 3); + this.buttonMake.Name = "buttonMake"; + this.buttonMake.Size = new System.Drawing.Size(127, 23); + this.buttonMake.TabIndex = 0; + this.buttonMake.Text = "Сформировать"; + this.buttonMake.UseVisualStyleBackColor = true; + this.buttonMake.Click += new System.EventHandler(this.ButtonMake_Click); + // + // buttonToPdf + // + this.buttonToPdf.Location = new System.Drawing.Point(487, 5); + this.buttonToPdf.Name = "buttonToPdf"; + this.buttonToPdf.Size = new System.Drawing.Size(75, 22); + this.buttonToPdf.TabIndex = 1; + this.buttonToPdf.Text = "В PDF"; + this.buttonToPdf.UseVisualStyleBackColor = true; + this.buttonToPdf.Click += new System.EventHandler(this.ButtonToPdf_Click); + // + // dateTimePickerFrom + // + this.dateTimePickerFrom.Location = new System.Drawing.Point(28, 3); + this.dateTimePickerFrom.Name = "dateTimePickerFrom"; + this.dateTimePickerFrom.Size = new System.Drawing.Size(144, 23); + this.dateTimePickerFrom.TabIndex = 2; + // + // dateTimePickerTo + // + this.dateTimePickerTo.Location = new System.Drawing.Point(204, 3); + this.dateTimePickerTo.Name = "dateTimePickerTo"; + this.dateTimePickerTo.Size = new System.Drawing.Size(144, 23); + this.dateTimePickerTo.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(15, 15); + this.label1.TabIndex = 4; + this.label1.Text = "С"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(178, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(21, 15); + this.label2.TabIndex = 5; + this.label2.Text = "по"; + // + // panel + // + this.panel.Controls.Add(this.dateTimePickerFrom); + this.panel.Controls.Add(this.buttonToPdf); + this.panel.Controls.Add(this.label1); + this.panel.Controls.Add(this.buttonMake); + this.panel.Controls.Add(this.label2); + this.panel.Controls.Add(this.dateTimePickerTo); + this.panel.Location = new System.Drawing.Point(0, 0); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(893, 32); + this.panel.TabIndex = 6; + // + // FormReportOrders + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(892, 325); + this.Controls.Add(this.panel); + this.Name = "FormReportOrders"; + this.Text = "Отчет по заказам"; + this.Load += new System.EventHandler(this.FormReportOrders_Load); + this.panel.ResumeLayout(false); + this.panel.PerformLayout(); + this.ResumeLayout(false); }