diff --git a/SushiBar/SushiBar/FormMain.Designer.cs b/SushiBar/SushiBar/FormMain.Designer.cs index d372812..3c4ab1d 100644 --- a/SushiBar/SushiBar/FormMain.Designer.cs +++ b/SushiBar/SushiBar/FormMain.Designer.cs @@ -33,6 +33,10 @@ this.directoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.componentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sushiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reportsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.listComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.componentsOnSushiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.listOrdersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.buttonCreateOrder = new System.Windows.Forms.Button(); this.buttonSubmit = new System.Windows.Forms.Button(); this.buttonReady = new System.Windows.Forms.Button(); @@ -54,7 +58,8 @@ // menuStrip1 // this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.directoryToolStripMenuItem}); + this.directoryToolStripMenuItem, + this.reportsToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(940, 24); @@ -84,6 +89,37 @@ this.sushiToolStripMenuItem.Text = "Sushi"; this.sushiToolStripMenuItem.Click += new System.EventHandler(this.SushiToolStripMenuItem_Click); // + // reportsToolStripMenuItem + // + this.reportsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.listComponentsToolStripMenuItem, + this.componentsOnSushiToolStripMenuItem, + this.listOrdersToolStripMenuItem}); + this.reportsToolStripMenuItem.Name = "reportsToolStripMenuItem"; + this.reportsToolStripMenuItem.Size = new System.Drawing.Size(59, 20); + this.reportsToolStripMenuItem.Text = "Reports"; + // + // listComponentsToolStripMenuItem + // + this.listComponentsToolStripMenuItem.Name = "listComponentsToolStripMenuItem"; + this.listComponentsToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.listComponentsToolStripMenuItem.Text = "List Sushi"; + this.listComponentsToolStripMenuItem.Click += new System.EventHandler(this.ListComponentsToolStripMenuItem_Click); + // + // componentsOnSushiToolStripMenuItem + // + this.componentsOnSushiToolStripMenuItem.Name = "componentsOnSushiToolStripMenuItem"; + this.componentsOnSushiToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.componentsOnSushiToolStripMenuItem.Text = "Components on sushi"; + this.componentsOnSushiToolStripMenuItem.Click += new System.EventHandler(this.ComponentsOnSushiToolStripMenuItem_Click); + // + // listOrdersToolStripMenuItem + // + this.listOrdersToolStripMenuItem.Name = "listOrdersToolStripMenuItem"; + this.listOrdersToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.listOrdersToolStripMenuItem.Text = "List Orders"; + this.listOrdersToolStripMenuItem.Click += new System.EventHandler(this.ListOrdersToolStripMenuItem_Click); + // // buttonCreateOrder // this.buttonCreateOrder.Location = new System.Drawing.Point(814, 27); @@ -170,5 +206,9 @@ private Button buttonReload; private ToolStripMenuItem componentsToolStripMenuItem; private ToolStripMenuItem sushiToolStripMenuItem; + private ToolStripMenuItem reportsToolStripMenuItem; + private ToolStripMenuItem listComponentsToolStripMenuItem; + private ToolStripMenuItem componentsOnSushiToolStripMenuItem; + private ToolStripMenuItem listOrdersToolStripMenuItem; } } \ No newline at end of file diff --git a/SushiBar/SushiBar/FormMain.cs b/SushiBar/SushiBar/FormMain.cs index b25ada8..ec7bade 100644 --- a/SushiBar/SushiBar/FormMain.cs +++ b/SushiBar/SushiBar/FormMain.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.Logging; +using SushiBarBusinessLogic.BusinessLogics; using SushiBarContracts.BindingModels; using SushiBarContracts.BusinessLogicsContracts; using SushiBarDataModels.Enums; @@ -10,11 +11,13 @@ namespace SushiBar private readonly ILogger _logger; private readonly IOrderLogic _orderLogic; - public FormMain(ILogger logger, IOrderLogic orderLogic) + private readonly IReportLogic _reportLogic; + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic) { InitializeComponent(); _logger = logger; _orderLogic = orderLogic; + _reportLogic = reportLogic; } private void LoadData() @@ -170,5 +173,38 @@ namespace SushiBar form.ShowDialog(); } } + + private void ListComponentsToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveSushiToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Complete", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void ComponentsOnSushiToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormSushiOnComponents)); + if (service is FormSushiOnComponents form) + { + form.ShowDialog(); + } + + } + + private void ListOrdersToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders)); + if (service is FormReportOrders form) + { + form.ShowDialog(); + } + + } } } diff --git a/SushiBar/SushiBar/FormReportOrders.Designer.cs b/SushiBar/SushiBar/FormReportOrders.Designer.cs new file mode 100644 index 0000000..4d3641d --- /dev/null +++ b/SushiBar/SushiBar/FormReportOrders.Designer.cs @@ -0,0 +1,131 @@ +namespace SushiBar +{ + 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.panel = new System.Windows.Forms.Panel(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.buttonSave = new System.Windows.Forms.Button(); + this.labelTo = new System.Windows.Forms.Label(); + this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker(); + this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); + this.labelFrom = new System.Windows.Forms.Label(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // panel + // + this.panel.Controls.Add(this.buttonCreate); + this.panel.Controls.Add(this.buttonSave); + this.panel.Controls.Add(this.labelTo); + this.panel.Controls.Add(this.dateTimePickerTo); + this.panel.Controls.Add(this.dateTimePickerFrom); + this.panel.Controls.Add(this.labelFrom); + 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, 37); + this.panel.TabIndex = 0; + // + // buttonCreate + // + this.buttonCreate.Location = new System.Drawing.Point(617, 7); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(75, 23); + this.buttonCreate.TabIndex = 5; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.ButtonCreate_Click); + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(698, 7); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(75, 23); + this.buttonSave.TabIndex = 4; + this.buttonSave.Text = "Save PDF"; + this.buttonSave.UseVisualStyleBackColor = true; + this.buttonSave.Click += new System.EventHandler(this.ButtonSave_Click); + // + // labelTo + // + this.labelTo.AutoSize = true; + this.labelTo.Location = new System.Drawing.Point(250, 11); + this.labelTo.Name = "labelTo"; + this.labelTo.Size = new System.Drawing.Size(19, 15); + this.labelTo.TabIndex = 3; + this.labelTo.Text = "To"; + // + // dateTimePickerTo + // + this.dateTimePickerTo.Location = new System.Drawing.Point(275, 5); + this.dateTimePickerTo.Name = "dateTimePickerTo"; + this.dateTimePickerTo.Size = new System.Drawing.Size(200, 23); + this.dateTimePickerTo.TabIndex = 2; + // + // dateTimePickerFrom + // + this.dateTimePickerFrom.Location = new System.Drawing.Point(44, 5); + this.dateTimePickerFrom.Name = "dateTimePickerFrom"; + this.dateTimePickerFrom.Size = new System.Drawing.Size(200, 23); + this.dateTimePickerFrom.TabIndex = 1; + // + // labelFrom + // + this.labelFrom.AutoSize = true; + this.labelFrom.Location = new System.Drawing.Point(3, 11); + this.labelFrom.Name = "labelFrom"; + this.labelFrom.Size = new System.Drawing.Size(35, 15); + this.labelFrom.TabIndex = 0; + this.labelFrom.Text = "From"; + // + // 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 = "FormReportsOrders"; + this.panel.ResumeLayout(false); + this.panel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Panel panel; + private Button buttonCreate; + private Button buttonSave; + private Label labelTo; + private DateTimePicker dateTimePickerTo; + private DateTimePicker dateTimePickerFrom; + private Label labelFrom; + } +} \ No newline at end of file diff --git a/SushiBar/SushiBar/FormReportOrders.cs b/SushiBar/SushiBar/FormReportOrders.cs new file mode 100644 index 0000000..af06e89 --- /dev/null +++ b/SushiBar/SushiBar/FormReportOrders.cs @@ -0,0 +1,100 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; +using SushiBarContracts.BindingModels; +using SushiBarContracts.BusinessLogicsContracts; +using System.Windows.Forms; + +namespace SushiBar +{ + 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("Report.rdlc", FileMode.Open)); + Controls.Clear(); + Controls.Add(reportViewer); + Controls.Add(panel); + } + + private void ButtonCreate_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 ButtonSave_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/FormReportOrders.resx b/SushiBar/SushiBar/FormReportOrders.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/SushiBar/SushiBar/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/SushiBar/SushiBar/FormSushiOnComponents.Designer.cs b/SushiBar/SushiBar/FormSushiOnComponents.Designer.cs new file mode 100644 index 0000000..d697e29 --- /dev/null +++ b/SushiBar/SushiBar/FormSushiOnComponents.Designer.cs @@ -0,0 +1,101 @@ +namespace SushiBar +{ + partial class FormSushiOnComponents + { + /// + /// 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.ButtonSave = new System.Windows.Forms.Button(); + this.dataGridView = new System.Windows.Forms.DataGridView(); + this.component = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.sushi = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + this.SuspendLayout(); + // + // ButtonSave + // + this.ButtonSave.Location = new System.Drawing.Point(12, 12); + this.ButtonSave.Name = "ButtonSave"; + this.ButtonSave.Size = new System.Drawing.Size(155, 23); + this.ButtonSave.TabIndex = 0; + this.ButtonSave.Text = "Save excel file"; + this.ButtonSave.UseVisualStyleBackColor = true; + this.ButtonSave.Click += new System.EventHandler(this.ButtonSave_Click); + // + // dataGridView + // + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.component, + this.sushi, + this.count}); + this.dataGridView.Location = new System.Drawing.Point(12, 41); + this.dataGridView.Name = "dataGridView"; + this.dataGridView.RowTemplate.Height = 25; + this.dataGridView.Size = new System.Drawing.Size(776, 397); + this.dataGridView.TabIndex = 1; + // + // component + // + this.component.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.component.HeaderText = "Components"; + this.component.Name = "component"; + // + // sushi + // + this.sushi.HeaderText = "Sushis"; + this.sushi.Name = "sushi"; + // + // count + // + this.count.HeaderText = "Count"; + this.count.Name = "count"; + // + // FormComponentsOnSushi + // + 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.dataGridView); + this.Controls.Add(this.ButtonSave); + this.Name = "FormComponentsOnSushi"; + this.Text = "FormComponentsOnSushi"; + this.Load += new System.EventHandler(this.FormComponentsOnSushi_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Button ButtonSave; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn component; + private DataGridViewTextBoxColumn sushi; + private DataGridViewTextBoxColumn count; + } +} \ No newline at end of file diff --git a/SushiBar/SushiBar/FormSushiOnComponents.cs b/SushiBar/SushiBar/FormSushiOnComponents.cs new file mode 100644 index 0000000..c00e8b3 --- /dev/null +++ b/SushiBar/SushiBar/FormSushiOnComponents.cs @@ -0,0 +1,77 @@ +using Microsoft.Extensions.Logging; +using SushiBarContracts.BindingModels; +using SushiBarContracts.BusinessLogicsContracts; + +namespace SushiBar +{ + public partial class FormSushiOnComponents : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + + public FormSushiOnComponents(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + + private void ButtonSave_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("Saving list sushi on components"); + + MessageBox.Show("Success", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения списка изделий по компонентам"); + + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + private void FormComponentsOnSushi_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetSushi(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.SushiName, "", "" }); + foreach (var listElem in elem.Components) + { + dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 }); + } + dataGridView.Rows.Add(new object[] { "Count", "", elem.TotalCount }); + dataGridView.Rows.Add(Array.Empty()); + } + } + _logger.LogInformation("Load list sushi on components"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error on load list sushi on components"); + + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} diff --git a/SushiBar/SushiBar/FormSushiOnComponents.resx b/SushiBar/SushiBar/FormSushiOnComponents.resx new file mode 100644 index 0000000..20d81ef --- /dev/null +++ b/SushiBar/SushiBar/FormSushiOnComponents.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/SushiBar/SushiBar/Program.cs b/SushiBar/SushiBar/Program.cs index af6a63d..5926f34 100644 --- a/SushiBar/SushiBar/Program.cs +++ b/SushiBar/SushiBar/Program.cs @@ -2,6 +2,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NLog.Extensions.Logging; using SushiBarBusinessLogic.BusinessLogics; +using SushiBarBusinessLogic.OfficePackage; +using SushiBarBusinessLogic.OfficePackage.Implements; using SushiBarContracts.BusinessLogicsContracts; using SushiBarContracts.StoragesContracts; using SushiBarDatabaseImplement.Implements; @@ -35,6 +37,10 @@ namespace SushiBar services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -42,6 +48,8 @@ namespace SushiBar services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); } } } \ No newline at end of file diff --git a/SushiBar/SushiBar/Properties/Resources.Designer.cs b/SushiBar/SushiBar/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1a1679c --- /dev/null +++ b/SushiBar/SushiBar/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace SushiBar.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SushiBar.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/SushiBar/SushiBar/Properties/Resources.resx b/SushiBar/SushiBar/Properties/Resources.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SushiBar/SushiBar/Properties/Resources.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/Report.rdlc b/SushiBar/SushiBar/Report.rdlc new file mode 100644 index 0000000..5c19f05 --- /dev/null +++ b/SushiBar/SushiBar/Report.rdlc @@ -0,0 +1,588 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + bf577a27-98a7-43b2-8beb-1a37d37ce5cd + + + + + + SushiBarContractsViewModel + /* Local Query */ + + + + Count + System.Int32 + + + DateCreate + System.DateTime + + + IceCreamName + System.String + + + Status + System.String + + + Sum + System.Decimal + + + + SushiBarContracts.ViewModels + ReportOrderViewModel + SushiBarContracts.ViewModels.ReportOrderViewModel, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + Orders + + + + + + + Textbox1 + 0.99688cm + 21.51cm + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.26521cm + + + 5.26521cm + + + 5.26521cm + + + 2.26188cm + + + 2.26188cm + + + + + 2.22236cm + + + + + true + true + + + + + Id + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Date Create + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sushi Name + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Status + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sum + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 2.22236cm + + + + + true + true + + + + + =Fields!Count.Value + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SushiName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Status.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.4609cm + 0.60854cm + 4.44472cm + 20.31939cm + 1 + + + + + + true + true + + + + + =Parameters!ReportParameterPeriod.Value + + + + + + + Textbox12 + 1.42557cm + 0.65292cm + 21.51cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + 2pt + 2pt + 2pt + 2pt + + + + 3.22917in +