что то
This commit is contained in:
parent
ce36d21d70
commit
e0049edad0
@ -112,11 +112,11 @@ namespace IceCreamBusinessLogic.BusinessLogics
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Загруженность магазинов",
|
||||
ShopIceCreams = GetShopDocuments()
|
||||
ShopIceCreams = GetShopIceCreams()
|
||||
});
|
||||
}
|
||||
|
||||
public List<ReportShopWorkloadViewModel> GetShopDocuments()
|
||||
public List<ReportShopWorkloadViewModel> GetShopIceCreams()
|
||||
{
|
||||
var shops = _shopStorage.GetFullList();
|
||||
var list = new List<ReportShopWorkloadViewModel>();
|
||||
@ -138,6 +138,25 @@ namespace IceCreamBusinessLogic.BusinessLogics
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ReportDateOrdersViewModel> GetDateOrders()
|
||||
{
|
||||
return _orderStorage.GetFullList().GroupBy(x => x.DateCreate.Date).Select(x => new ReportDateOrdersViewModel
|
||||
{
|
||||
DateCreate = x.Key,
|
||||
CountOrders = x.Count(),
|
||||
SumOrders = x.Sum(y => y.Sum)
|
||||
}).ToList();
|
||||
}
|
||||
public void SaveDateOrdersToPdfFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToPdf.CreateReportDateDoc(new PdfInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Заказы по датам",
|
||||
DateOrders = GetDateOrders()
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение компонент в файл-Word
|
||||
/// </summary>
|
||||
|
@ -36,11 +36,51 @@ namespace IceCreamBusinessLogic.OfficePackage
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
}
|
||||
CreateParagraph(new PdfParagraph { Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Rigth });
|
||||
CreateParagraph(new PdfParagraph { Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Right });
|
||||
|
||||
SavePdf(info);
|
||||
}
|
||||
|
||||
public void CreateReportDateDoc(PdfInfo info)
|
||||
{
|
||||
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
|
||||
});
|
||||
CreateTable(new List<string> { "3cm", "3cm", "7cm" });
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Дата заказа", "Количество заказов", "Сумма" },
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
foreach (var order in info.DateOrders)
|
||||
{
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { order.DateCreate.ToShortDateString(), order.CountOrders.ToString(), order.SumOrders.ToString() },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
}
|
||||
CreateParagraph(new PdfParagraph
|
||||
{
|
||||
Text = $"Итого: {info.DateOrders.Sum(x => x.SumOrders)}\t",
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Right
|
||||
});
|
||||
SavePdf(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Создание doc-файла
|
||||
/// </summary>
|
||||
|
@ -12,6 +12,6 @@ namespace IceCreamBusinessLogic.OfficePackage.HelperEnums
|
||||
|
||||
Left,
|
||||
|
||||
Rigth
|
||||
Right
|
||||
}
|
||||
}
|
||||
|
@ -13,5 +13,7 @@ namespace IceCreamBusinessLogic.OfficePackage.HelperModels
|
||||
public DateTime DateTo { get; set; }
|
||||
|
||||
public List<ReportOrdersViewModel> Orders { get; set; } = new();
|
||||
|
||||
public List<ReportDateOrdersViewModel> DateOrders { get; set; } = new();
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ namespace IceCreamBusinessLogic.OfficePackage.Implements
|
||||
{
|
||||
PdfParagraphAlignmentType.Center => ParagraphAlignment.Center,
|
||||
PdfParagraphAlignmentType.Left => ParagraphAlignment.Left,
|
||||
PdfParagraphAlignmentType.Rigth => ParagraphAlignment.Right,
|
||||
PdfParagraphAlignmentType.Right => ParagraphAlignment.Right,
|
||||
_ => ParagraphAlignment.Justify,
|
||||
};
|
||||
}
|
||||
|
338
IceCreamShop/IceCreamShop/FormMain.Designer.cs
generated
338
IceCreamShop/IceCreamShop/FormMain.Designer.cs
generated
@ -28,229 +28,228 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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.отчеты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();
|
||||
this.listShopsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.buttonSupplyShop = new System.Windows.Forms.Button();
|
||||
this.SellIceCreamButton = new System.Windows.Forms.Button();
|
||||
this.shopWorkloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
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();
|
||||
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||
iceCreamComponentsToolStripMenuItem = new ToolStripMenuItem();
|
||||
iceCreamToolStripMenuItem = new ToolStripMenuItem();
|
||||
ordersToolStripMenuItem = new ToolStripMenuItem();
|
||||
listShopsToolStripMenuItem = new ToolStripMenuItem();
|
||||
shopWorkloadToolStripMenuItem = new ToolStripMenuItem();
|
||||
buttonSupplyShop = new Button();
|
||||
SellIceCreamButton = new Button();
|
||||
ordersByDateToolStripMenuItem = new ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// buttonUpdate
|
||||
//
|
||||
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);
|
||||
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;
|
||||
//
|
||||
// buttonSetToFinish
|
||||
//
|
||||
this.buttonSetToFinish.Location = new System.Drawing.Point(1003, 195);
|
||||
this.buttonSetToFinish.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
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);
|
||||
buttonSetToFinish.Location = new Point(878, 146);
|
||||
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;
|
||||
//
|
||||
// buttonSetToDone
|
||||
//
|
||||
this.buttonSetToDone.Location = new System.Drawing.Point(1003, 142);
|
||||
this.buttonSetToDone.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
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);
|
||||
buttonSetToDone.Location = new Point(878, 106);
|
||||
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;
|
||||
//
|
||||
// buttonSetToWork
|
||||
//
|
||||
this.buttonSetToWork.Location = new System.Drawing.Point(1003, 89);
|
||||
this.buttonSetToWork.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
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);
|
||||
buttonSetToWork.Location = new Point(878, 67);
|
||||
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;
|
||||
//
|
||||
// buttonCreateOrder
|
||||
//
|
||||
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);
|
||||
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;
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
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;
|
||||
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;
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
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(1260, 30);
|
||||
this.menuStrip.TabIndex = 7;
|
||||
this.menuStrip.Text = "Справочники";
|
||||
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(1102, 24);
|
||||
menuStrip.TabIndex = 7;
|
||||
menuStrip.Text = "Справочники";
|
||||
//
|
||||
// справочники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(117, 24);
|
||||
this.справочникиToolStripMenuItem.Text = "Справочники";
|
||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, мороженоеToolStripMenuItem, магазиныToolStripMenuItem });
|
||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||
справочникиToolStripMenuItem.Size = new Size(94, 20);
|
||||
справочникиToolStripMenuItem.Text = "Справочники";
|
||||
//
|
||||
// компонентыToolStripMenuItem
|
||||
//
|
||||
this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
|
||||
this.компонентыToolStripMenuItem.Text = "Компоненты";
|
||||
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
|
||||
компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||
компонентыToolStripMenuItem.Size = new Size(145, 22);
|
||||
компонентыToolStripMenuItem.Text = "Компоненты";
|
||||
компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click;
|
||||
//
|
||||
// мороженоеToolStripMenuItem
|
||||
//
|
||||
this.мороженоеToolStripMenuItem.Name = "мороженоеToolStripMenuItem";
|
||||
this.мороженоеToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
|
||||
this.мороженоеToolStripMenuItem.Text = "Мороженое";
|
||||
this.мороженоеToolStripMenuItem.Click += new System.EventHandler(this.мороженоеToolStripMenuItem_Click);
|
||||
мороженоеToolStripMenuItem.Name = "мороженоеToolStripMenuItem";
|
||||
мороженоеToolStripMenuItem.Size = new Size(145, 22);
|
||||
мороженоеToolStripMenuItem.Text = "Мороженое";
|
||||
мороженоеToolStripMenuItem.Click += мороженоеToolStripMenuItem_Click;
|
||||
//
|
||||
// магазиныToolStripMenuItem
|
||||
//
|
||||
this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||
this.магазиныToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
|
||||
this.магазиныToolStripMenuItem.Text = "Магазины";
|
||||
this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.магазиныToolStripMenuItem_Click);
|
||||
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||
магазиныToolStripMenuItem.Size = new Size(145, 22);
|
||||
магазиныToolStripMenuItem.Text = "Магазины";
|
||||
магазиныToolStripMenuItem.Click += магазиныToolStripMenuItem_Click;
|
||||
//
|
||||
// отчетыToolStripMenuItem
|
||||
//
|
||||
this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.iceCreamComponentsToolStripMenuItem,
|
||||
this.iceCreamToolStripMenuItem,
|
||||
this.ordersToolStripMenuItem,
|
||||
this.listShopsToolStripMenuItem,
|
||||
this.shopWorkloadToolStripMenuItem});
|
||||
this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
|
||||
this.отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { iceCreamComponentsToolStripMenuItem, iceCreamToolStripMenuItem, ordersToolStripMenuItem, listShopsToolStripMenuItem, shopWorkloadToolStripMenuItem, ordersByDateToolStripMenuItem });
|
||||
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
отчетыToolStripMenuItem.Size = new Size(60, 20);
|
||||
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// iceCreamComponentsToolStripMenuItem
|
||||
//
|
||||
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);
|
||||
iceCreamComponentsToolStripMenuItem.Name = "iceCreamComponentsToolStripMenuItem";
|
||||
iceCreamComponentsToolStripMenuItem.Size = new Size(238, 22);
|
||||
iceCreamComponentsToolStripMenuItem.Text = "Список мороженых";
|
||||
iceCreamComponentsToolStripMenuItem.Click += IceCreamsToolStripMenuItem_Click;
|
||||
//
|
||||
// iceCreamToolStripMenuItem
|
||||
//
|
||||
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);
|
||||
iceCreamToolStripMenuItem.Name = "iceCreamToolStripMenuItem";
|
||||
iceCreamToolStripMenuItem.Size = new Size(238, 22);
|
||||
iceCreamToolStripMenuItem.Text = "Мороженые с компонентами";
|
||||
iceCreamToolStripMenuItem.Click += IceCreamComponentsToolStripMenuItem_Click;
|
||||
//
|
||||
// ordersToolStripMenuItem
|
||||
//
|
||||
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);
|
||||
ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
|
||||
ordersToolStripMenuItem.Size = new Size(238, 22);
|
||||
ordersToolStripMenuItem.Text = "Список заказов";
|
||||
ordersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
|
||||
//
|
||||
// listShopsToolStripMenuItem
|
||||
//
|
||||
this.listShopsToolStripMenuItem.Name = "listShopsToolStripMenuItem";
|
||||
this.listShopsToolStripMenuItem.Size = new System.Drawing.Size(299, 26);
|
||||
this.listShopsToolStripMenuItem.Text = "Список магазинов";
|
||||
this.listShopsToolStripMenuItem.Click += new System.EventHandler(this.listShopsToolStripMenuItem_Click);
|
||||
//
|
||||
// buttonSupplyShop
|
||||
//
|
||||
this.buttonSupplyShop.Location = new System.Drawing.Point(1003, 292);
|
||||
this.buttonSupplyShop.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.buttonSupplyShop.Name = "buttonSupplyShop";
|
||||
this.buttonSupplyShop.Size = new System.Drawing.Size(194, 44);
|
||||
this.buttonSupplyShop.TabIndex = 14;
|
||||
this.buttonSupplyShop.Text = "Пополнение магазина";
|
||||
this.buttonSupplyShop.UseVisualStyleBackColor = true;
|
||||
this.buttonSupplyShop.Click += new System.EventHandler(this.buttonSupplyShop_Click);
|
||||
//
|
||||
// SellIceCreamButton
|
||||
//
|
||||
this.SellIceCreamButton.Location = new System.Drawing.Point(1003, 248);
|
||||
this.SellIceCreamButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.SellIceCreamButton.Name = "SellIceCreamButton";
|
||||
this.SellIceCreamButton.Size = new System.Drawing.Size(194, 40);
|
||||
this.SellIceCreamButton.TabIndex = 15;
|
||||
this.SellIceCreamButton.Text = "Продажа мороженого";
|
||||
this.SellIceCreamButton.UseVisualStyleBackColor = true;
|
||||
this.SellIceCreamButton.Click += new System.EventHandler(this.SellIceCreamButton_Click);
|
||||
listShopsToolStripMenuItem.Name = "listShopsToolStripMenuItem";
|
||||
listShopsToolStripMenuItem.Size = new Size(238, 22);
|
||||
listShopsToolStripMenuItem.Text = "Список магазинов";
|
||||
listShopsToolStripMenuItem.Click += listShopsToolStripMenuItem_Click;
|
||||
//
|
||||
// shopWorkloadToolStripMenuItem
|
||||
//
|
||||
this.shopWorkloadToolStripMenuItem.Name = "shopWorkloadToolStripMenuItem";
|
||||
this.shopWorkloadToolStripMenuItem.Size = new System.Drawing.Size(299, 26);
|
||||
this.shopWorkloadToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
this.shopWorkloadToolStripMenuItem.Click += new System.EventHandler(this.shopWorkloadToolStripMenuItem_Click);
|
||||
shopWorkloadToolStripMenuItem.Name = "shopWorkloadToolStripMenuItem";
|
||||
shopWorkloadToolStripMenuItem.Size = new Size(238, 22);
|
||||
shopWorkloadToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
shopWorkloadToolStripMenuItem.Click += shopWorkloadToolStripMenuItem_Click;
|
||||
//
|
||||
// buttonSupplyShop
|
||||
//
|
||||
buttonSupplyShop.Location = new Point(878, 219);
|
||||
buttonSupplyShop.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonSupplyShop.Name = "buttonSupplyShop";
|
||||
buttonSupplyShop.Size = new Size(170, 33);
|
||||
buttonSupplyShop.TabIndex = 14;
|
||||
buttonSupplyShop.Text = "Пополнение магазина";
|
||||
buttonSupplyShop.UseVisualStyleBackColor = true;
|
||||
buttonSupplyShop.Click += buttonSupplyShop_Click;
|
||||
//
|
||||
// SellIceCreamButton
|
||||
//
|
||||
SellIceCreamButton.Location = new Point(878, 186);
|
||||
SellIceCreamButton.Margin = new Padding(3, 2, 3, 2);
|
||||
SellIceCreamButton.Name = "SellIceCreamButton";
|
||||
SellIceCreamButton.Size = new Size(170, 30);
|
||||
SellIceCreamButton.TabIndex = 15;
|
||||
SellIceCreamButton.Text = "Продажа мороженого";
|
||||
SellIceCreamButton.UseVisualStyleBackColor = true;
|
||||
SellIceCreamButton.Click += SellIceCreamButton_Click;
|
||||
//
|
||||
// ordersByDateToolStripMenuItem
|
||||
//
|
||||
ordersByDateToolStripMenuItem.Name = "ordersByDateToolStripMenuItem";
|
||||
ordersByDateToolStripMenuItem.Size = new Size(238, 22);
|
||||
ordersByDateToolStripMenuItem.Text = "Заказы по дате";
|
||||
ordersByDateToolStripMenuItem.Click += ordersByDateToolStripMenuItem_Click;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1260, 467);
|
||||
this.Controls.Add(this.SellIceCreamButton);
|
||||
this.Controls.Add(this.buttonSupplyShop);
|
||||
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();
|
||||
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1102, 350);
|
||||
Controls.Add(SellIceCreamButton);
|
||||
Controls.Add(buttonSupplyShop);
|
||||
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();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -274,5 +273,6 @@
|
||||
private Button SellIceCreamButton;
|
||||
private ToolStripMenuItem listShopsToolStripMenuItem;
|
||||
private ToolStripMenuItem shopWorkloadToolStripMenuItem;
|
||||
private ToolStripMenuItem ordersByDateToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -238,8 +238,17 @@ namespace IceCreamShopView
|
||||
|
||||
private void shopWorkloadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopDocuments));
|
||||
if (service is FormReportShopDocuments form)
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopWorkload));
|
||||
if (service is FormReportShopWorkload form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ordersByDateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportDateOrders));
|
||||
if (service is FormReportDateOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
88
IceCreamShop/IceCreamShop/FormReportDateOrders.Designer.cs
generated
Normal file
88
IceCreamShop/IceCreamShop/FormReportDateOrders.Designer.cs
generated
Normal file
@ -0,0 +1,88 @@
|
||||
namespace IceCreamShopView
|
||||
{
|
||||
partial class FormReportDateOrders
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
panel = new Panel();
|
||||
buttonCreateToPdf = new Button();
|
||||
buttonCreateReport = new Button();
|
||||
panel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel
|
||||
//
|
||||
panel.Controls.Add(buttonCreateToPdf);
|
||||
panel.Controls.Add(buttonCreateReport);
|
||||
panel.Dock = DockStyle.Top;
|
||||
panel.Location = new Point(0, 0);
|
||||
panel.Margin = new Padding(3, 2, 3, 2);
|
||||
panel.Name = "panel";
|
||||
panel.Size = new Size(854, 52);
|
||||
panel.TabIndex = 2;
|
||||
//
|
||||
// buttonCreateToPdf
|
||||
//
|
||||
buttonCreateToPdf.Location = new Point(673, 11);
|
||||
buttonCreateToPdf.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonCreateToPdf.Name = "buttonCreateToPdf";
|
||||
buttonCreateToPdf.Size = new Size(166, 38);
|
||||
buttonCreateToPdf.TabIndex = 5;
|
||||
buttonCreateToPdf.Text = "PDF";
|
||||
buttonCreateToPdf.UseVisualStyleBackColor = true;
|
||||
buttonCreateToPdf.Click += buttonCreateToPdf_Click;
|
||||
//
|
||||
// buttonCreateReport
|
||||
//
|
||||
buttonCreateReport.Location = new Point(485, 11);
|
||||
buttonCreateReport.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonCreateReport.Name = "buttonCreateReport";
|
||||
buttonCreateReport.Size = new Size(166, 38);
|
||||
buttonCreateReport.TabIndex = 4;
|
||||
buttonCreateReport.Text = "Сформировать";
|
||||
buttonCreateReport.UseVisualStyleBackColor = true;
|
||||
buttonCreateReport.Click += buttonCreateReport_Click;
|
||||
//
|
||||
// FormReportDateOrders
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(854, 450);
|
||||
Controls.Add(panel);
|
||||
Name = "FormReportDateOrders";
|
||||
Text = "Заказы по датам";
|
||||
panel.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel panel;
|
||||
private Button buttonCreateToPdf;
|
||||
private Button buttonCreateReport;
|
||||
}
|
||||
}
|
71
IceCreamShop/IceCreamShop/FormReportDateOrders.cs
Normal file
71
IceCreamShop/IceCreamShop/FormReportDateOrders.cs
Normal file
@ -0,0 +1,71 @@
|
||||
using IceCreamShopContracts.BindingModels;
|
||||
using IceCreamShopContracts.BusinessLogicsContracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Reporting.WinForms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace IceCreamShopView
|
||||
{
|
||||
public partial class FormReportDateOrders : Form
|
||||
{
|
||||
private readonly ReportViewer reportViewer;
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IReportLogic _logic;
|
||||
public FormReportDateOrders(ILogger<FormReportDateOrders> logger, IReportLogic reportLogic)
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_logic = reportLogic;
|
||||
reportViewer = new ReportViewer
|
||||
{
|
||||
Dock = DockStyle.Fill
|
||||
};
|
||||
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrdersByDate.rdlc", FileMode.Open));
|
||||
Controls.Clear();
|
||||
Controls.Add(reportViewer);
|
||||
Controls.Add(panel);
|
||||
}
|
||||
|
||||
private void buttonCreateReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataSource = _logic.GetDateOrders();
|
||||
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||
reportViewer.LocalReport.DataSources.Clear();
|
||||
reportViewer.LocalReport.DataSources.Add(source);
|
||||
reportViewer.RefreshReport();
|
||||
_logger.LogInformation("Загрузка списка заказов на весь период по датам");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки списка заказов на период");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonCreateToPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
_logic.SaveDateOrdersToPdfFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
_logger.LogInformation("Сохранение списка заказов на весь период по датам");
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка сохранения списка заказов на период");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
60
IceCreamShop/IceCreamShop/FormReportDateOrders.resx
Normal file
60
IceCreamShop/IceCreamShop/FormReportDateOrders.resx
Normal file
@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -25,7 +25,7 @@ namespace IceCreamShopView
|
||||
{
|
||||
try
|
||||
{
|
||||
_logic.SaveShopDocumentsToExcelFile(new ReportBindingModel
|
||||
_logic.SaveIceCreamsToWordFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
@ -46,14 +46,14 @@ namespace IceCreamShopView
|
||||
{
|
||||
try
|
||||
{
|
||||
var dict = _logic.GetShopDocuments();
|
||||
var dict = _logic.GetShopIceCreams();
|
||||
if (dict != null)
|
||||
{
|
||||
dataGridView.Rows.Clear();
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" });
|
||||
foreach (var listElem in elem.Documents)
|
||||
foreach (var listElem in elem.IceCreams)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
||||
}
|
||||
|
@ -30,6 +30,9 @@
|
||||
<None Update="ReportOrders.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="ReportOrdersByDate.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;
|
||||
using NLog.Extensions.Logging;
|
||||
using IceCreamBusinessLogic.OfficePackage.Implements;
|
||||
using IceCreamBusinessLogic.OfficePackage;
|
||||
using IceCreamShopDatabaseImplement.Implements;
|
||||
using IceCreamShopFileImplement.Implements;
|
||||
|
||||
namespace IceCreamShop
|
||||
{
|
||||
@ -67,6 +67,7 @@ namespace IceCreamShop
|
||||
services.AddTransient<FormShopSupply>();
|
||||
services.AddTransient<FormSellIceCream>();
|
||||
services.AddTransient<FormReportShopWorkload>();
|
||||
services.AddTransient<FormReportDateOrders>();
|
||||
}
|
||||
}
|
||||
}
|
408
IceCreamShop/IceCreamShop/ReportOrdersByDate.rdlc
Normal file
408
IceCreamShop/IceCreamShop/ReportOrdersByDate.rdlc
Normal file
@ -0,0 +1,408 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
|
||||
<Body>
|
||||
<ReportItems>
|
||||
|
||||
<Textbox Name="TextboxTitle">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Заказы</Value>
|
||||
<Style>
|
||||
<FontSize>16pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<Height>1cm</Height>
|
||||
<Width>21cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Middle</VerticalAlign>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>3cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>7cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Дата</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Количество</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Сумма</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="DateCreate">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!DateCreate.Value</Value>
|
||||
<Style>
|
||||
<Format>d</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>DateCreate</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="CountOrders">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!CountOrders.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>CountOrders</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SumOrders">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SumOrders.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SumOrders</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Подробности" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSetOrders</DataSetName>
|
||||
<Top>2.48391cm</Top>
|
||||
<Left>0.55245cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>13cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Double</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
|
||||
<Textbox Name="TextboxTotalSum">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Всего:</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<Top>4cm</Top>
|
||||
<Left>8.55245cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
|
||||
<Textbox Name="SumTotal">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Sum(Fields!SumOrders.Value, "DataSetOrders")</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<Top>4cm</Top>
|
||||
<Left>11.05245cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
|
||||
</ReportItems>
|
||||
<Height>5.72875cm</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>21cm</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>e6968c47-74e2-4a36-be2a-eb9e655f8afd</rd:ReportID>
|
||||
|
||||
<DataSources>
|
||||
<DataSource Name="IceCreamShopContractsViewModels">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bf577a27-98a7-43b2-8beb-1a37d37ce5cd</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
|
||||
<DataSets>
|
||||
<DataSet Name="DataSetOrders">
|
||||
<Query>
|
||||
<DataSourceName>IceCreamShopContractsViewModels</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="DateCreate">
|
||||
<DataField>DateCreate</DataField>
|
||||
<rd:TypeName>System.DateTime</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CountOrders">
|
||||
<DataField>CountOrders</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SumOrders">
|
||||
<DataField>SumOrders</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>IceCreamShopContracts.ViewModels</rd:DataSetName>
|
||||
<rd:TableName>ReportOrderViewModel</rd:TableName>
|
||||
<rd:ObjectDataSourceType>IceCreamShopContracts.ViewModels.ReportDateOrdersViewModel, IceCreamShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
</Report>
|
@ -46,5 +46,12 @@ namespace IceCreamShopContracts.BusinessLogicsContracts
|
||||
/// <param name="model"></param>
|
||||
void SaveShopsToWordFile(ReportBindingModel model);
|
||||
|
||||
public void SaveShopWorkloadToExcelFile(ReportBindingModel model);
|
||||
|
||||
public List<ReportShopWorkloadViewModel> GetShopIceCreams();
|
||||
|
||||
List<ReportDateOrdersViewModel> GetDateOrders();
|
||||
|
||||
void SaveDateOrdersToPdfFile(ReportBindingModel model);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
|
||||
namespace IceCreamShopContracts.ViewModels
|
||||
{
|
||||
public class ReportDateOrdersViewModel
|
||||
{
|
||||
public DateTime DateCreate { get; set; }
|
||||
public int CountOrders { get; set; }
|
||||
public double SumOrders { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user