diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj b/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj index 21732a7..eb9a45f 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj +++ b/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj @@ -20,11 +20,13 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + + + diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs index 4889d10..cb3c202 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs @@ -32,6 +32,10 @@ this.справочникиToolStripMenuItem1 = 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.ComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ComponentsManufactueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.OrdersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dataGridView = new System.Windows.Forms.DataGridView(); this.buttonCreateOrder = new System.Windows.Forms.Button(); this.buttonnTakeOrderInWork = new System.Windows.Forms.Button(); @@ -46,7 +50,8 @@ // this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.справочникиToolStripMenuItem1}); + this.справочникиToolStripMenuItem1, + this.отчётыToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(920, 28); @@ -76,6 +81,37 @@ this.кузнечныеИзделияToolStripMenuItem.Text = "КузнечныеИзделия"; this.кузнечныеИзделияToolStripMenuItem.Click += new System.EventHandler(this.КузнечныеИзделияToolStripMenuItem_Click); // + // отчётыToolStripMenuItem + // + this.отчётыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ComponentsToolStripMenuItem, + this.ComponentsManufactueToolStripMenuItem, + this.OrdersToolStripMenuItem}); + this.отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem"; + this.отчётыToolStripMenuItem.Size = new System.Drawing.Size(73, 24); + this.отчётыToolStripMenuItem.Text = "Отчёты"; + // + // ComponentsToolStripMenuItem + // + this.ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem"; + this.ComponentsToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.ComponentsToolStripMenuItem.Text = "Список компонентов"; + this.ComponentsToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click); + // + // ComponentsManufactueToolStripMenuItem + // + this.ComponentsManufactueToolStripMenuItem.Name = "ComponentsManufactueToolStripMenuItem"; + this.ComponentsManufactueToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.ComponentsManufactueToolStripMenuItem.Text = "Компоненты по изделиям"; + this.ComponentsManufactueToolStripMenuItem.Click += new System.EventHandler(this.ComponentsManufactueToolStripMenuItem_Click); + // + // OrdersToolStripMenuItem + // + this.OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem"; + this.OrdersToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.OrdersToolStripMenuItem.Text = "Список заказов"; + this.OrdersToolStripMenuItem.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click); + // // dataGridView // this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight; @@ -172,5 +208,9 @@ private Button buttonRef; private ToolStripMenuItem компонентыToolStripMenuItem; private ToolStripMenuItem кузнечныеИзделияToolStripMenuItem; + private ToolStripMenuItem отчётыToolStripMenuItem; + private ToolStripMenuItem ComponentsToolStripMenuItem; + private ToolStripMenuItem ComponentsManufactueToolStripMenuItem; + private ToolStripMenuItem OrdersToolStripMenuItem; } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index 5665d5a..089135f 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -1,4 +1,5 @@ -using BlacksmithWorkshopContracts.BindingModels; +using BlacksmithWorkshopBusinessLogic.BusinessLogics; +using BlacksmithWorkshopContracts.BindingModels; using BlacksmithWorkshopContracts.BusinessLogicsContracts; using BlacksmithWorkshopDataModel.Enums; using Microsoft.Extensions.Logging; @@ -19,13 +20,14 @@ namespace BlacksmithWorkshop private readonly ILogger _logger; private readonly IOrderLogic _orderLogic; - public FormMain(ILogger logger, IOrderLogic orderLogic) + IReportLogic _reportLogic; + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic) { InitializeComponent(); _logger = logger; _orderLogic = orderLogic; LoadData(); - + _reportLogic = reportLogic; } private void FormMain_Load(object sender, EventArgs e) @@ -200,6 +202,40 @@ namespace BlacksmithWorkshop LoadData(); } - + + private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveComponentsToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + + } + + private void ComponentsManufactueToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = +Program.ServiceProvider?.GetService(typeof(FormReportManufactureComponents)); + if (service is FormReportManufactureComponents form) + { + form.ShowDialog(); + } + } + + private void OrdersToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = +Program.ServiceProvider?.GetService(typeof(FormReportOrders)); + if (service is FormReportOrders form) + { + form.ShowDialog(); + } + } } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.Designer.cs new file mode 100644 index 0000000..3884194 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.Designer.cs @@ -0,0 +1,105 @@ +namespace BlacksmithWorkshop +{ + partial class FormReportManufactureComponents + { + /// + /// 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() + { + dataGridView = new DataGridView(); + buttonSaveToExcel = new Button(); + ColumnManufacture = new DataGridViewTextBoxColumn(); + ColumnComponent = new DataGridViewTextBoxColumn(); + ColumnCount = new DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // dataGridView + // + dataGridView.BackgroundColor = SystemColors.ButtonFace; + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnManufacture, ColumnComponent, ColumnCount }); + dataGridView.Dock = DockStyle.Bottom; + dataGridView.Location = new Point(0, 76); + dataGridView.Name = "dataGridView"; + dataGridView.RowHeadersWidth = 51; + dataGridView.RowTemplate.Height = 29; + dataGridView.Size = new Size(564, 437); + dataGridView.TabIndex = 0; + // + // buttonSaveToExcel + // + buttonSaveToExcel.Location = new Point(23, 23); + buttonSaveToExcel.Name = "buttonSaveToExcel"; + buttonSaveToExcel.Size = new Size(166, 29); + buttonSaveToExcel.TabIndex = 1; + buttonSaveToExcel.Text = "Сохранить в Excel"; + buttonSaveToExcel.UseVisualStyleBackColor = true; + buttonSaveToExcel.Click += ButtonSaveToExcel_Click; + // + // ColumnManufacture + // + ColumnManufacture.HeaderText = "Изделие"; + ColumnManufacture.MinimumWidth = 6; + ColumnManufacture.Name = "ColumnManufacture"; + ColumnManufacture.Width = 125; + // + // ColumnComponent + // + ColumnComponent.HeaderText = "Компонент"; + ColumnComponent.MinimumWidth = 6; + ColumnComponent.Name = "ColumnComponent"; + ColumnComponent.Width = 125; + // + // ColumnCount + // + ColumnCount.HeaderText = "Количество"; + ColumnCount.MinimumWidth = 6; + ColumnCount.Name = "ColumnCount"; + ColumnCount.Width = 125; + // + // FormReportManufactureComponents + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(564, 513); + Controls.Add(buttonSaveToExcel); + Controls.Add(dataGridView); + Name = "FormReportManufactureComponents"; + Text = "FormReportManufactureComponents"; + Load += FormReportManufactureComponents_Load; + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridView; + private Button buttonSaveToExcel; + private DataGridViewTextBoxColumn ColumnManufacture; + private DataGridViewTextBoxColumn ColumnComponent; + private DataGridViewTextBoxColumn ColumnCount; + } +} \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.cs new file mode 100644 index 0000000..e519cbf --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.cs @@ -0,0 +1,96 @@ +using BlacksmithWorkshopContracts.BindingModels; +using BlacksmithWorkshopContracts.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 BlacksmithWorkshop +{ + public partial class FormReportManufactureComponents : Form + { + + private readonly ILogger _logger; + private readonly IReportLogic _logic; + public FormReportManufactureComponents(ILogger + logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + + } + private void FormReportManufactureComponents_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetManufactureComponent(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ManufactureName, +"", "" }); + 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); + } + } + private void ButtonSaveToExcel_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog + { + Filter = "xlsx|*.xlsx" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveManufactureComponentToExcelFile(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/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.resx b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.resx new file mode 100644 index 0000000..b2a3f9d --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureComponents.resx @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.Designer.cs new file mode 100644 index 0000000..5516f67 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.Designer.cs @@ -0,0 +1,129 @@ +namespace BlacksmithWorkshop +{ + 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() + { + panel = new Panel(); + ButtonToPdf = new Button(); + ButtonMake = new Button(); + dateTimePickerTo = new DateTimePicker(); + label2 = new Label(); + dateTimePickerFrom = new DateTimePicker(); + label1 = new Label(); + panel.SuspendLayout(); + SuspendLayout(); + // + // panel + // + panel.Controls.Add(ButtonToPdf); + panel.Controls.Add(ButtonMake); + panel.Controls.Add(dateTimePickerTo); + panel.Controls.Add(label2); + panel.Controls.Add(dateTimePickerFrom); + panel.Controls.Add(label1); + panel.Location = new Point(-6, 2); + panel.Name = "panel"; + panel.Size = new Size(943, 42); + panel.TabIndex = 0; + // + // ButtonToPdf + // + ButtonToPdf.Location = new Point(829, 8); + ButtonToPdf.Name = "ButtonToPdf"; + ButtonToPdf.Size = new Size(94, 29); + ButtonToPdf.TabIndex = 5; + ButtonToPdf.Text = "в PDF"; + ButtonToPdf.UseVisualStyleBackColor = true; + ButtonToPdf.Click += ButtonToPdf_Click; + // + // ButtonMake + // + ButtonMake.Location = new Point(550, 8); + ButtonMake.Name = "ButtonMake"; + ButtonMake.Size = new Size(128, 29); + ButtonMake.TabIndex = 4; + ButtonMake.Text = "Сформировать"; + ButtonMake.UseVisualStyleBackColor = true; + ButtonMake.Click += ButtonMake_Click; + // + // dateTimePickerTo + // + dateTimePickerTo.Location = new Point(269, 10); + dateTimePickerTo.Name = "dateTimePickerTo"; + dateTimePickerTo.Size = new Size(250, 27); + dateTimePickerTo.TabIndex = 3; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(236, 12); + label2.Name = "label2"; + label2.Size = new Size(27, 20); + label2.TabIndex = 2; + label2.Text = "по"; + // + // dateTimePickerFrom + // + dateTimePickerFrom.Location = new Point(42, 10); + dateTimePickerFrom.Name = "dateTimePickerFrom"; + dateTimePickerFrom.Size = new Size(188, 27); + dateTimePickerFrom.TabIndex = 1; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(20, 12); + label1.Name = "label1"; + label1.Size = new Size(16, 20); + label1.TabIndex = 0; + label1.Text = "с"; + // + // FormReportOrders + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(938, 450); + Controls.Add(panel); + Name = "FormReportOrders"; + Text = "FormReportOrders"; + panel.ResumeLayout(false); + panel.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private Panel panel; + private Label label2; + private DateTimePicker dateTimePickerFrom; + private Label label1; + private Button ButtonToPdf; + private Button ButtonMake; + private DateTimePicker dateTimePickerTo; + } +} \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs new file mode 100644 index 0000000..5eff4a4 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs @@ -0,0 +1,114 @@ +using BlacksmithWorkshopContracts.BindingModels; +using BlacksmithWorkshopContracts.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 BlacksmithWorkshop +{ + 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("C:\\Users\\User\\source\\repos\\BlacksmithWorkshop\\BlacksmithWorkshop\\BlacksmithWorkshop\\ReportOrders.rdlc", FileMode.Open)); + Controls.Clear(); + Controls.Add(panel); + Controls.Add(reportViewer); + + } + + private void ButtonMake_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 ButtonToPdf_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/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.resx b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs b/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs index c641ef7..8414299 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs @@ -1,4 +1,6 @@ using BlacksmithWorkshopBusinessLogic.BusinessLogics; +using BlacksmithWorkshopBusinessLogic.OfficePackage; +using BlacksmithWorkshopBusinessLogic.OfficePackage.Implements; using BlacksmithWorkshopContracts.BusinessLogicsContracts; using BlacksmithWorkshopContracts.StoragesContracts; using BlacksmithWorkshopDatabaseImplement.Implements; @@ -39,6 +41,13 @@ namespace BlacksmithWorkshop services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -46,6 +55,8 @@ namespace BlacksmithWorkshop services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IComponentLogic.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IComponentLogic.datasource new file mode 100644 index 0000000..e6e1a26 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IComponentLogic.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.BusinessLogicsContracts.IComponentLogic, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IManufactureLogic.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IManufactureLogic.datasource new file mode 100644 index 0000000..ed3589b --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IManufactureLogic.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.BusinessLogicsContracts.IManufactureLogic, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IOrderLogic.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IOrderLogic.datasource new file mode 100644 index 0000000..c5feb50 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IOrderLogic.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.BusinessLogicsContracts.IOrderLogic, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IReportLogic.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IReportLogic.datasource new file mode 100644 index 0000000..74859dd --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.BusinessLogicsContracts.IReportLogic.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.BusinessLogicsContracts.IReportLogic, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IComponentStorage.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IComponentStorage.datasource new file mode 100644 index 0000000..ac1e522 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IComponentStorage.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.StoragesContracts.IComponentStorage, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IManufactureStorage.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IManufactureStorage.datasource new file mode 100644 index 0000000..23ffd15 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IManufactureStorage.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.StoragesContracts.IManufactureStorage, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IOrderStorage.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IOrderStorage.datasource new file mode 100644 index 0000000..41448a7 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopContracts.StoragesContracts.IOrderStorage.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopContracts.StoragesContracts.IOrderStorage, BlacksmithWorkshopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.IId.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.IId.datasource new file mode 100644 index 0000000..d0cda50 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.IId.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopDataModel.IId, BlacksmithWorkshopDataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.Models.IComponentModel.datasource b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.Models.IComponentModel.datasource new file mode 100644 index 0000000..8be7998 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Properties/DataSources/BlacksmithWorkshopDataModel.Models.IComponentModel.datasource @@ -0,0 +1,10 @@ + + + + BlacksmithWorkshopDataModel.Models.IComponentModel, BlacksmithWorkshopDataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/ReportOrders.rdlc b/BlacksmithWorkshop/BlacksmithWorkshop/ReportOrders.rdlc new file mode 100644 index 0000000..17dc45d --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshop/ReportOrders.rdlc @@ -0,0 +1,591 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 605c80d0-7d6c-4474-934b-337c1a3114c7 + + + + + + BlacksmithWorkshopContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + ManufactureName + System.String + + + Sum + System.Decimal + + + OrderStatus + BlacksmithWorkshopDataModels.OrderStatus + + + + BlacksmithWorkshopContracts.ViewModels + ReportOrdersViewModel + BlacksmithWorkshopContracts.ViewModels.ReportOrdersViewModel, ConfectioneryContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + Заказы + + + + + + + Textbox1 + 0.61383cm + 1.03603cm + 16.51cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 1.73518cm + + + 3.66134cm + + + 3.87301cm + + + 2.5cm + + + 2.5cm + + + + + 0.76214cm + + + + + 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.76214cm + + + + + true + true + + + + + =Fields!Id.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ManufactureName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OrderStatus.Value + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.86342cm + 2.26483cm + 1.52428cm + 14.26953cm + 2 + + + + + + true + true + + + + + Итого + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + 2pt + 2pt + 2pt + 2pt + + + + 2.75in +