diff --git a/SushiBar/SushiBar/Forms/FormMain.Designer.cs b/SushiBar/SushiBar/Forms/FormMain.Designer.cs index 5482404..4e09e00 100644 --- a/SushiBar/SushiBar/Forms/FormMain.Designer.cs +++ b/SushiBar/SushiBar/Forms/FormMain.Designer.cs @@ -33,6 +33,10 @@ ToolStripMenuItem = new ToolStripMenuItem(); sushiToolStripMenuItem = new ToolStripMenuItem(); componentsToolStripMenuItem = new ToolStripMenuItem(); + отчётыToolStripMenuItem = new ToolStripMenuItem(); + sushisToolStripMenuItem = new ToolStripMenuItem(); + componentSushisToolStripMenuItem = new ToolStripMenuItem(); + ordersToolStripMenuItem = new ToolStripMenuItem(); buttonCreateOrder = new Button(); buttonTakeOrderInWork = new Button(); buttonOrderReady = new Button(); @@ -56,7 +60,7 @@ // menuStrip1 // menuStrip1.ImageScalingSize = new Size(20, 20); - menuStrip1.Items.AddRange(new ToolStripItem[] { ToolStripMenuItem }); + menuStrip1.Items.AddRange(new ToolStripItem[] { ToolStripMenuItem, отчётыToolStripMenuItem }); menuStrip1.Location = new Point(0, 0); menuStrip1.Name = "menuStrip1"; menuStrip1.Size = new Size(1190, 28); @@ -84,6 +88,34 @@ componentsToolStripMenuItem.Text = "Компоненты"; componentsToolStripMenuItem.Click += componentsToolStripMenuItem_Click; // + // отчётыToolStripMenuItem + // + отчётыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { sushisToolStripMenuItem, componentSushisToolStripMenuItem, ordersToolStripMenuItem }); + отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem"; + отчётыToolStripMenuItem.Size = new Size(73, 24); + отчётыToolStripMenuItem.Text = "Отчёты"; + // + // sushisToolStripMenuItem + // + sushisToolStripMenuItem.Name = "sushisToolStripMenuItem"; + sushisToolStripMenuItem.Size = new Size(276, 26); + sushisToolStripMenuItem.Text = "Список суши"; + sushisToolStripMenuItem.Click += sushisToolStripMenuItem_Click; + // + // componentSushisToolStripMenuItem + // + componentSushisToolStripMenuItem.Name = "componentSushisToolStripMenuItem"; + componentSushisToolStripMenuItem.Size = new Size(276, 26); + componentSushisToolStripMenuItem.Text = "Компоненты по изделиям"; + componentSushisToolStripMenuItem.Click += componentSushisToolStripMenuItem_Click; + // + // ordersToolStripMenuItem + // + ordersToolStripMenuItem.Name = "ordersToolStripMenuItem"; + ordersToolStripMenuItem.Size = new Size(276, 26); + ordersToolStripMenuItem.Text = "Список заказов"; + ordersToolStripMenuItem.Click += ordersToolStripMenuItem_Click; + // // buttonCreateOrder // buttonCreateOrder.Location = new Point(998, 50); @@ -169,5 +201,9 @@ private ToolStripMenuItem ToolStripMenuItem; private ToolStripMenuItem sushiToolStripMenuItem; private ToolStripMenuItem componentsToolStripMenuItem; + private ToolStripMenuItem отчётыToolStripMenuItem; + private ToolStripMenuItem sushisToolStripMenuItem; + private ToolStripMenuItem componentSushisToolStripMenuItem; + private ToolStripMenuItem ordersToolStripMenuItem; } } \ No newline at end of file diff --git a/SushiBar/SushiBar/Forms/FormMain.cs b/SushiBar/SushiBar/Forms/FormMain.cs index f9a5708..9972754 100644 --- a/SushiBar/SushiBar/Forms/FormMain.cs +++ b/SushiBar/SushiBar/Forms/FormMain.cs @@ -36,5 +36,20 @@ { ComponentsToolStripMenuItem_Click(sender, e); } + + private void componentSushisToolStripMenuItem_Click(object sender, EventArgs e) + { + ComponentSushisToolStripMenuItem_Click(sender, e); + } + + private void ordersToolStripMenuItem_Click(object sender, EventArgs e) + { + OrdersToolStripMenuItem_Click(sender, e); + } + + private void sushisToolStripMenuItem_Click(object sender, EventArgs e) + { + SushisToolStripMenuItem_Click(sender, e); + } } } diff --git a/SushiBar/SushiBar/Forms/FormMainLogic.cs b/SushiBar/SushiBar/Forms/FormMainLogic.cs index 7d96481..d9465b8 100644 --- a/SushiBar/SushiBar/Forms/FormMainLogic.cs +++ b/SushiBar/SushiBar/Forms/FormMainLogic.cs @@ -11,11 +11,14 @@ namespace SushiBar.Forms { private readonly ILogger _logger; private readonly IOrderLogic _orderLogic; - public FormMain(ILogger logger, IOrderLogic orderLogic) + private IReportLogic _reportLogic; + + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic) { InitializeComponent(); _logger = logger; _orderLogic = orderLogic; + _reportLogic = reportLogic; } private void FormMain_Load(object sender, EventArgs e) { @@ -136,5 +139,34 @@ namespace SushiBar.Forms { LoadData(); } + private void SushisToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveSushisToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + private void ComponentSushisToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportSushiComponents)); + if (service is FormReportSushiComponents 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/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs b/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs new file mode 100644 index 0000000..8b51318 --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportOrders.Designer.cs @@ -0,0 +1,130 @@ +namespace SushiBar.Forms +{ + 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(); + label2 = new Label(); + label1 = new Label(); + dateTimePickerTo = new DateTimePicker(); + dateTimePickerFrom = new DateTimePicker(); + buttonToPdf = new Button(); + buttonMake = new Button(); + panel.SuspendLayout(); + SuspendLayout(); + // + // panel + // + panel.Controls.Add(label2); + panel.Controls.Add(label1); + panel.Controls.Add(dateTimePickerTo); + panel.Controls.Add(dateTimePickerFrom); + panel.Controls.Add(buttonToPdf); + panel.Controls.Add(buttonMake); + panel.Dock = DockStyle.Top; + panel.Location = new Point(0, 0); + panel.Name = "panel"; + panel.Size = new Size(800, 51); + panel.TabIndex = 0; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(272, 19); + label2.Name = "label2"; + label2.Size = new Size(27, 20); + label2.TabIndex = 5; + label2.Text = "по"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(22, 19); + label1.Name = "label1"; + label1.Size = new Size(18, 20); + label1.TabIndex = 4; + label1.Text = "С"; + // + // dateTimePickerTo + // + dateTimePickerTo.Location = new Point(320, 14); + dateTimePickerTo.Name = "dateTimePickerTo"; + dateTimePickerTo.Size = new Size(192, 27); + dateTimePickerTo.TabIndex = 3; + // + // dateTimePickerFrom + // + dateTimePickerFrom.Location = new Point(61, 14); + dateTimePickerFrom.Name = "dateTimePickerFrom"; + dateTimePickerFrom.Size = new Size(192, 27); + dateTimePickerFrom.TabIndex = 2; + // + // buttonToPdf + // + buttonToPdf.Location = new Point(694, 12); + buttonToPdf.Name = "buttonToPdf"; + buttonToPdf.Size = new Size(94, 29); + buttonToPdf.TabIndex = 1; + buttonToPdf.Text = "В PdF"; + buttonToPdf.UseVisualStyleBackColor = true; + buttonToPdf.Click += buttonToPdf_Click; + // + // buttonMake + // + buttonMake.Location = new Point(534, 12); + buttonMake.Name = "buttonMake"; + buttonMake.Size = new Size(154, 29); + buttonMake.TabIndex = 0; + buttonMake.Text = "Сформировать"; + buttonMake.UseVisualStyleBackColor = true; + buttonMake.Click += buttonMake_Click; + // + // FormReportOrders + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panel); + Name = "FormReportOrders"; + Text = "FormReportOrders"; + panel.ResumeLayout(false); + panel.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private Panel panel; + private Button buttonToPdf; + private Button buttonMake; + private DateTimePicker dateTimePickerTo; + private DateTimePicker dateTimePickerFrom; + private Label label1; + private Label label2; + } +} \ No newline at end of file diff --git a/SushiBar/SushiBar/Forms/FormReportOrders.cs b/SushiBar/SushiBar/Forms/FormReportOrders.cs new file mode 100644 index 0000000..0b34390 --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportOrders.cs @@ -0,0 +1,25 @@ +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 SushiBar.Forms +{ + public partial class FormReportOrders + { + private void buttonMake_Click(object sender, EventArgs e) + { + ButtonMake_Click(sender, e); + } + + private void buttonToPdf_Click(object sender, EventArgs e) + { + ButtonToPdf_Click(sender, e); + } + } +} diff --git a/SushiBar/SushiBar/Forms/FormReportOrders.resx b/SushiBar/SushiBar/Forms/FormReportOrders.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/SushiBar/SushiBar/Forms/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/SushiBar/SushiBar/Forms/FormReportOrdersLogic.cs b/SushiBar/SushiBar/Forms/FormReportOrdersLogic.cs new file mode 100644 index 0000000..0f49af3 --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportOrdersLogic.cs @@ -0,0 +1,89 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; +using SushiBarContracts.BindingModels; +using SushiBarContracts.BusinessLogicsContracts; +using System.Windows.Forms; + +namespace SushiBar.Forms +{ + 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 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/SushiBar/SushiBar/Forms/FormReportSushiComponents.Designer.cs b/SushiBar/SushiBar/Forms/FormReportSushiComponents.Designer.cs new file mode 100644 index 0000000..ed3b55e --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportSushiComponents.Designer.cs @@ -0,0 +1,106 @@ +namespace SushiBar.Forms +{ + partial class FormReportSushiComponents + { + /// + /// 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() + { + buttonSaveToExcel = new Button(); + dataGridView = new DataGridView(); + Component = new DataGridViewTextBoxColumn(); + Sushi = new DataGridViewTextBoxColumn(); + Count = new DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // buttonSaveToExcel + // + buttonSaveToExcel.Location = new Point(11, 12); + buttonSaveToExcel.Name = "buttonSaveToExcel"; + buttonSaveToExcel.Size = new Size(234, 29); + buttonSaveToExcel.TabIndex = 0; + buttonSaveToExcel.Text = "Сохранить в Excel"; + buttonSaveToExcel.UseVisualStyleBackColor = true; + buttonSaveToExcel.Click += buttonSaveToExcel_Click; + // + // dataGridView + // + dataGridView.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText; + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Columns.AddRange(new DataGridViewColumn[] { Component, Sushi, Count }); + dataGridView.Location = new Point(11, 47); + dataGridView.MultiSelect = false; + dataGridView.Name = "dataGridView"; + dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; + dataGridView.RowTemplate.Height = 29; + dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridView.Size = new Size(883, 391); + dataGridView.TabIndex = 1; + // + // Component + // + Component.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + Component.HeaderText = "Компонент"; + Component.MinimumWidth = 6; + Component.Name = "Component"; + // + // Sushi + // + Sushi.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + Sushi.HeaderText = "Суши"; + Sushi.MinimumWidth = 6; + Sushi.Name = "Sushi"; + // + // Count + // + Count.HeaderText = "Количество"; + Count.MinimumWidth = 6; + Count.Name = "Count"; + Count.Width = 125; + // + // FormReportSushiComponents + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(909, 457); + Controls.Add(dataGridView); + Controls.Add(buttonSaveToExcel); + Name = "FormReportSushiComponents"; + Text = "FormReportSushiComponents"; + Load += FormReportSushiComponents_Load; + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + } + + #endregion + + private Button buttonSaveToExcel; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn Component; + private DataGridViewTextBoxColumn Sushi; + private DataGridViewTextBoxColumn Count; + } +} \ No newline at end of file diff --git a/SushiBar/SushiBar/Forms/FormReportSushiComponents.cs b/SushiBar/SushiBar/Forms/FormReportSushiComponents.cs new file mode 100644 index 0000000..ca59aed --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportSushiComponents.cs @@ -0,0 +1,10 @@ +namespace SushiBar.Forms +{ + public partial class FormReportSushiComponents + { + private void buttonSaveToExcel_Click(object sender, EventArgs e) + { + ButtonSaveToExcel_Click(sender, e); + } + } +} diff --git a/SushiBar/SushiBar/Forms/FormReportSushiComponents.resx b/SushiBar/SushiBar/Forms/FormReportSushiComponents.resx new file mode 100644 index 0000000..4086d67 --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportSushiComponents.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + \ No newline at end of file diff --git a/SushiBar/SushiBar/Forms/FormReportSushiComponentsLogic.cs b/SushiBar/SushiBar/Forms/FormReportSushiComponentsLogic.cs new file mode 100644 index 0000000..16f3951 --- /dev/null +++ b/SushiBar/SushiBar/Forms/FormReportSushiComponentsLogic.cs @@ -0,0 +1,73 @@ +using Microsoft.Extensions.Logging; +using SushiBarContracts.BindingModels; +using SushiBarContracts.BusinessLogicsContracts; +using System.Windows.Forms; + +namespace SushiBar.Forms +{ + public partial class FormReportSushiComponents : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + public FormReportSushiComponents(ILogger + logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + private void FormReportSushiComponents_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetSushiComponent(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ComponentName, "", "" }); + foreach (var listElem in elem.Sushis) + { + 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.SaveSushiComponentToExcelFile(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/SushiBar/SushiBar/Program.cs b/SushiBar/SushiBar/Program.cs index c16393c..2b7ab08 100644 --- a/SushiBar/SushiBar/Program.cs +++ b/SushiBar/SushiBar/Program.cs @@ -3,6 +3,8 @@ using Microsoft.Extensions.Logging; using NLog.Extensions.Logging; using SushiBar.Forms; using SushiBarBusinessLogic.BusinessLogics; +using SushiBarBusinessLogic.OfficePackage; +using SushiBarBusinessLogic.OfficePackage.Implements; using SushiBarContracts.BusinessLogicsContracts; using SushiBarContracts.StoragesContracts; using SushiBarDatabaseImplement.Implements; @@ -41,6 +43,7 @@ namespace SushiBar services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -49,6 +52,12 @@ namespace SushiBar services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } diff --git a/SushiBar/SushiBar/Report/ReportOrders.rdlc b/SushiBar/SushiBar/Report/ReportOrders.rdlc new file mode 100644 index 0000000..98fd84d --- /dev/null +++ b/SushiBar/SushiBar/Report/ReportOrders.rdlc @@ -0,0 +1,599 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 47cb53f0-7dde-4717-ba03-866a0bc4f4dd + + + + + + FishFactoryContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + CannedName + System.String + + + Sum + System.Decimal + + + OrderStatus + FishFactoryDataModels.OrderStatus + + + + FishFactoryContracts.ViewModels + ReportOrderViewModel + FishFactoryContracts.ViewModels.ReportOrderViewModel, FishFactoryContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + =Parameters!ReportParameterPeriod.Value + + + + + + + ReportParameterPeriod + 1cm + 1cm + 21cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Заказы + + + + + + + 1cm + 21cm + 1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.59525cm + + + 3.30963cm + + + 8.32842cm + + + 2.59525cm + + + 2.59525cm + + + + + 0.6cm + + + + + true + true + + + + + Номер + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Дата создания + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Суши + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Статус Заказа + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Id.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SushiName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OrderStatus.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.48391cm + 0.55245cm + 1.2cm + 19.4238cm + 2 + + + + + + true + true + + + + + Итого: + + + + + + + 4.21167cm + 14.97625cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + + + + + 4.21167cm + 17.47625cm + 0.6cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.72875cm +