From dbe5b4b4d43070f4b86d9523d16ae89ac89712ad Mon Sep 17 00:00:00 2001 From: Safgerd Date: Mon, 10 Apr 2023 02:25:54 +0400 Subject: [PATCH] =?UTF-8?q?LabWork04=5FHard:=20=D0=92=D1=80=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BE,=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B7=D0=BC=D0=BE=D0=B6=D0=B5=D0=BD=20=D1=80=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutomobilePlant/FormMain.Designer.cs | 33 +- AutomobilePlant/AutomobilePlant/FormMain.cs | 31 ++ .../FormReportDateOrders.Designer.cs | 85 ++++ .../AutomobilePlant/FormReportDateOrders.cs | 79 ++++ .../AutomobilePlant/FormReportDateOrders.resx | 120 +++++ .../FormReportShopCars.Designer.cs | 106 +++++ .../AutomobilePlant/FormReportShopCars.cs | 84 ++++ .../AutomobilePlant/FormReportShopCars.resx | 120 +++++ AutomobilePlant/AutomobilePlant/Program.cs | 6 +- .../AutomobilePlant/ReportOrdersByDate.rdlc | 424 ++++++++++++++++++ .../BusinessLogics/ReportLogic.cs | 63 ++- .../OfficePackage/AbstractSaveToExcel.cs | 64 +++ .../OfficePackage/AbstractSaveToPdf.cs | 35 ++ .../OfficePackage/AbstractSaveToWord.cs | 24 + .../OfficePackage/HelperModels/ExcelInfo.cs | 1 + .../OfficePackage/HelperModels/PdfInfo.cs | 1 + .../OfficePackage/HelperModels/WordInfo.cs | 1 + .../OfficePackage/HelperModels/WordTable.cs | 14 + .../OfficePackage/Implements/SaveToWord.cs | 87 +++- .../BusinessLogicContracts/IReportLogic.cs | 6 + .../ViewModels/ReportDateOrdersViewModel.cs | 15 + .../ViewModels/ReportShopCarsViewModel.cs | 15 + 22 files changed, 1407 insertions(+), 7 deletions(-) create mode 100644 AutomobilePlant/AutomobilePlant/FormReportDateOrders.Designer.cs create mode 100644 AutomobilePlant/AutomobilePlant/FormReportDateOrders.cs create mode 100644 AutomobilePlant/AutomobilePlant/FormReportDateOrders.resx create mode 100644 AutomobilePlant/AutomobilePlant/FormReportShopCars.Designer.cs create mode 100644 AutomobilePlant/AutomobilePlant/FormReportShopCars.cs create mode 100644 AutomobilePlant/AutomobilePlant/FormReportShopCars.resx create mode 100644 AutomobilePlant/AutomobilePlant/ReportOrdersByDate.rdlc create mode 100644 AutomobilePlant/AutomobilePlantBusinessLogic/OfficePackage/HelperModels/WordTable.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/ViewModels/ReportDateOrdersViewModel.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/ViewModels/ReportShopCarsViewModel.cs diff --git a/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs b/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs index 1e9efd6..555faec 100644 --- a/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs +++ b/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs @@ -37,6 +37,9 @@ this.компонентыПоАвтомобилямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.списокМагазиновToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.автомобилиВМагазинахToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.списокЗаказовПоДатеToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.buttonSupplyShop = new System.Windows.Forms.Button(); this.dataGridView = new System.Windows.Forms.DataGridView(); this.buttonCreateOrder = new System.Windows.Forms.Button(); @@ -90,7 +93,10 @@ this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.списокАвтомобилейToolStripMenuItem, this.компонентыПоАвтомобилямToolStripMenuItem, - this.списокЗаказовToolStripMenuItem}); + this.списокЗаказовToolStripMenuItem, + this.списокМагазиновToolStripMenuItem, + this.автомобилиВМагазинахToolStripMenuItem, + this.списокЗаказовПоДатеToolStripMenuItem}); this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(73, 24); this.отчетыToolStripMenuItem.Text = "Отчеты"; @@ -116,7 +122,6 @@ this.списокЗаказовToolStripMenuItem.Text = "Список заказов"; this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click); // - // // магазиныToolStripMenuItem // this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem"; @@ -124,6 +129,20 @@ this.магазиныToolStripMenuItem.Text = "Магазины"; this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.магазиныToolStripMenuItem_Click); // + // списокМагазиновToolStripMenuItem + // + this.списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem"; + this.списокМагазиновToolStripMenuItem.Size = new System.Drawing.Size(259, 26); + this.списокМагазиновToolStripMenuItem.Text = "Список магазинов"; + this.списокМагазиновToolStripMenuItem.Click += new System.EventHandler(this.списокМагазиновToolStripMenuItem_Click); + // + // автомобилиВМагазинахToolStripMenuItem + // + this.автомобилиВМагазинахToolStripMenuItem.Name = "автомобилиВМагазинахToolStripMenuItem"; + this.автомобилиВМагазинахToolStripMenuItem.Size = new System.Drawing.Size(259, 26); + this.автомобилиВМагазинахToolStripMenuItem.Text = "Автомобили в магазинах"; + this.автомобилиВМагазинахToolStripMenuItem.Click += new System.EventHandler(this.автомобилиВМагазинахToolStripMenuItem_Click); + // // buttonSupplyShop // this.buttonSupplyShop.Location = new System.Drawing.Point(969, 182); @@ -204,6 +223,13 @@ this.buttonSellCars.UseVisualStyleBackColor = true; this.buttonSellCars.Click += new System.EventHandler(this.buttonSellCars_Click); // + // списокЗаказовПоДатеToolStripMenuItem + // + this.списокЗаказовПоДатеToolStripMenuItem.Name = "списокЗаказовПоДатеToolStripMenuItem"; + this.списокЗаказовПоДатеToolStripMenuItem.Size = new System.Drawing.Size(259, 26); + this.списокЗаказовПоДатеToolStripMenuItem.Text = "Список заказов по дате"; + this.списокЗаказовПоДатеToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовПоДатеToolStripMenuItem_Click); + // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); @@ -249,5 +275,8 @@ private ToolStripMenuItem магазиныToolStripMenuItem; private Button buttonSupplyShop; private Button buttonSellCars; + private ToolStripMenuItem списокМагазиновToolStripMenuItem; + private ToolStripMenuItem автомобилиВМагазинахToolStripMenuItem; + private ToolStripMenuItem списокЗаказовПоДатеToolStripMenuItem; } } \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/FormMain.cs b/AutomobilePlant/AutomobilePlant/FormMain.cs index 5ecd55e..0401724 100644 --- a/AutomobilePlant/AutomobilePlant/FormMain.cs +++ b/AutomobilePlant/AutomobilePlant/FormMain.cs @@ -105,6 +105,37 @@ namespace AutomobilePlant } + private void списокМагазиновToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveShopsToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void автомобилиВМагазинахToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportShopCars)); + if (service is FormReportShopCars form) + { + form.ShowDialog(); + } + } + + private void списокЗаказовПоДатеToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportDateOrders)); + if (service is FormReportDateOrders form) + { + form.ShowDialog(); + } + } + private void магазиныToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormShops)); diff --git a/AutomobilePlant/AutomobilePlant/FormReportDateOrders.Designer.cs b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.Designer.cs new file mode 100644 index 0000000..3a509db --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.Designer.cs @@ -0,0 +1,85 @@ +namespace AutomobilePlant +{ + partial class FormReportDateOrders + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel = new System.Windows.Forms.Panel(); + this.buttonCreateToPdf = new System.Windows.Forms.Button(); + this.buttonCreateReport = new System.Windows.Forms.Button(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // panel + // + this.panel.Controls.Add(this.buttonCreateToPdf); + this.panel.Controls.Add(this.buttonCreateReport); + this.panel.Dock = System.Windows.Forms.DockStyle.Top; + this.panel.Location = new System.Drawing.Point(0, 0); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(978, 69); + this.panel.TabIndex = 1; + // + // buttonCreateToPdf + // + this.buttonCreateToPdf.Location = new System.Drawing.Point(769, 39); + this.buttonCreateToPdf.Name = "buttonCreateToPdf"; + this.buttonCreateToPdf.Size = new System.Drawing.Size(190, 27); + this.buttonCreateToPdf.TabIndex = 5; + this.buttonCreateToPdf.Text = "PDF"; + this.buttonCreateToPdf.UseVisualStyleBackColor = true; + this.buttonCreateToPdf.Click += new System.EventHandler(this.buttonCreateToPdf_Click); + // + // buttonCreateReport + // + this.buttonCreateReport.Location = new System.Drawing.Point(554, 39); + this.buttonCreateReport.Name = "buttonCreateReport"; + this.buttonCreateReport.Size = new System.Drawing.Size(190, 27); + this.buttonCreateReport.TabIndex = 4; + this.buttonCreateReport.Text = "Сформировать"; + this.buttonCreateReport.UseVisualStyleBackColor = true; + this.buttonCreateReport.Click += new System.EventHandler(this.buttonCreateReport_Click); + // + // FormReportDateOrders + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(978, 450); + this.Controls.Add(this.panel); + this.Name = "FormReportDateOrders"; + this.Text = "Заказы по датам"; + this.panel.ResumeLayout(false); + this.ResumeLayout(false); + } + + #endregion + + private Panel panel; + private Button buttonCreateToPdf; + private Button buttonCreateReport; + } +} \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/FormReportDateOrders.cs b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.cs new file mode 100644 index 0000000..d14acd7 --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.cs @@ -0,0 +1,79 @@ +using AutomobilePlantContracts.BindingModels; +using AutomobilePlantContracts.BusinessLogicContracts; +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AutomobilePlant +{ + public partial class FormReportDateOrders : Form + { + private readonly ReportViewer reportViewer; + + private readonly ILogger _logger; + + private readonly IReportLogic _logic; + public FormReportDateOrders(ILogger logger, IReportLogic reportLogic) + { + InitializeComponent(); + _logger = logger; + _logic = reportLogic; + reportViewer = new ReportViewer + { + Dock = DockStyle.Fill + }; + reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrdersByDate.rdlc", FileMode.Open)); + Controls.Clear(); + Controls.Add(reportViewer); + Controls.Add(panel); + } + + private void buttonCreateReport_Click(object sender, EventArgs e) + { + try + { + var dataSource = _logic.GetDateOrders(); + var source = new ReportDataSource("DataSetOrders", dataSource); + reportViewer.LocalReport.DataSources.Clear(); + reportViewer.LocalReport.DataSources.Add(source); + reportViewer.RefreshReport(); + _logger.LogInformation("Загрузка списка заказов на весь период по датам"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки списка заказов на период"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonCreateToPdf_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveDateOrdersToPdfFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + _logger.LogInformation("Сохранение списка заказов на весь период по датам"); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения списка заказов на период"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } +} diff --git a/AutomobilePlant/AutomobilePlant/FormReportDateOrders.resx b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportDateOrders.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/FormReportShopCars.Designer.cs b/AutomobilePlant/AutomobilePlant/FormReportShopCars.Designer.cs new file mode 100644 index 0000000..aec7835 --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportShopCars.Designer.cs @@ -0,0 +1,106 @@ +namespace AutomobilePlant +{ + partial class FormReportShopCars + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonSaveToExcel = new System.Windows.Forms.Button(); + this.dataGridView = new System.Windows.Forms.DataGridView(); + this.Shop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Car = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + this.SuspendLayout(); + // + // buttonSaveToExcel + // + this.buttonSaveToExcel.Location = new System.Drawing.Point(12, 8); + this.buttonSaveToExcel.Name = "buttonSaveToExcel"; + this.buttonSaveToExcel.Size = new System.Drawing.Size(176, 29); + this.buttonSaveToExcel.TabIndex = 0; + this.buttonSaveToExcel.Text = "Сохранить в Excel"; + this.buttonSaveToExcel.UseVisualStyleBackColor = true; + this.buttonSaveToExcel.Click += new System.EventHandler(this.buttonSaveToExcel_Click); + // + // dataGridView + // + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Shop, + this.Car, + this.Count}); + this.dataGridView.Location = new System.Drawing.Point(12, 43); + this.dataGridView.Name = "dataGridView"; + this.dataGridView.RowHeadersWidth = 51; + this.dataGridView.RowTemplate.Height = 29; + this.dataGridView.Size = new System.Drawing.Size(776, 395); + this.dataGridView.TabIndex = 1; + // + // Shop + // + this.Shop.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Shop.HeaderText = "Магазин"; + this.Shop.MinimumWidth = 6; + this.Shop.Name = "Shop"; + // + // Car + // + this.Car.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Car.HeaderText = "Автомобиль"; + this.Car.MinimumWidth = 6; + this.Car.Name = "Car"; + // + // Count + // + this.Count.HeaderText = "Количество"; + this.Count.MinimumWidth = 6; + this.Count.Name = "Count"; + this.Count.Width = 125; + // + // FormReportShopCars + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.dataGridView); + this.Controls.Add(this.buttonSaveToExcel); + this.Name = "FormReportShopCars"; + this.Text = "Автомобили в магазинах"; + this.Load += new System.EventHandler(this.FormReportShopCars_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + this.ResumeLayout(false); + } + + #endregion + + private Button buttonSaveToExcel; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn Shop; + private DataGridViewTextBoxColumn Car; + private DataGridViewTextBoxColumn Count; + } +} \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/FormReportShopCars.cs b/AutomobilePlant/AutomobilePlant/FormReportShopCars.cs new file mode 100644 index 0000000..811dc7f --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportShopCars.cs @@ -0,0 +1,84 @@ +using AutomobilePlantContracts.BindingModels; +using AutomobilePlantContracts.BusinessLogicContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AutomobilePlant +{ + public partial class FormReportShopCars : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + + public FormReportShopCars(ILogger logger, IReportLogic reportLogic) + { + InitializeComponent(); + _logger = logger; + _logic = reportLogic; + } + + private void buttonSaveToExcel_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog + { + Filter = "xlsx|*.xlsx" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveShopCarsToExcelFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + _logger.LogInformation("Сохранение списка магазинов с автомобилями в них"); + + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения списка магазинов с автомобилями в них"); + + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void FormReportShopCars_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetShopCars(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" }); + foreach (var listElem in elem.Cars) + { + dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 }); + } + dataGridView.Rows.Add(new object[] { "Всего:", "", elem.Count }); + dataGridView.Rows.Add(Array.Empty()); + } + } + _logger.LogInformation("Загрузка списка магазинов с авто в них"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки списка магазинов с авто в них"); + + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} diff --git a/AutomobilePlant/AutomobilePlant/FormReportShopCars.resx b/AutomobilePlant/AutomobilePlant/FormReportShopCars.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/FormReportShopCars.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/Program.cs b/AutomobilePlant/AutomobilePlant/Program.cs index 88383f1..04840e2 100644 --- a/AutomobilePlant/AutomobilePlant/Program.cs +++ b/AutomobilePlant/AutomobilePlant/Program.cs @@ -53,12 +53,14 @@ namespace AutomobilePlant services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); - services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlant/ReportOrdersByDate.rdlc b/AutomobilePlant/AutomobilePlant/ReportOrdersByDate.rdlc new file mode 100644 index 0000000..3f130a1 --- /dev/null +++ b/AutomobilePlant/AutomobilePlant/ReportOrdersByDate.rdlc @@ -0,0 +1,424 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 10791c83-cee8-4a38-bbd0-245fc17cefb3 + + + + + + AutomobilePlantContractsViewModels + /* Local Query */ + + + + DateCreate + System.DateTime + + + CountOrders + System.Decimal + + + SumOrders + System.Double + + + + AutomobilePlantContracts.ViewModels + ReportDateOrdersViewModel + AutomobilePlantContracts.ViewModels.ReportDateOrdersViewModel, AutomobilePlantContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + Заказы + + + + + + + 1cm + 21cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 3cm + + + 3cm + + + 7cm + + + + + 0.6cm + + + + + true + true + + + + + Дата + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Количество + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!DateCreate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CountOrders.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SumOrders.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.48391cm + 0.55245cm + 1.2cm + 13cm + 1 + + + + + + true + true + + + + + Всего: + + + + + + + 4cm + 8.55245cm + 0.6cm + 2.5cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!SumOrders.Value, "DataSetOrders") + + + + + + + 4cm + 11.05245cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.72875cm +