diff --git a/Bar/1.docx b/Bar/1.docx new file mode 100644 index 0000000..6f15e9a Binary files /dev/null and b/Bar/1.docx differ diff --git a/Bar/1.pdf b/Bar/1.pdf new file mode 100644 index 0000000..8a09275 Binary files /dev/null and b/Bar/1.pdf differ diff --git a/Bar/1.xlsx b/Bar/1.xlsx new file mode 100644 index 0000000..e180f89 Binary files /dev/null and b/Bar/1.xlsx differ diff --git a/Bar/Bar/BarView.csproj b/Bar/Bar/BarView.csproj index 8ba9294..8aa7ae5 100644 --- a/Bar/Bar/BarView.csproj +++ b/Bar/Bar/BarView.csproj @@ -11,14 +11,21 @@ - + + + + + Always + + + \ No newline at end of file diff --git a/Bar/Bar/DataSources/BarContracts.BusinessLogicContracts.ICocktailLogic.datasource b/Bar/Bar/DataSources/BarContracts.BusinessLogicContracts.ICocktailLogic.datasource new file mode 100644 index 0000000..70422a1 --- /dev/null +++ b/Bar/Bar/DataSources/BarContracts.BusinessLogicContracts.ICocktailLogic.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.BusinessLogicContracts.ICocktailLogic, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/FormMain.Designer.cs b/Bar/Bar/FormMain.Designer.cs index 59d2b32..a69ba79 100644 --- a/Bar/Bar/FormMain.Designer.cs +++ b/Bar/Bar/FormMain.Designer.cs @@ -38,6 +38,10 @@ this.ToolStripMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ComponentsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CocktailStripMenuItem = 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.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -106,7 +110,8 @@ // this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenu}); + this.ToolStripMenu, + this.отчётыToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1279, 28); @@ -136,6 +141,37 @@ this.CocktailStripMenuItem.Text = "Коктейль"; this.CocktailStripMenuItem.Click += new System.EventHandler(this.CocktailsStripMenuItem_Click); // + // отчётыToolStripMenuItem + // + this.отчётыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.списокКомпонентовToolStripMenuItem, + this.компонентыПоИзделиямToolStripMenuItem, + this.списокЗаказовToolStripMenuItem}); + this.отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem"; + this.отчётыToolStripMenuItem.Size = new System.Drawing.Size(73, 24); + this.отчётыToolStripMenuItem.Text = "Отчёты"; + // + // списокКомпонентовToolStripMenuItem + // + this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem"; + this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов"; + this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click); + // + // компонентыПоИзделиямToolStripMenuItem + // + this.компонентыПоИзделиямToolStripMenuItem.Name = "компонентыПоИзделиямToolStripMenuItem"; + this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.компонентыПоИзделиямToolStripMenuItem.Text = "Компоненты по коктейлям"; + this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.ComponentCocktailToolStripMenuItem_Click); + // + // списокЗаказовToolStripMenuItem + // + this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem"; + this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(276, 26); + this.списокЗаказовToolStripMenuItem.Text = "Список заказов"; + this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click); + // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); @@ -171,5 +207,9 @@ private ToolStripMenuItem ToolStripMenu; private ToolStripMenuItem ComponentsStripMenuItem; private ToolStripMenuItem CocktailStripMenuItem; + private ToolStripMenuItem отчётыToolStripMenuItem; + private ToolStripMenuItem списокКомпонентовToolStripMenuItem; + private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem; + private ToolStripMenuItem списокЗаказовToolStripMenuItem; } } \ No newline at end of file diff --git a/Bar/Bar/FormMain.cs b/Bar/Bar/FormMain.cs index 7440c36..8413d32 100644 --- a/Bar/Bar/FormMain.cs +++ b/Bar/Bar/FormMain.cs @@ -9,12 +9,14 @@ namespace BarView { 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 FormMain_Load(object sender, EventArgs e) @@ -164,5 +166,35 @@ namespace BarView { 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 ComponentCocktailToolStripMenuItem_Click(object sender, EventArgs e) + { + var Service = Program.ServiceProvider?.GetService(typeof(FormReportCocktailComponents)); + + if (Service is FormReportCocktailComponents 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/Bar/Bar/Forms/FormReportCocktailComponents.Designer.cs b/Bar/Bar/Forms/FormReportCocktailComponents.Designer.cs new file mode 100644 index 0000000..7dcd6a6 --- /dev/null +++ b/Bar/Bar/Forms/FormReportCocktailComponents.Designer.cs @@ -0,0 +1,107 @@ +namespace BarView.Forms +{ + partial class FormReportCocktailComponents + { + /// + /// 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.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit(); + this.SuspendLayout(); + // + // ButtonSaveToExcel + // + this.ButtonSaveToExcel.Location = new System.Drawing.Point(31, 12); + this.ButtonSaveToExcel.Name = "ButtonSaveToExcel"; + this.ButtonSaveToExcel.Size = new System.Drawing.Size(162, 26); + 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.Column1, + this.Column2, + this.Column3}); + this.DataGridView.Location = new System.Drawing.Point(12, 56); + this.DataGridView.Name = "DataGridView"; + this.DataGridView.RowHeadersWidth = 51; + this.DataGridView.RowTemplate.Height = 29; + this.DataGridView.Size = new System.Drawing.Size(581, 368); + this.DataGridView.TabIndex = 1; + // + // Column1 + // + this.Column1.HeaderText = "Коктейль"; + this.Column1.MinimumWidth = 6; + this.Column1.Name = "Column1"; + this.Column1.Width = 125; + // + // Column2 + // + this.Column2.HeaderText = "Компонент"; + this.Column2.MinimumWidth = 6; + this.Column2.Name = "Column2"; + this.Column2.Width = 125; + // + // Column3 + // + this.Column3.HeaderText = "Количество"; + this.Column3.MinimumWidth = 6; + this.Column3.Name = "Column3"; + this.Column3.Width = 125; + // + // FormReportCocktailComponents + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.DataGridView); + this.Controls.Add(this.ButtonSaveToExcel); + this.Name = "FormReportCocktailComponents"; + this.Text = "FormReportCoctailComponents"; + this.Load += new System.EventHandler(this.FormReportCoctailComponents_Load); + ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Button ButtonSaveToExcel; + private DataGridView DataGridView; + private DataGridViewTextBoxColumn Column1; + private DataGridViewTextBoxColumn Column2; + private DataGridViewTextBoxColumn Column3; + } +} \ No newline at end of file diff --git a/Bar/Bar/Forms/FormReportCocktailComponents.cs b/Bar/Bar/Forms/FormReportCocktailComponents.cs new file mode 100644 index 0000000..0f84698 --- /dev/null +++ b/Bar/Bar/Forms/FormReportCocktailComponents.cs @@ -0,0 +1,75 @@ +using BarContracts.BindingModels; +using BarContracts.BusinessLogicContracts; +using Microsoft.Extensions.Logging; + +namespace BarView.Forms +{ + public partial class FormReportCocktailComponents : Form + { + private readonly ILogger _logger; + private readonly IReportLogic _logic; + + public FormReportCocktailComponents(ILogger Logger, IReportLogic Logic) + { + InitializeComponent(); + + _logger = Logger; + _logic = Logic; + } + + private void FormReportCoctailComponents_Load(object sender, EventArgs e) + { + try + { + var Dict = _logic.GetCocktailComponents(); + + if (Dict != null) + { + DataGridView.Rows.Clear(); + + foreach (var Elem in Dict) + { + DataGridView.Rows.Add(new object[] { Elem.CocktailName, "", "" }); + + 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.SaveCocktailComponentToExcelFile(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/Bar/Bar/Forms/FormReportCocktailComponents.resx b/Bar/Bar/Forms/FormReportCocktailComponents.resx new file mode 100644 index 0000000..cdfa6a5 --- /dev/null +++ b/Bar/Bar/Forms/FormReportCocktailComponents.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/Bar/Bar/Forms/FormReportOrders.Designer.cs b/Bar/Bar/Forms/FormReportOrders.Designer.cs new file mode 100644 index 0000000..7a7a9ed --- /dev/null +++ b/Bar/Bar/Forms/FormReportOrders.Designer.cs @@ -0,0 +1,131 @@ +namespace BarView.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() + { + this.Panel = new System.Windows.Forms.Panel(); + this.ToPdfButton = new System.Windows.Forms.Button(); + this.CreateButton = new System.Windows.Forms.Button(); + this.ToDateTimePicker = new System.Windows.Forms.DateTimePicker(); + this.ToLabel = new System.Windows.Forms.Label(); + this.FromDateTimePicker = new System.Windows.Forms.DateTimePicker(); + this.FromLabel = new System.Windows.Forms.Label(); + this.Panel.SuspendLayout(); + this.SuspendLayout(); + // + // Panel + // + this.Panel.Controls.Add(this.ToPdfButton); + this.Panel.Controls.Add(this.CreateButton); + this.Panel.Controls.Add(this.ToDateTimePicker); + this.Panel.Controls.Add(this.ToLabel); + this.Panel.Controls.Add(this.FromDateTimePicker); + this.Panel.Controls.Add(this.FromLabel); + 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(1105, 52); + this.Panel.TabIndex = 0; + // + // ToPdfButton + // + this.ToPdfButton.Location = new System.Drawing.Point(781, 9); + this.ToPdfButton.Name = "ToPdfButton"; + this.ToPdfButton.Size = new System.Drawing.Size(165, 29); + this.ToPdfButton.TabIndex = 5; + this.ToPdfButton.Text = "В PDF"; + this.ToPdfButton.UseVisualStyleBackColor = true; + this.ToPdfButton.Click += new System.EventHandler(this.ButtonToPdf_Click); + // + // CreateButton + // + this.CreateButton.Location = new System.Drawing.Point(542, 11); + this.CreateButton.Name = "CreateButton"; + this.CreateButton.Size = new System.Drawing.Size(165, 29); + this.CreateButton.TabIndex = 4; + this.CreateButton.Text = "Сформировать"; + this.CreateButton.UseVisualStyleBackColor = true; + this.CreateButton.Click += new System.EventHandler(this.ButtonMake_Click); + // + // ToDateTimePicker + // + this.ToDateTimePicker.Location = new System.Drawing.Point(299, 9); + this.ToDateTimePicker.Name = "ToDateTimePicker"; + this.ToDateTimePicker.Size = new System.Drawing.Size(199, 27); + this.ToDateTimePicker.TabIndex = 3; + // + // ToLabel + // + this.ToLabel.AutoSize = true; + this.ToLabel.Location = new System.Drawing.Point(254, 13); + this.ToLabel.Name = "ToLabel"; + this.ToLabel.Size = new System.Drawing.Size(27, 20); + this.ToLabel.TabIndex = 2; + this.ToLabel.Text = "по"; + // + // FromDateTimePicker + // + this.FromDateTimePicker.Location = new System.Drawing.Point(37, 9); + this.FromDateTimePicker.Name = "FromDateTimePicker"; + this.FromDateTimePicker.Size = new System.Drawing.Size(199, 27); + this.FromDateTimePicker.TabIndex = 1; + // + // FromLabel + // + this.FromLabel.AutoSize = true; + this.FromLabel.Location = new System.Drawing.Point(11, 13); + this.FromLabel.Name = "FromLabel"; + this.FromLabel.Size = new System.Drawing.Size(18, 20); + this.FromLabel.TabIndex = 0; + this.FromLabel.Text = "C"; + // + // FormReportOrders + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1105, 451); + this.Controls.Add(this.Panel); + this.Name = "FormReportOrders"; + this.Text = "Заказы"; + this.Panel.ResumeLayout(false); + this.Panel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Panel Panel; + private Button ToPdfButton; + private Button CreateButton; + private DateTimePicker ToDateTimePicker; + private Label ToLabel; + private DateTimePicker FromDateTimePicker; + private Label FromLabel; + } +} \ No newline at end of file diff --git a/Bar/Bar/Forms/FormReportOrders.cs b/Bar/Bar/Forms/FormReportOrders.cs new file mode 100644 index 0000000..f21b75a --- /dev/null +++ b/Bar/Bar/Forms/FormReportOrders.cs @@ -0,0 +1,100 @@ +using BarContracts.BindingModels; +using BarContracts.BusinessLogicContracts; +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; + +namespace BarView.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("ReportOrder.rdlc", FileMode.Open)); + + Controls.Clear(); + Controls.Add(_reportViewer); + Controls.Add(Panel); + } + + private void ButtonMake_Click(object sender, EventArgs e) + { + if (FromDateTimePicker.Value.Date >= ToDateTimePicker.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + try + { + var DataSource = _logic.GetOrders(new ReportBindingModel + { + DateFrom = FromDateTimePicker.Value, + DateTo = ToDateTimePicker.Value + }); + + var Source = new ReportDataSource("DataSetOrders", DataSource); + + _reportViewer.LocalReport.DataSources.Clear(); + _reportViewer.LocalReport.DataSources.Add(Source); + + var Parameters = new[] { + new ReportParameter("ReportParameterPeriod", $"c {FromDateTimePicker.Value.ToShortDateString()} по {ToDateTimePicker.Value.ToShortDateString()}") + }; + _reportViewer.LocalReport.SetParameters(Parameters); + + _reportViewer.RefreshReport(); + _logger.LogInformation("Загрузка списка заказов на период {From}-{To}", FromDateTimePicker.Value.ToShortDateString(), ToDateTimePicker.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 (FromDateTimePicker.Value.Date >= ToDateTimePicker.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + using var Dialog = new SaveFileDialog { Filter = "pdf|*.pdf" }; + + if (Dialog.ShowDialog() == DialogResult.OK) + { + try + { + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); + _logic.SaveOrdersToPdfFile(new ReportBindingModel + { + FileName = Dialog.FileName, + DateFrom = FromDateTimePicker.Value, + DateTo = ToDateTimePicker.Value + }); + + _logger.LogInformation("Сохранение списка заказов на период {From}-{To}", FromDateTimePicker.Value.ToShortDateString(), ToDateTimePicker.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/Bar/Bar/Forms/FormReportOrders.resx b/Bar/Bar/Forms/FormReportOrders.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Bar/Bar/Forms/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/Bar/Bar/Program.cs b/Bar/Bar/Program.cs index f2d9b0b..672c99e 100644 --- a/Bar/Bar/Program.cs +++ b/Bar/Bar/Program.cs @@ -1,4 +1,6 @@ using BarBusinessLogic.BusinessLogics; +using BarBusinessLogic.OfficePackage.Implements; +using BarBusinessLogic.OfficePackage; using BarContracts.BusinessLogicContracts; using BarContracts.StoragesContracts; using BarDatabaseImplement.Implements; @@ -38,9 +40,15 @@ namespace BarView Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); + Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); + Services.AddTransient(); + + Services.AddTransient(); + Services.AddTransient(); + Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); @@ -49,6 +57,8 @@ namespace BarView Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); + Services.AddTransient(); + Services.AddTransient(); } } } \ No newline at end of file diff --git a/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IComponentLogic.datasource b/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IComponentLogic.datasource new file mode 100644 index 0000000..03fb8c8 --- /dev/null +++ b/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IComponentLogic.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.BusinessLogicContracts.IComponentLogic, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IOrderLogic.datasource b/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IOrderLogic.datasource new file mode 100644 index 0000000..3505fd3 --- /dev/null +++ b/Bar/Bar/Properties/DataSources/BarContracts.BusinessLogicContracts.IOrderLogic.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.BusinessLogicContracts.IOrderLogic, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.ICocktailStorage.datasource b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.ICocktailStorage.datasource new file mode 100644 index 0000000..0bc97b2 --- /dev/null +++ b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.ICocktailStorage.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.StoragesContracts.ICocktailStorage, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IComponentStorage.datasource b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IComponentStorage.datasource new file mode 100644 index 0000000..c6dfc8e --- /dev/null +++ b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IComponentStorage.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.StoragesContracts.IComponentStorage, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IOrderStorage.datasource b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IOrderStorage.datasource new file mode 100644 index 0000000..89b55b0 --- /dev/null +++ b/Bar/Bar/Properties/DataSources/BarContracts.StoragesContracts.IOrderStorage.datasource @@ -0,0 +1,10 @@ + + + + BarContracts.StoragesContracts.IOrderStorage, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Bar/Bar/ReportOrder.rdlc b/Bar/Bar/ReportOrder.rdlc new file mode 100644 index 0000000..9539be3 --- /dev/null +++ b/Bar/Bar/ReportOrder.rdlc @@ -0,0 +1,572 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 10791c83-cee8-4a38-bbd0-245fc17cefb3 + + + + + + BarContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + CocktailName + System.String + + + Sum + System.Decimal + + + Status + System.String + + + + BarContracts.ViewModels + ReportOrdersViewModel + BarContracts.ViewModels.ReportOrdersViewModel, BarContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + true + true + + + + + Заказы + + + + 0.6cm + 22.058cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ReportParameterPeriod.Value + + + + ReportParameterPeriod + 0.6cm + 0.6cm + 22.058cm + 1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.60583cm + + + 5.27517cm + + + 6.1195cm + + + 4.76483cm + + + 2.5cm + + + + + 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!CocktailName.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 + 1.9177cm + 0.79267cm + 1.2cm + 21.26533cm + 2 + + + + + + true + true + + + + + Итого: + + + + 3.46287cm + 16.61349cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + 2pt + 2pt + 2pt + 2pt + + + + 2in +