From 976498e495059213044d18148aca8475b29f60a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=97=D0=B0=D1=85=D0=B0=D1=80=D0=BE=D0=B2?= Date: Sun, 21 May 2023 22:03:51 +0400 Subject: [PATCH] Lab4 --- FurnitureAssembly/FormMain.cs | 38 +- .../FormReportOrders.Designer.cs | 131 ++++ FurnitureAssembly/FormReportOrders.cs | 98 +++ FurnitureAssembly/FormReportOrders.resx | 120 ++++ .../FormReportProductComponents.Designer.cs | 102 +++ .../FormReportProductComponents.cs | 80 +++ .../FormReportProductComponents.resx | 120 ++++ FurnitureAssembly/FurnitureAssembly.csproj | 1 + FurnitureAssembly/Program.cs | 8 + FurnitureAssembly/ReportOrders.rdlc | 609 ++++++++++++++++++ .../BusinessLogic/ReportLogic.cs | 107 +++ .../FurnitureAssemblyBusinessLogic.csproj | 2 + .../OfficePackage/AbstractSaveToExcel.cs | 97 +++ .../OfficePackage/AbstractSaveToPdf.cs | 58 ++ .../OfficePackage/AbstractSaveToWord.cs | 48 ++ .../HelperEnums/ExcelStyleInfoType.cs | 15 + .../HelperEnums/PdfParagraphAlignmentType.cs | 15 + .../HelperEnums/WordJustificationType.cs | 14 + .../HelperModels/ExcelCellParameters.cs | 18 + .../OfficePackage/HelperModels/ExcelInfo.cs | 20 + .../HelperModels/ExcelMergeParameters.cs | 15 + .../OfficePackage/HelperModels/PdfInfo.cs | 18 + .../HelperModels/PdfParagraph.cs | 16 + .../HelperModels/PdfRowParameters.cs | 16 + .../OfficePackage/HelperModels/WordInfo.cs | 16 + .../HelperModels/WordParagraph.cs | 14 + .../HelperModels/WordTextProperties.cs | 16 + .../OfficePackage/Implements/SaveToExcel.cs | 330 ++++++++++ .../OfficePackage/Implements/SaveToPdf.cs | 100 +++ .../OfficePackage/Implements/SaveToWord.cs | 129 ++++ .../BindingModels/ReportBindingModel.cs | 15 + .../BusinessLogicsContracts/IReportLogic.cs | 19 + .../SearchModels/OrderSearchModel.cs | 2 + .../ViewModels/ReportOrdersViewModel.cs | 17 + .../ReportProductComponentViewModel.cs | 15 + 35 files changed, 2437 insertions(+), 2 deletions(-) create mode 100644 FurnitureAssembly/FormReportOrders.Designer.cs create mode 100644 FurnitureAssembly/FormReportOrders.cs create mode 100644 FurnitureAssembly/FormReportOrders.resx create mode 100644 FurnitureAssembly/FormReportProductComponents.Designer.cs create mode 100644 FurnitureAssembly/FormReportProductComponents.cs create mode 100644 FurnitureAssembly/FormReportProductComponents.resx create mode 100644 FurnitureAssembly/ReportOrders.rdlc create mode 100644 FurnitureAssemblyBusinessLogic/BusinessLogic/ReportLogic.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/AbstractSaveToExcel.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/AbstractSaveToPdf.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/AbstractSaveToWord.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperEnums/ExcelStyleInfoType.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperEnums/WordJustificationType.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/ExcelCellParameters.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/ExcelInfo.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/ExcelMergeParameters.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/PdfInfo.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/PdfParagraph.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/PdfRowParameters.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/WordInfo.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/WordParagraph.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/HelperModels/WordTextProperties.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/Implements/SaveToExcel.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/Implements/SaveToPdf.cs create mode 100644 FurnitureAssemblyBusinessLogic/OfficePackage/Implements/SaveToWord.cs create mode 100644 FurnitureAssemblyContracts/BindingModels/ReportBindingModel.cs create mode 100644 FurnitureAssemblyContracts/BusinessLogicsContracts/IReportLogic.cs create mode 100644 FurnitureAssemblyContracts/ViewModels/ReportOrdersViewModel.cs create mode 100644 FurnitureAssemblyContracts/ViewModels/ReportProductComponentViewModel.cs diff --git a/FurnitureAssembly/FormMain.cs b/FurnitureAssembly/FormMain.cs index ba0dfbe..539cd38 100644 --- a/FurnitureAssembly/FormMain.cs +++ b/FurnitureAssembly/FormMain.cs @@ -16,15 +16,16 @@ namespace FurnitureAssembly { public partial class FormMain : Form { - private readonly ILogger _logger; private readonly IOrderLogic _orderLogic; + private readonly IReportLogic _reportLogic; - public FormMain(ILogger logger, IOrderLogic orderLogic) + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic) { InitializeComponent(); _logger = logger; _orderLogic = orderLogic; + _reportLogic = reportLogic; } private void FormMain_Load(object sender, EventArgs e) @@ -196,5 +197,38 @@ namespace FurnitureAssembly { LoadData(); } + + private void списокИзделийToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveProductsToWordFile(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(FormReportProductComponents)); + if (service is FormReportProductComponents form) + { + form.ShowDialog(); + } + + } + + private void списокЗаказовToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders)); + if (service is FormReportOrders form) + { + form.ShowDialog(); + } + } } } diff --git a/FurnitureAssembly/FormReportOrders.Designer.cs b/FurnitureAssembly/FormReportOrders.Designer.cs new file mode 100644 index 0000000..7117ddc --- /dev/null +++ b/FurnitureAssembly/FormReportOrders.Designer.cs @@ -0,0 +1,131 @@ +namespace FurnitureAssembly +{ + partial class FormReportOrders + { + /// + /// 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.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.MakeButton = new System.Windows.Forms.Button(); + this.ToPdfButton = new System.Windows.Forms.Button(); + this.panel = new System.Windows.Forms.Panel(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // dateTimePickerFrom + // + this.dateTimePickerFrom.Location = new System.Drawing.Point(43, 12); + this.dateTimePickerFrom.Name = "dateTimePickerFrom"; + this.dateTimePickerFrom.Size = new System.Drawing.Size(200, 23); + this.dateTimePickerFrom.TabIndex = 0; + // + // dateTimePickerTo + // + this.dateTimePickerTo.Location = new System.Drawing.Point(276, 12); + this.dateTimePickerTo.Name = "dateTimePickerTo"; + this.dateTimePickerTo.Size = new System.Drawing.Size(200, 23); + this.dateTimePickerTo.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(22, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(15, 15); + this.label1.TabIndex = 2; + this.label1.Text = "С"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(249, 18); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(21, 15); + this.label2.TabIndex = 3; + this.label2.Text = "по"; + // + // MakeButton + // + this.MakeButton.Location = new System.Drawing.Point(517, 12); + this.MakeButton.Name = "MakeButton"; + this.MakeButton.Size = new System.Drawing.Size(105, 23); + this.MakeButton.TabIndex = 4; + this.MakeButton.Text = "Сформировать"; + this.MakeButton.UseVisualStyleBackColor = true; + this.MakeButton.Click += new System.EventHandler(this.MakeButton_Click); + // + // ToPdfButton + // + this.ToPdfButton.Location = new System.Drawing.Point(684, 12); + this.ToPdfButton.Name = "ToPdfButton"; + this.ToPdfButton.Size = new System.Drawing.Size(75, 23); + this.ToPdfButton.TabIndex = 5; + this.ToPdfButton.Text = "В Pdf"; + this.ToPdfButton.UseVisualStyleBackColor = true; + this.ToPdfButton.Click += new System.EventHandler(this.ToPdfButton_Click); + // + // panel + // + this.panel.Controls.Add(this.label2); + this.panel.Controls.Add(this.ToPdfButton); + this.panel.Controls.Add(this.label1); + this.panel.Controls.Add(this.MakeButton); + this.panel.Controls.Add(this.dateTimePickerFrom); + this.panel.Controls.Add(this.dateTimePickerTo); + 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(800, 52); + 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(800, 450); + this.Controls.Add(this.panel); + this.Name = "FormReportOrders"; + this.Text = "Заказы"; + this.panel.ResumeLayout(false); + this.panel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private DateTimePicker dateTimePickerFrom; + private DateTimePicker dateTimePickerTo; + private Label label1; + private Label label2; + private Button MakeButton; + private Button ToPdfButton; + private Panel panel; + } +} \ No newline at end of file diff --git a/FurnitureAssembly/FormReportOrders.cs b/FurnitureAssembly/FormReportOrders.cs new file mode 100644 index 0000000..98e7146 --- /dev/null +++ b/FurnitureAssembly/FormReportOrders.cs @@ -0,0 +1,98 @@ +using FurnitureAssemblyContracts.BindingModels; +using FurnitureAssemblyContracts.BusinessLogicsContracts; +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 FurnitureAssembly +{ + public partial class FormReportOrders : Form + { + private readonly ReportViewer reportViewer; + private readonly ILogger _logger; + private readonly IReportLogic _logic; + public FormReportOrders(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + reportViewer = new ReportViewer + { + Dock = DockStyle.Fill + }; + reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open)); + Controls.Clear(); + Controls.Add(reportViewer); + Controls.Add(panel); + } + + private void MakeButton_Click(object sender, EventArgs e) + { + if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + try + { + var dataSource = _logic.GetOrders(new ReportBindingModel + { + DateFrom = dateTimePickerFrom.Value, + DateTo = dateTimePickerTo.Value + }); + var source = new ReportDataSource("DataSetOrders", dataSource); + reportViewer.LocalReport.DataSources.Clear(); + reportViewer.LocalReport.DataSources.Add(source); + var parameters = new[] { new ReportParameter("ReportParameterPeriod", $"c {dateTimePickerFrom.Value.ToShortDateString()} по {dateTimePickerTo.Value.ToShortDateString()}") }; + reportViewer.LocalReport.SetParameters(parameters); + reportViewer.RefreshReport(); + _logger.LogInformation("Загрузка списка заказов на период {From}-{ To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки списка заказов на период"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ToPdfButton_Click(object sender, EventArgs e) + { + if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + using var dialog = new SaveFileDialog + { + Filter = "pdf|*.pdf" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveOrdersToPdfFile(new ReportBindingModel + { + FileName = dialog.FileName, + DateFrom = dateTimePickerFrom.Value, + DateTo = dateTimePickerTo.Value + }); + _logger.LogInformation("Сохранение списка заказов на период { From} - { To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения списка заказов на период"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } +} diff --git a/FurnitureAssembly/FormReportOrders.resx b/FurnitureAssembly/FormReportOrders.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FurnitureAssembly/FormReportOrders.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/FurnitureAssembly/FormReportProductComponents.Designer.cs b/FurnitureAssembly/FormReportProductComponents.Designer.cs new file mode 100644 index 0000000..a45eb2b --- /dev/null +++ b/FurnitureAssembly/FormReportProductComponents.Designer.cs @@ -0,0 +1,102 @@ +namespace FurnitureAssembly +{ + partial class FormReportProductComponents + { + /// + /// 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.dataGridView = new System.Windows.Forms.DataGridView(); + this.SaveToExcelButton = new System.Windows.Forms.Button(); + this.ComponentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ProductColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView + // + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.ComponentColumn, + this.ProductColumn, + this.CountColumn}); + this.dataGridView.Location = new System.Drawing.Point(12, 38); + this.dataGridView.Name = "dataGridView"; + this.dataGridView.RowTemplate.Height = 25; + this.dataGridView.Size = new System.Drawing.Size(607, 400); + this.dataGridView.TabIndex = 0; + // + // SaveToExcelButton + // + this.SaveToExcelButton.Location = new System.Drawing.Point(12, 9); + this.SaveToExcelButton.Name = "SaveToExcelButton"; + this.SaveToExcelButton.Size = new System.Drawing.Size(119, 23); + this.SaveToExcelButton.TabIndex = 1; + this.SaveToExcelButton.Text = "Сохранить в Excel"; + this.SaveToExcelButton.UseVisualStyleBackColor = true; + this.SaveToExcelButton.Click += new System.EventHandler(this.SaveToExcelButton_Click); + // + // ComponentColumn + // + this.ComponentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.ComponentColumn.HeaderText = "Компонент"; + this.ComponentColumn.Name = "ComponentColumn"; + // + // ProductColumn + // + this.ProductColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.ProductColumn.HeaderText = "Изделие"; + this.ProductColumn.Name = "ProductColumn"; + // + // CountColumn + // + this.CountColumn.HeaderText = "Количество"; + this.CountColumn.Name = "CountColumn"; + // + // FormReportProductComponents + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(631, 450); + this.Controls.Add(this.SaveToExcelButton); + this.Controls.Add(this.dataGridView); + this.Name = "FormReportProductComponents"; + this.Text = "Компоненты по Изделиям"; + this.Load += new System.EventHandler(this.FormReportProductComponents_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DataGridView dataGridView; + private DataGridViewTextBoxColumn ComponentColumn; + private DataGridViewTextBoxColumn ProductColumn; + private DataGridViewTextBoxColumn CountColumn; + private Button SaveToExcelButton; + } +} \ No newline at end of file diff --git a/FurnitureAssembly/FormReportProductComponents.cs b/FurnitureAssembly/FormReportProductComponents.cs new file mode 100644 index 0000000..b24324a --- /dev/null +++ b/FurnitureAssembly/FormReportProductComponents.cs @@ -0,0 +1,80 @@ +using FurnitureAssemblyContracts.BindingModels; +using FurnitureAssemblyContracts.BusinessLogicsContracts; +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 FurnitureAssembly +{ + public partial class FormReportProductComponents : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + public FormReportProductComponents(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + + private void SaveToExcelButton_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog + { + Filter = "xlsx|*.xlsx" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveProductComponentToExcelFile(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 FormReportProductComponents_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetProductComponent(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ProductName, "", "" }); + foreach (var listElem in elem.Components) + { + dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 }); + } + dataGridView.Rows.Add(new object[] { "Итого", "", elem.TotalCount }); + dataGridView.Rows.Add(Array.Empty()); + } + } + _logger.LogInformation("Загрузка списка изделий по компонентам"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки списка изделий по компонентам"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} diff --git a/FurnitureAssembly/FormReportProductComponents.resx b/FurnitureAssembly/FormReportProductComponents.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FurnitureAssembly/FormReportProductComponents.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/FurnitureAssembly/FurnitureAssembly.csproj b/FurnitureAssembly/FurnitureAssembly.csproj index e6ad81b..52d0d66 100644 --- a/FurnitureAssembly/FurnitureAssembly.csproj +++ b/FurnitureAssembly/FurnitureAssembly.csproj @@ -16,6 +16,7 @@ + diff --git a/FurnitureAssembly/Program.cs b/FurnitureAssembly/Program.cs index a516471..31ca13f 100644 --- a/FurnitureAssembly/Program.cs +++ b/FurnitureAssembly/Program.cs @@ -1,4 +1,6 @@ using FurnitureAssemblyBusinessLogic.BusinessLogic; +using FurnitureAssemblyBusinessLogic.OfficePackage.Implements; +using FurnitureAssemblyBusinessLogic.OfficePackage; using FurnitureAssemblyContracts.BusinessLogicsContracts; using FurnitureAssemblyContracts.StoragesContracts; using FurnitureAssemblyDatabaseImplement.Implements; @@ -37,6 +39,10 @@ namespace FurnitureAssembly services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -44,6 +50,8 @@ namespace FurnitureAssembly services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file diff --git a/FurnitureAssembly/ReportOrders.rdlc b/FurnitureAssembly/ReportOrders.rdlc new file mode 100644 index 0000000..21225d8 --- /dev/null +++ b/FurnitureAssembly/ReportOrders.rdlc @@ -0,0 +1,609 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + bf577a27-98a7-43b2-8beb-1a37d37ce5cd + + + + + + MotorPlantContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + PackageName + System.String + + + Sum + System.Decimal + + + Status + System.String + + + + MotorPlantContracts.ViewModels + ReportOrderViewModel + MotorPlantContracts.ViewModels.ReportOrderViewModel, MotorPlantContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + Заказы + + + + + + + Textbox1 + 0.94396cm + 19.01cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ReportParameterPeriod.Value + + + + + + + ReportParameterPeriod + 0.97924cm + 0.83812cm + 19.01cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.20245cm + + + 5.20245cm + + + 3.90599cm + + + 2.19911cm + + + 2.5cm + + + + + 0.79844cm + + + + + true + true + + + + + Номер + + + + + + + Textbox2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Дата создания + + + + + + + Textbox4 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Изделие + + + + + + + Textbox6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + + Textbox8 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Статус + + + + + + + Textbox3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.79844cm + + + + + true + true + + + + + =Fields!Id.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PackageName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Status.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 1.88792cm + 1.59688cm + 19.01cm + 2 + + + + + + true + true + + + + + Итого: + + + + + + + Textbox10 + 4.01849cm + 10.4049cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + 2pt + 2pt + 2pt + 2pt + + + + 2in +