diff --git a/IceCreamShop/IceCreamBusinessLogic/BusinessLogics/ReportLogic.cs b/IceCreamShop/IceCreamBusinessLogic/BusinessLogics/ReportLogic.cs
index 9ec8fa1..5f0f0d4 100644
--- a/IceCreamShop/IceCreamBusinessLogic/BusinessLogics/ReportLogic.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/BusinessLogics/ReportLogic.cs
@@ -43,7 +43,7 @@ namespace IceCreamBusinessLogic.BusinessLogics
/// Получение списка компонент с указанием, в каких изделиях используются
///
///
- public List GetProductComponent()
+ public List GetIceCreamComponent()
{
var components = _componentStorage.GetFullList();
@@ -51,20 +51,20 @@ namespace IceCreamBusinessLogic.BusinessLogics
var list = new List();
- foreach (var component in components)
+ foreach (var icecream in iceCreams)
{
var record = new ReportIceCreamComponentViewModel
{
- ComponentName = component.ComponentName,
- IceCreams = new List<(string, int)>(),
+ IceCreamName = icecream.IceCreamName,
+ Components = new List<(string, int)>(),
TotalCount = 0
};
- foreach (var product in iceCreams)
+ foreach (var component in components)
{
- if (product.IceCreamComponents.ContainsKey(component.Id))
+ if (icecream.IceCreamComponents.ContainsKey(component.Id))
{
- record.IceCreams.Add(new(product.IceCreamName, product.IceCreamComponents[component.Id].Item2));
- record.TotalCount += product.IceCreamComponents[component.Id].Item2;
+ record.Components.Add(new(component.ComponentName, icecream.IceCreamComponents[component.Id].Item2));
+ record.TotalCount += icecream.IceCreamComponents[component.Id].Item2;
}
}
@@ -87,6 +87,7 @@ namespace IceCreamBusinessLogic.BusinessLogics
Id = x.Id,
DateCreate = x.DateCreate,
IceCreamName = x.IceCreamName,
+ OrderStatus = Convert.ToString(x.Status) ?? String.Empty,
Sum = x.Sum
})
.ToList();
@@ -96,13 +97,13 @@ namespace IceCreamBusinessLogic.BusinessLogics
/// Сохранение компонент в файл-Word
///
///
- public void SaveComponentsToWordFile(ReportBindingModel model)
+ public void SaveIceCreamsToWordFile(ReportBindingModel model)
{
_saveToWord.CreateDoc(new WordInfo
{
FileName = model.FileName,
- Title = "Список компонент",
- Components = _componentStorage.GetFullList()
+ Title = "Список изделий",
+ IceCreams = _iceCreamStorage.GetFullList()
});
}
@@ -110,13 +111,13 @@ namespace IceCreamBusinessLogic.BusinessLogics
/// Сохранение компонент с указаеним продуктов в файл-Excel
///
///
- public void SaveProductComponentToExcelFile(ReportBindingModel model)
+ public void SaveIceCreamComponentToExcelFile(ReportBindingModel model)
{
_saveToExcel.CreateReport(new ExcelInfo
{
FileName = model.FileName,
- Title = "Список компонент",
- ProductComponents = GetProductComponent()
+ Title = "Список изделий",
+ IceCreamComponents = GetIceCreamComponent()
});
}
diff --git a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToExcel.cs b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToExcel.cs
index 1e2e35b..e0f80fa 100644
--- a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToExcel.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToExcel.cs
@@ -28,18 +28,18 @@ namespace IceCreamBusinessLogic.OfficePackage
});
uint rowIndex = 2;
- foreach (var pc in info.ProductComponents)
+ foreach (var pc in info.IceCreamComponents)
{
InsertCellInWorksheet(new ExcelCellParameters
{
ColumnName = "A",
RowIndex = rowIndex,
- Text = pc.ComponentName,
+ Text = pc.IceCreamName,
StyleInfo = ExcelStyleInfoType.Text
});
rowIndex++;
- foreach (var (IceCream, Count) in pc.IceCreams)
+ foreach (var (IceCream, Count) in pc.Components)
{
InsertCellInWorksheet(new ExcelCellParameters
{
diff --git a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
index b64b775..3e10ed2 100644
--- a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
@@ -14,13 +14,15 @@ namespace IceCreamBusinessLogic.OfficePackage
{
CreatePdf(info);
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
- CreateParagraph(new PdfParagraph { Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center });
+ CreateParagraph(new PdfParagraph {
+ Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Style = "Normal",
+ ParagraphAlignment = PdfParagraphAlignmentType.Center });
- CreateTable(new List { "2cm", "3cm", "6cm", "3cm" });
+ CreateTable(new List { "2cm", "3cm", "6cm", "4cm", "3cm" });
CreateRow(new PdfRowParameters
{
- Texts = new List { "Номер", "Дата заказа", "Изделие", "Сумма" },
+ Texts = new List { "Номер", "Дата заказа", "Изделие", "Статус заказа", "Сумма" },
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
@@ -29,7 +31,7 @@ namespace IceCreamBusinessLogic.OfficePackage
{
CreateRow(new PdfRowParameters
{
- Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.IceCreamName, order.Sum.ToString() },
+ Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.IceCreamName, Convert.ToString(order.OrderStatus), order.Sum.ToString() },
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Left
});
diff --git a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToWord.cs
index 976b28e..bc73496 100644
--- a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToWord.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/AbstractSaveToWord.cs
@@ -19,11 +19,14 @@ namespace IceCreamBusinessLogic.OfficePackage
}
});
- foreach (var component in info.Components)
+ foreach (var iceCream in info.IceCreams)
{
CreateParagraph(new WordParagraph
{
- Texts = new List<(string, WordTextProperties)> { (component.ComponentName, new WordTextProperties { Size = "24", }) },
+ Texts = new List<(string, WordTextProperties)> {
+ (iceCream.IceCreamName, new WordTextProperties { Size = "24", Bold = true}),
+ (" - цена " + iceCream.Price.ToString(), new WordTextProperties { Size = "24" })
+ },
TextProperties = new WordTextProperties
{
Size = "24",
diff --git a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/ExcelInfo.cs b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/ExcelInfo.cs
index 126a0c8..6fa1f90 100644
--- a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/ExcelInfo.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/ExcelInfo.cs
@@ -8,6 +8,6 @@ namespace IceCreamBusinessLogic.OfficePackage.HelperModels
public string Title { get; set; } = string.Empty;
- public List ProductComponents { get; set; } = new();
+ public List IceCreamComponents { get; set; } = new();
}
}
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/WordInfo.cs b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/WordInfo.cs
index 8d3a4d1..8e6de3a 100644
--- a/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/WordInfo.cs
+++ b/IceCreamShop/IceCreamBusinessLogic/OfficePackage/HelperModels/WordInfo.cs
@@ -8,6 +8,6 @@ namespace IceCreamBusinessLogic.OfficePackage.HelperModels
public string Title { get; set; } = string.Empty;
- public List Components { get; set; } = new();
+ public List IceCreams { get; set; } = new();
}
}
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/FormMain.Designer.cs b/IceCreamShop/IceCreamShop/FormMain.Designer.cs
index 146a95d..71ce812 100644
--- a/IceCreamShop/IceCreamShop/FormMain.Designer.cs
+++ b/IceCreamShop/IceCreamShop/FormMain.Designer.cs
@@ -28,170 +28,173 @@
///
private void InitializeComponent()
{
- buttonUpdate = new Button();
- buttonSetToFinish = new Button();
- buttonSetToDone = new Button();
- buttonSetToWork = new Button();
- buttonCreateOrder = new Button();
- dataGridView = new DataGridView();
- menuStrip = new MenuStrip();
- справочникиToolStripMenuItem = new ToolStripMenuItem();
- компонентыToolStripMenuItem = new ToolStripMenuItem();
- мороженоеToolStripMenuItem = new ToolStripMenuItem();
- отчетыToolStripMenuItem = new ToolStripMenuItem();
- componentsToolStripMenuItem = new ToolStripMenuItem();
- componentIceCreamsToolStripMenuItem = new ToolStripMenuItem();
- ordersToolStripMenuItem = new ToolStripMenuItem();
- ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
- menuStrip.SuspendLayout();
- SuspendLayout();
+ this.buttonUpdate = new System.Windows.Forms.Button();
+ this.buttonSetToFinish = new System.Windows.Forms.Button();
+ this.buttonSetToDone = new System.Windows.Forms.Button();
+ this.buttonSetToWork = new System.Windows.Forms.Button();
+ this.buttonCreateOrder = new System.Windows.Forms.Button();
+ this.dataGridView = new System.Windows.Forms.DataGridView();
+ this.menuStrip = new System.Windows.Forms.MenuStrip();
+ 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();
+ this.iceCreamComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.iceCreamToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.ordersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
+ this.menuStrip.SuspendLayout();
+ this.SuspendLayout();
//
// buttonUpdate
//
- buttonUpdate.Location = new Point(878, 294);
- buttonUpdate.Margin = new Padding(3, 2, 3, 2);
- buttonUpdate.Name = "buttonUpdate";
- buttonUpdate.Size = new Size(170, 37);
- buttonUpdate.TabIndex = 13;
- buttonUpdate.Text = "Обновить";
- buttonUpdate.UseVisualStyleBackColor = true;
- buttonUpdate.Click += buttonUpdate_Click;
+ this.buttonUpdate.Location = new System.Drawing.Point(1003, 392);
+ this.buttonUpdate.Name = "buttonUpdate";
+ this.buttonUpdate.Size = new System.Drawing.Size(194, 49);
+ this.buttonUpdate.TabIndex = 13;
+ this.buttonUpdate.Text = "Обновить";
+ this.buttonUpdate.UseVisualStyleBackColor = true;
+ this.buttonUpdate.Click += new System.EventHandler(this.buttonUpdate_Click);
//
// buttonSetToFinish
//
- buttonSetToFinish.Location = new Point(878, 225);
- buttonSetToFinish.Margin = new Padding(3, 2, 3, 2);
- buttonSetToFinish.Name = "buttonSetToFinish";
- buttonSetToFinish.Size = new Size(170, 37);
- buttonSetToFinish.TabIndex = 12;
- buttonSetToFinish.Text = "Заказ выдан";
- buttonSetToFinish.UseVisualStyleBackColor = true;
- buttonSetToFinish.Click += buttonSetToFinish_Click;
+ this.buttonSetToFinish.Location = new System.Drawing.Point(1003, 300);
+ this.buttonSetToFinish.Name = "buttonSetToFinish";
+ this.buttonSetToFinish.Size = new System.Drawing.Size(194, 49);
+ this.buttonSetToFinish.TabIndex = 12;
+ this.buttonSetToFinish.Text = "Заказ выдан";
+ this.buttonSetToFinish.UseVisualStyleBackColor = true;
+ this.buttonSetToFinish.Click += new System.EventHandler(this.buttonSetToFinish_Click);
//
// buttonSetToDone
//
- buttonSetToDone.Location = new Point(878, 160);
- buttonSetToDone.Margin = new Padding(3, 2, 3, 2);
- buttonSetToDone.Name = "buttonSetToDone";
- buttonSetToDone.Size = new Size(170, 37);
- buttonSetToDone.TabIndex = 11;
- buttonSetToDone.Text = "Заказ готов";
- buttonSetToDone.UseVisualStyleBackColor = true;
- buttonSetToDone.Click += buttonSetToDone_Click;
+ this.buttonSetToDone.Location = new System.Drawing.Point(1003, 213);
+ this.buttonSetToDone.Name = "buttonSetToDone";
+ this.buttonSetToDone.Size = new System.Drawing.Size(194, 49);
+ this.buttonSetToDone.TabIndex = 11;
+ this.buttonSetToDone.Text = "Заказ готов";
+ this.buttonSetToDone.UseVisualStyleBackColor = true;
+ this.buttonSetToDone.Click += new System.EventHandler(this.buttonSetToDone_Click);
//
// buttonSetToWork
//
- buttonSetToWork.Location = new Point(878, 93);
- buttonSetToWork.Margin = new Padding(3, 2, 3, 2);
- buttonSetToWork.Name = "buttonSetToWork";
- buttonSetToWork.Size = new Size(170, 37);
- buttonSetToWork.TabIndex = 10;
- buttonSetToWork.Text = "Отдать на выполнение";
- buttonSetToWork.UseVisualStyleBackColor = true;
- buttonSetToWork.Click += buttonSetToWork_Click;
+ this.buttonSetToWork.Location = new System.Drawing.Point(1003, 124);
+ this.buttonSetToWork.Name = "buttonSetToWork";
+ this.buttonSetToWork.Size = new System.Drawing.Size(194, 49);
+ this.buttonSetToWork.TabIndex = 10;
+ this.buttonSetToWork.Text = "Отдать на выполнение";
+ this.buttonSetToWork.UseVisualStyleBackColor = true;
+ this.buttonSetToWork.Click += new System.EventHandler(this.buttonSetToWork_Click);
//
// buttonCreateOrder
//
- buttonCreateOrder.Location = new Point(878, 26);
- buttonCreateOrder.Margin = new Padding(3, 2, 3, 2);
- buttonCreateOrder.Name = "buttonCreateOrder";
- buttonCreateOrder.Size = new Size(170, 37);
- buttonCreateOrder.TabIndex = 9;
- buttonCreateOrder.Text = "Создать заказ";
- buttonCreateOrder.UseVisualStyleBackColor = true;
- buttonCreateOrder.Click += buttonCreateOrder_Click;
+ this.buttonCreateOrder.Location = new System.Drawing.Point(1003, 35);
+ this.buttonCreateOrder.Name = "buttonCreateOrder";
+ this.buttonCreateOrder.Size = new System.Drawing.Size(194, 49);
+ this.buttonCreateOrder.TabIndex = 9;
+ this.buttonCreateOrder.Text = "Создать заказ";
+ this.buttonCreateOrder.UseVisualStyleBackColor = true;
+ this.buttonCreateOrder.Click += new System.EventHandler(this.buttonCreateOrder_Click);
//
// dataGridView
//
- dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dataGridView.Location = new Point(12, 26);
- dataGridView.Margin = new Padding(3, 2, 3, 2);
- dataGridView.Name = "dataGridView";
- dataGridView.RowHeadersWidth = 51;
- dataGridView.RowTemplate.Height = 29;
- dataGridView.Size = new Size(848, 305);
- dataGridView.TabIndex = 8;
+ this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView.Location = new System.Drawing.Point(14, 35);
+ this.dataGridView.Name = "dataGridView";
+ this.dataGridView.RowHeadersWidth = 51;
+ this.dataGridView.RowTemplate.Height = 29;
+ this.dataGridView.Size = new System.Drawing.Size(969, 407);
+ this.dataGridView.TabIndex = 8;
//
// menuStrip
//
- menuStrip.ImageScalingSize = new Size(20, 20);
- menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, отчетыToolStripMenuItem });
- menuStrip.Location = new Point(0, 0);
- menuStrip.Name = "menuStrip";
- menuStrip.Padding = new Padding(5, 2, 0, 2);
- menuStrip.Size = new Size(1072, 24);
- menuStrip.TabIndex = 7;
- menuStrip.Text = "Справочники";
+ this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.справочникиToolStripMenuItem,
+ this.отчетыToolStripMenuItem});
+ this.menuStrip.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip.Name = "menuStrip";
+ this.menuStrip.Padding = new System.Windows.Forms.Padding(6, 3, 0, 3);
+ this.menuStrip.Size = new System.Drawing.Size(1225, 30);
+ this.menuStrip.TabIndex = 7;
+ this.menuStrip.Text = "Справочники";
//
// справочникиToolStripMenuItem
//
- справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, мороженоеToolStripMenuItem });
- справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
- справочникиToolStripMenuItem.Size = new Size(94, 20);
- справочникиToolStripMenuItem.Text = "Справочники";
+ this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.компонентыToolStripMenuItem,
+ this.мороженоеToolStripMenuItem});
+ this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
+ this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
+ this.справочникиToolStripMenuItem.Text = "Справочники";
//
// компонентыToolStripMenuItem
//
- компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
- компонентыToolStripMenuItem.Size = new Size(145, 22);
- компонентыToolStripMenuItem.Text = "Компоненты";
- компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click;
+ this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
+ this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
+ this.компонентыToolStripMenuItem.Text = "Компоненты";
+ this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
//
// мороженоеToolStripMenuItem
//
- мороженоеToolStripMenuItem.Name = "мороженоеToolStripMenuItem";
- мороженоеToolStripMenuItem.Size = new Size(145, 22);
- мороженоеToolStripMenuItem.Text = "Мороженое";
- мороженоеToolStripMenuItem.Click += мороженоеToolStripMenuItem_Click;
+ this.мороженоеToolStripMenuItem.Name = "мороженоеToolStripMenuItem";
+ this.мороженоеToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
+ this.мороженоеToolStripMenuItem.Text = "Мороженое";
+ this.мороженоеToolStripMenuItem.Click += new System.EventHandler(this.мороженоеToolStripMenuItem_Click);
//
// отчетыToolStripMenuItem
//
- отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { componentsToolStripMenuItem, componentIceCreamsToolStripMenuItem, ordersToolStripMenuItem });
- отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
- отчетыToolStripMenuItem.Size = new Size(60, 20);
- отчетыToolStripMenuItem.Text = "Отчеты";
+ this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.iceCreamComponentsToolStripMenuItem,
+ this.iceCreamToolStripMenuItem,
+ this.ordersToolStripMenuItem});
+ this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
+ this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
+ this.отчетыToolStripMenuItem.Text = "Отчеты";
//
- // componentsToolStripMenuItem
+ // iceCreamComponentsToolStripMenuItem
//
- componentsToolStripMenuItem.Name = "componentsToolStripMenuItem";
- componentsToolStripMenuItem.Size = new Size(235, 22);
- componentsToolStripMenuItem.Text = "Список компонентов";
- componentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
+ this.iceCreamComponentsToolStripMenuItem.Name = "iceCreamComponentsToolStripMenuItem";
+ this.iceCreamComponentsToolStripMenuItem.Size = new System.Drawing.Size(299, 26);
+ this.iceCreamComponentsToolStripMenuItem.Text = "Список мороженых";
+ this.iceCreamComponentsToolStripMenuItem.Click += new System.EventHandler(this.IceCreamsToolStripMenuItem_Click);
//
- // componentIceCreamsToolStripMenuItem
+ // iceCreamToolStripMenuItem
//
- componentIceCreamsToolStripMenuItem.Name = "componentIceCreamsToolStripMenuItem";
- componentIceCreamsToolStripMenuItem.Size = new Size(235, 22);
- componentIceCreamsToolStripMenuItem.Text = "Компоненты по мороженым";
- componentIceCreamsToolStripMenuItem.Click += ComponentIceCreamsToolStripMenuItem_Click;
+ this.iceCreamToolStripMenuItem.Name = "iceCreamToolStripMenuItem";
+ this.iceCreamToolStripMenuItem.Size = new System.Drawing.Size(299, 26);
+ this.iceCreamToolStripMenuItem.Text = "Мороженые с компонентами";
+ this.iceCreamToolStripMenuItem.Click += new System.EventHandler(this.IceCreamComponentsToolStripMenuItem_Click);
//
// ordersToolStripMenuItem
//
- ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
- ordersToolStripMenuItem.Size = new Size(235, 22);
- ordersToolStripMenuItem.Text = "Список заказов";
- ordersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
+ this.ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
+ this.ordersToolStripMenuItem.Size = new System.Drawing.Size(299, 26);
+ this.ordersToolStripMenuItem.Text = "Список заказов";
+ this.ordersToolStripMenuItem.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click);
//
// FormMain
//
- AutoScaleDimensions = new SizeF(7F, 15F);
- AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(1072, 347);
- Controls.Add(buttonUpdate);
- Controls.Add(buttonSetToFinish);
- Controls.Add(buttonSetToDone);
- Controls.Add(buttonSetToWork);
- Controls.Add(buttonCreateOrder);
- Controls.Add(dataGridView);
- Controls.Add(menuStrip);
- Name = "FormMain";
- Text = "Магазин мороженого";
- Load += FormMain_Load;
- ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
- menuStrip.ResumeLayout(false);
- menuStrip.PerformLayout();
- ResumeLayout(false);
- PerformLayout();
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1225, 463);
+ this.Controls.Add(this.buttonUpdate);
+ this.Controls.Add(this.buttonSetToFinish);
+ this.Controls.Add(this.buttonSetToDone);
+ this.Controls.Add(this.buttonSetToWork);
+ this.Controls.Add(this.buttonCreateOrder);
+ this.Controls.Add(this.dataGridView);
+ this.Controls.Add(this.menuStrip);
+ this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.Name = "FormMain";
+ this.Text = "Магазин мороженого";
+ this.Load += new System.EventHandler(this.FormMain_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
+ this.menuStrip.ResumeLayout(false);
+ this.menuStrip.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
@@ -207,8 +210,8 @@
private ToolStripMenuItem компонентыToolStripMenuItem;
private ToolStripMenuItem мороженоеToolStripMenuItem;
private ToolStripMenuItem отчетыToolStripMenuItem;
- private ToolStripMenuItem componentsToolStripMenuItem;
- private ToolStripMenuItem componentIceCreamsToolStripMenuItem;
+ private ToolStripMenuItem iceCreamComponentsToolStripMenuItem;
+ private ToolStripMenuItem iceCreamToolStripMenuItem;
private ToolStripMenuItem ordersToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/FormMain.cs b/IceCreamShop/IceCreamShop/FormMain.cs
index f90e86b..2af8bd9 100644
--- a/IceCreamShop/IceCreamShop/FormMain.cs
+++ b/IceCreamShop/IceCreamShop/FormMain.cs
@@ -167,17 +167,17 @@ namespace IceCreamShopView
LoadData();
}
- private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e)
+ private void IceCreamsToolStripMenuItem_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 });
+ _reportLogic.SaveIceCreamsToWordFile(new ReportBindingModel { FileName = dialog.FileName });
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
- private void ComponentIceCreamsToolStripMenuItem_Click(object sender, EventArgs e)
+ private void IceCreamComponentsToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormReportProductComponents));
if (service is FormReportProductComponents form)
diff --git a/IceCreamShop/IceCreamShop/FormReportOrders.Designer.cs b/IceCreamShop/IceCreamShop/FormReportOrders.Designer.cs
index 88def60..0b4b768 100644
--- a/IceCreamShop/IceCreamShop/FormReportOrders.Designer.cs
+++ b/IceCreamShop/IceCreamShop/FormReportOrders.Designer.cs
@@ -28,99 +28,103 @@
///
private void InitializeComponent()
{
- buttonToPdf = new Button();
- panel = new Panel();
- buttonMake = new Button();
- dateTimePickerTo = new DateTimePicker();
- labelTo = new Label();
- dateTimePickerFrom = new DateTimePicker();
- labelFrom = new Label();
- panel.SuspendLayout();
- SuspendLayout();
+ this.buttonToPdf = new System.Windows.Forms.Button();
+ this.panel = new System.Windows.Forms.Panel();
+ this.buttonMake = new System.Windows.Forms.Button();
+ this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker();
+ this.labelTo = new System.Windows.Forms.Label();
+ this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker();
+ this.labelFrom = new System.Windows.Forms.Label();
+ this.panel.SuspendLayout();
+ this.SuspendLayout();
//
// buttonToPdf
//
- buttonToPdf.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- buttonToPdf.Location = new Point(819, 8);
- buttonToPdf.Margin = new Padding(4, 3, 4, 3);
- buttonToPdf.Name = "buttonToPdf";
- buttonToPdf.Size = new Size(139, 27);
- buttonToPdf.TabIndex = 6;
- buttonToPdf.Text = "В Pdf";
- buttonToPdf.UseVisualStyleBackColor = true;
+ this.buttonToPdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonToPdf.Location = new System.Drawing.Point(936, 11);
+ this.buttonToPdf.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.buttonToPdf.Name = "buttonToPdf";
+ this.buttonToPdf.Size = new System.Drawing.Size(159, 36);
+ this.buttonToPdf.TabIndex = 6;
+ this.buttonToPdf.Text = "В Pdf";
+ this.buttonToPdf.UseVisualStyleBackColor = true;
+ this.buttonToPdf.Click += new System.EventHandler(this.ButtonToPdf_Click);
//
// panel
//
- panel.Controls.Add(buttonMake);
- panel.Controls.Add(buttonToPdf);
- panel.Controls.Add(dateTimePickerTo);
- panel.Controls.Add(labelTo);
- panel.Controls.Add(dateTimePickerFrom);
- panel.Controls.Add(labelFrom);
- panel.Dock = DockStyle.Top;
- panel.Location = new Point(0, 0);
- panel.Margin = new Padding(4, 3, 4, 3);
- panel.Name = "panel";
- panel.Size = new Size(1006, 40);
- panel.TabIndex = 7;
+ this.panel.Controls.Add(this.buttonMake);
+ this.panel.Controls.Add(this.buttonToPdf);
+ this.panel.Controls.Add(this.dateTimePickerTo);
+ this.panel.Controls.Add(this.labelTo);
+ 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.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.panel.Name = "panel";
+ this.panel.Size = new System.Drawing.Size(1150, 53);
+ this.panel.TabIndex = 7;
//
// buttonMake
//
- buttonMake.Location = new Point(476, 8);
- buttonMake.Margin = new Padding(4, 3, 4, 3);
- buttonMake.Name = "buttonMake";
- buttonMake.Size = new Size(139, 27);
- buttonMake.TabIndex = 4;
- buttonMake.Text = "Сформировать";
- buttonMake.UseVisualStyleBackColor = true;
+ this.buttonMake.Location = new System.Drawing.Point(544, 11);
+ this.buttonMake.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.buttonMake.Name = "buttonMake";
+ this.buttonMake.Size = new System.Drawing.Size(159, 36);
+ this.buttonMake.TabIndex = 4;
+ this.buttonMake.Text = "Сформировать";
+ this.buttonMake.UseVisualStyleBackColor = true;
+ this.buttonMake.Click += new System.EventHandler(this.ButtonMake_Click);
//
// dateTimePickerTo
//
- dateTimePickerTo.Location = new Point(237, 7);
- dateTimePickerTo.Margin = new Padding(4, 3, 4, 3);
- dateTimePickerTo.Name = "dateTimePickerTo";
- dateTimePickerTo.Size = new Size(163, 23);
- dateTimePickerTo.TabIndex = 3;
+ this.dateTimePickerTo.Location = new System.Drawing.Point(271, 9);
+ this.dateTimePickerTo.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.dateTimePickerTo.Name = "dateTimePickerTo";
+ this.dateTimePickerTo.Size = new System.Drawing.Size(186, 27);
+ this.dateTimePickerTo.TabIndex = 3;
//
// labelTo
//
- labelTo.AutoSize = true;
- labelTo.Location = new Point(208, 10);
- labelTo.Margin = new Padding(4, 0, 4, 0);
- labelTo.Name = "labelTo";
- labelTo.Size = new Size(21, 15);
- labelTo.TabIndex = 2;
- labelTo.Text = "по";
+ this.labelTo.AutoSize = true;
+ this.labelTo.Location = new System.Drawing.Point(238, 13);
+ this.labelTo.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.labelTo.Name = "labelTo";
+ this.labelTo.Size = new System.Drawing.Size(27, 20);
+ this.labelTo.TabIndex = 2;
+ this.labelTo.Text = "по";
//
// dateTimePickerFrom
//
- dateTimePickerFrom.Location = new Point(37, 7);
- dateTimePickerFrom.Margin = new Padding(4, 3, 4, 3);
- dateTimePickerFrom.Name = "dateTimePickerFrom";
- dateTimePickerFrom.Size = new Size(163, 23);
- dateTimePickerFrom.TabIndex = 1;
+ this.dateTimePickerFrom.Location = new System.Drawing.Point(42, 9);
+ this.dateTimePickerFrom.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
+ this.dateTimePickerFrom.Name = "dateTimePickerFrom";
+ this.dateTimePickerFrom.Size = new System.Drawing.Size(186, 27);
+ this.dateTimePickerFrom.TabIndex = 1;
//
// labelFrom
//
- labelFrom.AutoSize = true;
- labelFrom.Location = new Point(14, 10);
- labelFrom.Margin = new Padding(4, 0, 4, 0);
- labelFrom.Name = "labelFrom";
- labelFrom.Size = new Size(15, 15);
- labelFrom.TabIndex = 0;
- labelFrom.Text = "С";
+ this.labelFrom.AutoSize = true;
+ this.labelFrom.Location = new System.Drawing.Point(16, 13);
+ this.labelFrom.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.labelFrom.Name = "labelFrom";
+ this.labelFrom.Size = new System.Drawing.Size(18, 20);
+ this.labelFrom.TabIndex = 0;
+ this.labelFrom.Text = "С";
//
// FormReportOrders
//
- AutoScaleDimensions = new SizeF(7F, 15F);
- AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(1006, 450);
- Controls.Add(panel);
- Name = "FormReportOrders";
- Text = "Заказы";
- panel.ResumeLayout(false);
- panel.PerformLayout();
- ResumeLayout(false);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1150, 600);
+ this.Controls.Add(this.panel);
+ this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.Name = "FormReportOrders";
+ this.Text = "Заказы";
+ this.panel.ResumeLayout(false);
+ this.panel.PerformLayout();
+ this.ResumeLayout(false);
+
}
#endregion
diff --git a/IceCreamShop/IceCreamShop/FormReportProductComponents.cs b/IceCreamShop/IceCreamShop/FormReportProductComponents.cs
index 2213707..f64ca4a 100644
--- a/IceCreamShop/IceCreamShop/FormReportProductComponents.cs
+++ b/IceCreamShop/IceCreamShop/FormReportProductComponents.cs
@@ -29,14 +29,14 @@ namespace IceCreamShopView
{
try
{
- var dict = _logic.GetProductComponent();
+ var dict = _logic.GetIceCreamComponent();
if (dict != null)
{
dataGridView.Rows.Clear();
foreach (var elem in dict)
{
- dataGridView.Rows.Add(new object[] { elem.ComponentName, "", "" });
- foreach (var listElem in elem.IceCreams)
+ dataGridView.Rows.Add(new object[] { elem.IceCreamName, "", "" });
+ foreach (var listElem in elem.Components)
{
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
}
@@ -60,7 +60,7 @@ namespace IceCreamShopView
{
try
{
- _logic.SaveProductComponentToExcelFile(new ReportBindingModel
+ _logic.SaveIceCreamComponentToExcelFile(new ReportBindingModel
{
FileName = dialog.FileName
});
diff --git a/IceCreamShop/IceCreamShop/IceCreamShopView.csproj b/IceCreamShop/IceCreamShop/IceCreamShopView.csproj
index a6dd942..0faed3a 100644
--- a/IceCreamShop/IceCreamShop/IceCreamShopView.csproj
+++ b/IceCreamShop/IceCreamShop/IceCreamShopView.csproj
@@ -26,4 +26,10 @@
+
+
+ Always
+
+
+
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IIceCreamLogic.datasource b/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IIceCreamLogic.datasource
deleted file mode 100644
index b02228a..0000000
--- a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IIceCreamLogic.datasource
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- IceCreamShopContracts.BusinessLogicsContracts.IIceCreamLogic, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IOrderLogic.datasource b/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IOrderLogic.datasource
deleted file mode 100644
index b21c17d..0000000
--- a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.BusinessLogicsContracts.IOrderLogic.datasource
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- IceCreamShopContracts.BusinessLogicsContracts.IOrderLogic, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IComponentStorage.datasource b/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IComponentStorage.datasource
deleted file mode 100644
index 6f7d815..0000000
--- a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IComponentStorage.datasource
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- IceCreamShopContracts.StoragesContracts.IComponentStorage, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IIceCreamStorage.datasource b/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IIceCreamStorage.datasource
deleted file mode 100644
index a09a65c..0000000
--- a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IIceCreamStorage.datasource
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- IceCreamShopContracts.StoragesContracts.IIceCreamStorage, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IOrderStorage.datasource b/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IOrderStorage.datasource
deleted file mode 100644
index de2e7d8..0000000
--- a/IceCreamShop/IceCreamShop/Properties/DataSources/IceCreamShopContracts.StoragesContracts.IOrderStorage.datasource
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- IceCreamShopContracts.StoragesContracts.IOrderStorage, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-
\ No newline at end of file
diff --git a/IceCreamShop/IceCreamShop/ReportOrders.rdlc b/IceCreamShop/IceCreamShop/ReportOrders.rdlc
index 4096b12..1712a9f 100644
--- a/IceCreamShop/IceCreamShop/ReportOrders.rdlc
+++ b/IceCreamShop/IceCreamShop/ReportOrders.rdlc
@@ -2,18 +2,18 @@
0
-
+
System.Data.DataSet
/* Local Connection */
- 10791c83-cee8-4a38-bbd0-245fc17cefb3
+ 47cb53f0-7dde-4717-ba03-866a0bc4f4dd
- AbstractShopContractsViewModels
+ IceCreamShopContractsViewModels
/* Local Query */
@@ -25,19 +25,23 @@
DateCreate
System.DateTime
-
- ProductName
+
+ IceCreamName
System.String
Sum
System.Decimal
+
+ OrderStatus
+ IceCreamShopDataModels.OrderStatus
+
- AbstractShopContracts.ViewModels
- ReportOrdersViewModel
- AbstractShopContracts.ViewModels.ReportOrdersViewModel, AbstractShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+ IceCreamShopContracts.ViewModels
+ ReportOrderViewModel
+ IceCreamShopContracts.ViewModels.ReportOrderViewModel, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
@@ -127,6 +131,9 @@
2.5cm
+
+ 2.5cm
+
@@ -228,6 +235,38 @@
+
+
+
+ true
+ true
+
+
+
+
+ Статус Заказа
+
+
+
+
+
+
+ Textbox2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -336,13 +375,44 @@
- =Fields!ProductName.Value
+ =Fields!IceCreamName.Value
+ IceCreamName
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!OrderStatus.Value
+
+
+
+
+
+
+ OrderStatus