From da6b1d58c80ec744b880390dc99b57f5b8ea1f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9?= Date: Sun, 23 Apr 2023 20:25:00 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=81=D0=BB=D0=BE=D0=B6=D0=BD=D1=91?= =?UTF-8?q?=D0=BD=D0=BD=D0=B0=D1=8F=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=E2=84=964:=20=D0=92?= =?UTF-8?q?=D1=80=D0=BE=D0=B4=D0=B5=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FlowerShop/FlowerShop/FormMain.Designer.cs | 46 +- FlowerShop/FlowerShop/FormMain.cs | 31 ++ .../FormReportDateOrders.Designer.cs | 90 ++++ FlowerShop/FlowerShop/FormReportDateOrders.cs | 73 +++ .../FlowerShop/FormReportDateOrders.resx | 60 +++ .../FormReportShopBouquets.Designer.cs | 110 +++++ .../FlowerShop/FormReportShopBouquets.cs | 78 ++++ .../FlowerShop/FormReportShopBouquets.resx | 66 +++ FlowerShop/FlowerShop/Program.cs | 2 + FlowerShop/FlowerShop/ReportOrders.rdlc | 1 - FlowerShop/FlowerShop/ReportOrdersByDate.rdlc | 424 ++++++++++++++++++ .../BusinessLogics/ReportLogic.cs | 79 +++- .../OfficePackage/AbstractSaveToExcel.cs | 70 +++ .../OfficePackage/AbstractSaveToPdf.cs | 40 ++ .../OfficePackage/AbstractSaveToWord.cs | 28 ++ .../OfficePackage/HelperModels/ExcelInfo.cs | 1 + .../OfficePackage/HelperModels/PdfInfo.cs | 1 + .../OfficePackage/HelperModels/WordInfo.cs | 1 + .../OfficePackage/HelperModels/WordTable.cs | 8 + .../OfficePackage/Implements/SaveToExcel.cs | 12 +- .../OfficePackage/Implements/SaveToWord.cs | 82 ++++ .../BusinessLogicsContracts/IReportLogic.cs | 10 + .../ViewModels/ReportDateOrdersViewModel.cs | 9 + .../ViewModels/ReportShopBouquetsViewModel.cs | 9 + 24 files changed, 1307 insertions(+), 24 deletions(-) create mode 100644 FlowerShop/FlowerShop/FormReportDateOrders.Designer.cs create mode 100644 FlowerShop/FlowerShop/FormReportDateOrders.cs create mode 100644 FlowerShop/FlowerShop/FormReportDateOrders.resx create mode 100644 FlowerShop/FlowerShop/FormReportShopBouquets.Designer.cs create mode 100644 FlowerShop/FlowerShop/FormReportShopBouquets.cs create mode 100644 FlowerShop/FlowerShop/FormReportShopBouquets.resx create mode 100644 FlowerShop/FlowerShop/ReportOrdersByDate.rdlc create mode 100644 FlowerShop/FlowerShopBusinessLogic/OfficePackage/HelperModels/WordTable.cs create mode 100644 FlowerShop/FlowerShopContracts/ViewModels/ReportDateOrdersViewModel.cs create mode 100644 FlowerShop/FlowerShopContracts/ViewModels/ReportShopBouquetsViewModel.cs diff --git a/FlowerShop/FlowerShop/FormMain.Designer.cs b/FlowerShop/FlowerShop/FormMain.Designer.cs index d8d8c14..1de98e2 100644 --- a/FlowerShop/FlowerShop/FormMain.Designer.cs +++ b/FlowerShop/FlowerShop/FormMain.Designer.cs @@ -38,11 +38,14 @@ this.guidesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.componentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bouquetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.shopsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.reportsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listOfBouquetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.componentsByBouquetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listOfOrdersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.shopsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.shopListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bouquetsInShopsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ordersByDateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.buttonSupplyShop = new System.Windows.Forms.Button(); this.buttonSellBouquets = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); @@ -152,12 +155,22 @@ this.bouquetsToolStripMenuItem.Text = "Букеты"; this.bouquetsToolStripMenuItem.Click += new System.EventHandler(this.bouquetsToolStripMenuItem_Click); // + // shopsToolStripMenuItem + // + this.shopsToolStripMenuItem.Name = "shopsToolStripMenuItem"; + this.shopsToolStripMenuItem.Size = new System.Drawing.Size(145, 22); + this.shopsToolStripMenuItem.Text = "Магазины"; + this.shopsToolStripMenuItem.Click += new System.EventHandler(this.shopsToolStripMenuItem_Click); + // // reportsToolStripMenuItem // this.reportsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.listOfBouquetsToolStripMenuItem, this.componentsByBouquetsToolStripMenuItem, - this.listOfOrdersToolStripMenuItem}); + this.listOfOrdersToolStripMenuItem, + this.shopListToolStripMenuItem, + this.bouquetsInShopsToolStripMenuItem, + this.ordersByDateToolStripMenuItem}); this.reportsToolStripMenuItem.Name = "reportsToolStripMenuItem"; this.reportsToolStripMenuItem.Size = new System.Drawing.Size(60, 22); this.reportsToolStripMenuItem.Text = "Отчёты"; @@ -182,13 +195,27 @@ this.listOfOrdersToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.listOfOrdersToolStripMenuItem.Text = "Список заказов"; this.listOfOrdersToolStripMenuItem.Click += new System.EventHandler(this.listOfOrdersToolStripMenuItem_Click); - // - // shopsToolStripMenuItem // - this.shopsToolStripMenuItem.Name = "shopsToolStripMenuItem"; - this.shopsToolStripMenuItem.Size = new System.Drawing.Size(145, 22); - this.shopsToolStripMenuItem.Text = "Магазины"; - this.shopsToolStripMenuItem.Click += new System.EventHandler(this.shopsToolStripMenuItem_Click); + // shopListToolStripMenuItem + // + this.shopListToolStripMenuItem.Name = "shopListToolStripMenuItem"; + this.shopListToolStripMenuItem.Size = new System.Drawing.Size(210, 22); + this.shopListToolStripMenuItem.Text = "Список магазинов"; + this.shopListToolStripMenuItem.Click += new System.EventHandler(this.shopListToolStripMenuItem_Click); + // + // bouquetsInShopsToolStripMenuItem + // + this.bouquetsInShopsToolStripMenuItem.Name = "bouquetsInShopsToolStripMenuItem"; + this.bouquetsInShopsToolStripMenuItem.Size = new System.Drawing.Size(210, 22); + this.bouquetsInShopsToolStripMenuItem.Text = "Букеты в магазинах"; + this.bouquetsInShopsToolStripMenuItem.Click += new System.EventHandler(this.bouquetsInShopsToolStripMenuItem_Click); + // + // ordersByDateToolStripMenuItem + // + this.ordersByDateToolStripMenuItem.Name = "ordersByDateToolStripMenuItem"; + this.ordersByDateToolStripMenuItem.Size = new System.Drawing.Size(210, 22); + this.ordersByDateToolStripMenuItem.Text = "Список заказов по дате"; + this.ordersByDateToolStripMenuItem.Click += new System.EventHandler(this.ordersByDateToolStripMenuItem_Click); // // buttonSupplyShop // @@ -256,5 +283,8 @@ private ToolStripMenuItem shopsToolStripMenuItem; private Button buttonSupplyShop; private Button buttonSellBouquets; + private ToolStripMenuItem shopListToolStripMenuItem; + private ToolStripMenuItem bouquetsInShopsToolStripMenuItem; + private ToolStripMenuItem ordersByDateToolStripMenuItem; } } \ No newline at end of file diff --git a/FlowerShop/FlowerShop/FormMain.cs b/FlowerShop/FlowerShop/FormMain.cs index ac721db..42b26ab 100644 --- a/FlowerShop/FlowerShop/FormMain.cs +++ b/FlowerShop/FlowerShop/FormMain.cs @@ -211,5 +211,36 @@ namespace FlowerShop form.ShowDialog(); } } + + private void shopListToolStripMenuItem_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 bouquetsInShopsToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportShopBouquets)); + if (service is FormReportShopBouquets form) + { + form.ShowDialog(); + } + } + + private void ordersByDateToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportDateOrders)); + if (service is FormReportDateOrders form) + { + form.ShowDialog(); + } + } } } diff --git a/FlowerShop/FlowerShop/FormReportDateOrders.Designer.cs b/FlowerShop/FlowerShop/FormReportDateOrders.Designer.cs new file mode 100644 index 0000000..5cb9af0 --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportDateOrders.Designer.cs @@ -0,0 +1,90 @@ +namespace FlowerShop +{ + 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.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(856, 52); + this.panel.TabIndex = 1; + // + // buttonCreateToPdf + // + this.buttonCreateToPdf.Location = new System.Drawing.Point(678, 11); + this.buttonCreateToPdf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonCreateToPdf.Name = "buttonCreateToPdf"; + this.buttonCreateToPdf.Size = new System.Drawing.Size(166, 29); + 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(485, 11); + this.buttonCreateReport.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonCreateReport.Name = "buttonCreateReport"; + this.buttonCreateReport.Size = new System.Drawing.Size(166, 29); + 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(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(856, 338); + this.Controls.Add(this.panel); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + 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/FlowerShop/FlowerShop/FormReportDateOrders.cs b/FlowerShop/FlowerShop/FormReportDateOrders.cs new file mode 100644 index 0000000..897e342 --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportDateOrders.cs @@ -0,0 +1,73 @@ +using FlowerShopContracts.BindingModels; +using FlowerShopContracts.BusinessLogicsContracts; +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; + +namespace FlowerShop +{ + 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("Loading list of orders by date"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error during loading list of orders by date"); + 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("Saving list of orders by date"); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error during saving list of orders by date"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } +} diff --git a/FlowerShop/FlowerShop/FormReportDateOrders.resx b/FlowerShop/FlowerShop/FormReportDateOrders.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportDateOrders.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/FlowerShop/FlowerShop/FormReportShopBouquets.Designer.cs b/FlowerShop/FlowerShop/FormReportShopBouquets.Designer.cs new file mode 100644 index 0000000..e5c77e9 --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportShopBouquets.Designer.cs @@ -0,0 +1,110 @@ +namespace FlowerShop +{ + partial class FormReportShopBouquets + { + /// + /// 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.Bouquet = 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(10, 6); + this.buttonSaveToExcel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonSaveToExcel.Name = "buttonSaveToExcel"; + this.buttonSaveToExcel.Size = new System.Drawing.Size(154, 35); + 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.Bouquet, + this.Count}); + this.dataGridView.Location = new System.Drawing.Point(10, 45); + this.dataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.dataGridView.Name = "dataGridView"; + this.dataGridView.RowHeadersWidth = 51; + this.dataGridView.RowTemplate.Height = 29; + this.dataGridView.Size = new System.Drawing.Size(679, 283); + this.dataGridView.TabIndex = 1; + // + // Shop + // + this.Shop.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Shop.HeaderText = "Магазин"; + this.Shop.MinimumWidth = 6; + this.Shop.Name = "Shop"; + // + // Bouquet + // + this.Bouquet.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Bouquet.HeaderText = "Букет"; + this.Bouquet.MinimumWidth = 6; + this.Bouquet.Name = "Bouquet"; + // + // Count + // + this.Count.HeaderText = "Количество"; + this.Count.MinimumWidth = 6; + this.Count.Name = "Count"; + this.Count.Width = 125; + // + // FormReportShopBouquets + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(700, 338); + this.Controls.Add(this.dataGridView); + this.Controls.Add(this.buttonSaveToExcel); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "FormReportShopBouquets"; + this.Text = "Букеты в магазинах"; + this.Load += new System.EventHandler(this.FormReportShopBouquets_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Button buttonSaveToExcel; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn Shop; + private DataGridViewTextBoxColumn Bouquet; + private DataGridViewTextBoxColumn Count; + } +} \ No newline at end of file diff --git a/FlowerShop/FlowerShop/FormReportShopBouquets.cs b/FlowerShop/FlowerShop/FormReportShopBouquets.cs new file mode 100644 index 0000000..6049db0 --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportShopBouquets.cs @@ -0,0 +1,78 @@ +using FlowerShopContracts.BindingModels; +using FlowerShopContracts.BusinessLogicsContracts; +using Microsoft.Extensions.Logging; + +namespace FlowerShop +{ + public partial class FormReportShopBouquets : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + + public FormReportShopBouquets(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.SaveShopBouquetsToExcelFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + _logger.LogInformation("Saving list of shops with bouquets"); + + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error during saving list of shops with bouquets"); + + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void FormReportShopBouquets_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetShopBouquets(); + if (dict != null) + { + dataGridView.Rows.Clear(); + + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" }); + + foreach (var listElem in elem.Bouquets) + { + dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 }); + } + + dataGridView.Rows.Add(new object[] { "Всего:", "", elem.Count }); + dataGridView.Rows.Add(Array.Empty()); + } + } + _logger.LogInformation("Loading list of shops with bouquets"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error during loading list of shops with bouquets"); + + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} diff --git a/FlowerShop/FlowerShop/FormReportShopBouquets.resx b/FlowerShop/FlowerShop/FormReportShopBouquets.resx new file mode 100644 index 0000000..5ba3b69 --- /dev/null +++ b/FlowerShop/FlowerShop/FormReportShopBouquets.resx @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/FlowerShop/FlowerShop/Program.cs b/FlowerShop/FlowerShop/Program.cs index 72a6540..7b1a5b0 100644 --- a/FlowerShop/FlowerShop/Program.cs +++ b/FlowerShop/FlowerShop/Program.cs @@ -59,6 +59,8 @@ namespace FlowerShop services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file diff --git a/FlowerShop/FlowerShop/ReportOrders.rdlc b/FlowerShop/FlowerShop/ReportOrders.rdlc index 7cb822f..60a9f28 100644 --- a/FlowerShop/FlowerShop/ReportOrders.rdlc +++ b/FlowerShop/FlowerShop/ReportOrders.rdlc @@ -297,7 +297,6 @@ 2pt - true diff --git a/FlowerShop/FlowerShop/ReportOrdersByDate.rdlc b/FlowerShop/FlowerShop/ReportOrdersByDate.rdlc new file mode 100644 index 0000000..2159f4a --- /dev/null +++ b/FlowerShop/FlowerShop/ReportOrdersByDate.rdlc @@ -0,0 +1,424 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 10791c83-cee8-4a38-bbd0-245fc17cefb3 + + + + + + FlowerShopContractsViewModels + /* Local Query */ + + + + DateCreate + System.DateTime + + + CountOrders + System.Decimal + + + SumOrders + System.Double + + + + FlowerShopContracts.ViewModels + ReportDateOrdersViewModel + FlowerShopContracts.ViewModels.ReportDateOrdersViewModel, FlowerShopContracts, 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 +