Merge branch 'LabWork06' into LabWork07

This commit is contained in:
Danil Markov 2023-05-05 22:43:09 +04:00
commit 80f733ff28
2 changed files with 91 additions and 95 deletions

View File

@ -34,7 +34,6 @@ namespace LawFirmBusinessLogic.BusinessLogics
/// <returns></returns>
public List<ReportDocumentBlankViewModel> GetDocumentBlank()
{
var blanks = _blankStorage.GetFullList();
var documents = _documentStorage.GetFullList();
var list = new List<ReportDocumentBlankViewModel>();
foreach (var document in documents)
@ -45,14 +44,11 @@ namespace LawFirmBusinessLogic.BusinessLogics
Blanks = new List<Tuple<string, int>>(),
TotalCount = 0
};
foreach (var blank in blanks)
foreach (var blank in document.DocumentBlanks)
{
if (document.DocumentBlanks.ContainsKey(blank.Id))
{
record.Blanks.Add(new Tuple<string, int>(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);
}

View File

@ -28,93 +28,93 @@
/// </summary>
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);
}