diff --git a/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.Designer.cs b/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.Designer.cs index aca9604..3bb0d95 100644 --- a/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.Designer.cs +++ b/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.Designer.cs @@ -29,86 +29,93 @@ private void InitializeComponent() { this.panel = new System.Windows.Forms.Panel(); - this.labelS = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonMake = new System.Windows.Forms.Button(); this.buttonToPdf = new System.Windows.Forms.Button(); - this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); + this.buttonMake = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker(); + this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); this.panel.SuspendLayout(); this.SuspendLayout(); // // panel // - this.panel.Controls.Add(this.dateTimePickerTo); this.panel.Controls.Add(this.buttonToPdf); - this.panel.Controls.Add(this.dateTimePickerFrom); this.panel.Controls.Add(this.buttonMake); + this.panel.Controls.Add(this.label2); this.panel.Controls.Add(this.label1); - this.panel.Controls.Add(this.labelS); - this.panel.Location = new System.Drawing.Point(12, 12); + this.panel.Controls.Add(this.dateTimePickerTo); + this.panel.Controls.Add(this.dateTimePickerFrom); + this.panel.Dock = System.Windows.Forms.DockStyle.Top; + this.panel.Location = new System.Drawing.Point(0, 0); + this.panel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel.Name = "panel"; - this.panel.Size = new System.Drawing.Size(874, 73); + this.panel.Size = new System.Drawing.Size(973, 38); this.panel.TabIndex = 0; // - // labelS + // buttonToPdf // - this.labelS.AutoSize = true; - this.labelS.Location = new System.Drawing.Point(17, 28); - this.labelS.Name = "labelS"; - this.labelS.Size = new System.Drawing.Size(15, 15); - this.labelS.TabIndex = 0; - this.labelS.Text = "C"; + this.buttonToPdf.Location = new System.Drawing.Point(782, 8); + this.buttonToPdf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonToPdf.Name = "buttonToPdf"; + this.buttonToPdf.Size = new System.Drawing.Size(137, 22); + this.buttonToPdf.TabIndex = 5; + this.buttonToPdf.Text = "В Pdf"; + this.buttonToPdf.UseVisualStyleBackColor = true; + this.buttonToPdf.Click += new System.EventHandler(this.ButtonToPdf_Click); + // + // buttonMake + // + this.buttonMake.Location = new System.Drawing.Point(630, 8); + this.buttonMake.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonMake.Name = "buttonMake"; + this.buttonMake.Size = new System.Drawing.Size(137, 22); + this.buttonMake.TabIndex = 4; + this.buttonMake.Text = "Сформировать"; + this.buttonMake.UseVisualStyleBackColor = true; + this.buttonMake.Click += new System.EventHandler(this.ButtonMake_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(230, 13); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(21, 15); + this.label2.TabIndex = 3; + this.label2.Text = "по"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(258, 33); + this.label1.Location = new System.Drawing.Point(22, 13); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(21, 15); - this.label1.TabIndex = 1; - this.label1.Text = "по"; - // - // buttonMake - // - this.buttonMake.Location = new System.Drawing.Point(573, 12); - this.buttonMake.Name = "buttonMake"; - this.buttonMake.Size = new System.Drawing.Size(118, 41); - this.buttonMake.TabIndex = 2; - this.buttonMake.Text = "Создать"; - this.buttonMake.UseVisualStyleBackColor = true; - this.buttonMake.Click += new System.EventHandler(this.buttonMake_Click); - // - // buttonToPdf - // - this.buttonToPdf.Location = new System.Drawing.Point(709, 12); - this.buttonToPdf.Name = "buttonToPdf"; - this.buttonToPdf.Size = new System.Drawing.Size(118, 40); - this.buttonToPdf.TabIndex = 3; - 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(82, 28); - this.dateTimePickerFrom.Name = "dateTimePickerFrom"; - this.dateTimePickerFrom.Size = new System.Drawing.Size(136, 23); - this.dateTimePickerFrom.TabIndex = 4; + this.label1.Size = new System.Drawing.Size(15, 15); + this.label1.TabIndex = 2; + this.label1.Text = "С"; // // dateTimePickerTo // - this.dateTimePickerTo.Location = new System.Drawing.Point(303, 29); + this.dateTimePickerTo.Location = new System.Drawing.Point(274, 9); + this.dateTimePickerTo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dateTimePickerTo.Name = "dateTimePickerTo"; this.dateTimePickerTo.Size = new System.Drawing.Size(148, 23); this.dateTimePickerTo.TabIndex = 5; // + // dateTimePickerFrom + // + this.dateTimePickerFrom.Location = new System.Drawing.Point(57, 9); + this.dateTimePickerFrom.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.dateTimePickerFrom.Name = "dateTimePickerFrom"; + this.dateTimePickerFrom.Size = new System.Drawing.Size(154, 23); + this.dateTimePickerFrom.TabIndex = 0; + // // FormReportOrders // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 297); + this.ClientSize = new System.Drawing.Size(973, 338); this.Controls.Add(this.panel); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "FormReportOrders"; this.Text = "Заказы"; this.panel.ResumeLayout(false); @@ -120,11 +127,11 @@ #endregion private Panel panel; - private Label label1; - private Label labelS; - private Button buttonToPdf; private Button buttonMake; - private DateTimePicker dateTimePickerFrom; + private Label label2; + private Label label1; private DateTimePicker dateTimePickerTo; + private DateTimePicker dateTimePickerFrom; + private Button buttonToPdf; } } \ No newline at end of file diff --git a/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.cs b/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.cs index fa4878f..794f4e9 100644 --- a/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.cs +++ b/FurnitureAssembly/FurnitureAssemblyView/FormReportOrders.cs @@ -1,5 +1,5 @@ -using FurnitureAssemblyContracts.BusinessLogicsContracts; -using FurnitureAssemblyContracts.BindingModels; +using FurnitureAssemblyContracts.BindingModels; +using FurnitureAssemblyContracts.BusinessLogicsContracts; using Microsoft.Extensions.Logging; using Microsoft.Reporting.WinForms; using System; @@ -14,6 +14,7 @@ using System.Windows.Forms; namespace FurnitureAssemblyView { + // Форма с отчётом public partial class FormReportOrders : Form { private readonly ReportViewer reportViewer; @@ -21,6 +22,7 @@ namespace FurnitureAssemblyView private readonly ILogger _logger; private readonly IReportLogic _logic; + public FormReportOrders(ILogger logger, IReportLogic logic) { InitializeComponent(); @@ -40,7 +42,7 @@ namespace FurnitureAssemblyView Controls.Add(panel); } - private void buttonMake_Click(object sender, EventArgs e) + private void ButtonMake_Click(object sender, EventArgs e) { if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) { @@ -78,7 +80,7 @@ namespace FurnitureAssemblyView } } - private void buttonToPdf_Click(object sender, EventArgs e) + private void ButtonToPdf_Click(object sender, EventArgs e) { if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) { @@ -116,5 +118,7 @@ namespace FurnitureAssemblyView } } } + + } } diff --git a/FurnitureAssembly/FurnitureAssemblyView/ReportOrders.rdlc b/FurnitureAssembly/FurnitureAssemblyView/ReportOrders.rdlc index 5f28270..a11be69 100644 --- a/FurnitureAssembly/FurnitureAssemblyView/ReportOrders.rdlc +++ b/FurnitureAssembly/FurnitureAssemblyView/ReportOrders.rdlc @@ -1 +1,599 @@ - \ No newline at end of file + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 10791c83-cee8-4a38-bbd0-245fc17cefb3 + + + + + + FurnitureAssemblyContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + FurnitureName + System.String + + + Sum + System.Decimal + + + OrderStatus + FurnitureAssemblyDataModels.OrderStatus + + + + FurnitureAssemblyContracts.ViewModels + ReportOrdersViewModel + FurnitureAssemblyContracts.ViewModels.ReportOrdersViewModel, ConfectioneryContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + =Parameters!ReportParameterPeriod.Value + + + + + + + ReportParameterPeriod + 1cm + 1cm + 21cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Заказы + + + + + + + 1cm + 21cm + 1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.5cm + + + 3.21438cm + + + 8.23317cm + + + 3.02917cm + + + 2.87042cm + + + + + 0.6cm + + + + + true + true + + + + + Номер + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Дата создания + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Изделие + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Статус заказа + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Id.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FurnitureName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OrderStatus.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.48391cm + 0.55245cm + 1.2cm + 19.84714cm + 2 + + + + + + true + true + + + + + Итого: + + + + + + + 4cm + 15.39958cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + + + + + 4cm + 17.89958cm + 0.6cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.72875cm +