diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogics/ReportLogic.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogics/ReportLogic.cs index 35990b2..cad89cb 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogics/ReportLogic.cs @@ -15,6 +15,7 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics private readonly IWorkStorage _workStorage; private readonly IOrderStorage _orderStorage; + private readonly IShopStorage _shopStorage; private readonly AbstractSaveToExcel _saveToExcel; @@ -22,16 +23,17 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics private readonly AbstractSaveToPdf _saveToPdf; - public ReportLogic(IWorkStorage workStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, + public ReportLogic(IWorkStorage workStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, IShopStorage shopStorage, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf) { _workStorage = workStorage; _componentStorage = componentStorage; _orderStorage = orderStorage; + _shopStorage = shopStorage; _saveToExcel = saveToExcel; _saveToWord = saveToWord; - _saveToPdf = saveToPdf; + _saveToPdf = saveToPdf; } /// @@ -65,6 +67,33 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics return list; } + public List GetShopWork() + { + + var shops = _shopStorage.GetFullList(); + + var list = new List(); + + foreach (var shop in shops) + { + var record = new ReportShopWorkViewModel + { + ShopName = shop.ShopName, + Works = new List<(string Work, int count)>(), + TotalCount = 0 + }; + foreach (var work in shop.ShopWorks) + { + record.Works.Add(new(work.Value.Item1.WorkName, work.Value.Item2)); + record.TotalCount += work.Value.Item2; + } + + list.Add(record); + } + + return list; + } + /// /// Получение списка заказов за определенный период /// @@ -84,6 +113,19 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics .ToList(); } + public List GetOrdersByDate() + { + return _orderStorage.GetFullList() + .GroupBy(x => x.DateCreate.Date) + .Select(x => new ReportOrderByDateViewModel + { + DateCreate = x.Key, + Count = x.Count(), + Sum = x.Sum(x=> x.Sum) + }) + .ToList(); + } + /// /// Сохранение компонент в файл-Word /// @@ -97,6 +139,15 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics Works = _workStorage.GetFullList() }); } + public void SaveShopsToWordFile(ReportBindingModel model) + { + _saveToWord.CreateDocShopTable(new WordInfoShopTable + { + FileName = model.FileName, + Title = "Список магазинов", + Shops = _shopStorage.GetFullList() + }); + } /// /// Сохранение компонент с указаеним продуктов в файл-Excel @@ -111,6 +162,15 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics WorkComponents = GetWorkComponent() }); } + public void SaveShopWorkToExcelFile(ReportBindingModel model) + { + _saveToExcel.CreateReportShop(new ExcelInfoShop + { + FileName = model.FileName, + Title = "Список магазинов", + ShopWorks = GetShopWork() + }); + } /// /// Сохранение заказов в файл-Pdf @@ -127,5 +187,14 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics Orders = GetOrders(model) }); } + public void SaveOrdersByDateToPdfFile(ReportBindingModel model) + { + _saveToPdf.CreateDocOrdersByDate(new PdfInfoOrdersByDate + { + FileName = model.FileName, + Title = "Список заказов", + Orders = GetOrdersByDate() + }); + } } } \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToExcel.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToExcel.cs index f35c797..b4960c7 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToExcel.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToExcel.cs @@ -80,11 +80,85 @@ namespace PlumbingRepairBusinessLogic.OfficePackage SaveExcel(info); } - /// - /// Создание excel-файла - /// - /// - protected abstract void CreateExcel(ExcelInfo info); + /// + /// Создание отчета по магазинам + /// + /// + public void CreateReportShop(ExcelInfoShop info) + { + CreateExcel(new ExcelInfo() { FileName = info.FileName}); + + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "A", + RowIndex = 1, + Text = info.Title, + StyleInfo = ExcelStyleInfoType.Title + }); + + MergeCells(new ExcelMergeParameters + { + CellFromName = "A1", + CellToName = "C1" + }); + + uint rowIndex = 2; + foreach (var pc in info.ShopWorks) + { + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "A", + RowIndex = rowIndex, + Text = pc.ShopName, + StyleInfo = ExcelStyleInfoType.Text + }); + rowIndex++; + + foreach (var (Work, Count) in pc.Works) + { + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "B", + RowIndex = rowIndex, + Text = Work, + StyleInfo = ExcelStyleInfoType.TextWithBroder + }); + + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "C", + RowIndex = rowIndex, + Text = Count.ToString(), + StyleInfo = ExcelStyleInfoType.TextWithBroder + }); + + rowIndex++; + } + + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "A", + RowIndex = rowIndex, + Text = "Итого", + StyleInfo = ExcelStyleInfoType.Text + }); + InsertCellInWorksheet(new ExcelCellParameters + { + ColumnName = "C", + RowIndex = rowIndex, + Text = pc.TotalCount.ToString(), + StyleInfo = ExcelStyleInfoType.Text + }); + rowIndex++; + } + + SaveExcel(new ExcelInfo() { FileName = info.FileName }); + } + /// + /// Создание excel-файла + /// + /// + protected abstract void CreateExcel(ExcelInfo info); /// /// Добавляем новую ячейку в лист diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToPdf.cs index 75045d6..aaf4746 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToPdf.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -33,6 +33,34 @@ namespace PlumbingRepairBusinessLogic.OfficePackage SavePdf(info); } + public void CreateDocOrdersByDate(PdfInfoOrdersByDate info) + { + CreatePdf(new PdfInfo() { FileName = info.FileName}); + CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); + + CreateTable(new List { "3cm", "3cm", "3cm"}); + + CreateRow(new PdfRowParameters + { + Texts = new List { "Дата", "Количество", "Сумма"}, + Style = "NormalTitle", + ParagraphAlignment = PdfParagraphAlignmentType.Center + }); + + foreach (var order in info.Orders) + { + CreateRow(new PdfRowParameters + { + Texts = new List { order.DateCreate.ToShortDateString(), order.Count.ToString(), order.Sum.ToString()}, + Style = "Normal", + ParagraphAlignment = PdfParagraphAlignmentType.Left + }); + } + + CreateParagraph(new PdfParagraph { Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Right }); + + SavePdf(new PdfInfo() { FileName = info.FileName}); + } /// /// Создание doc-файла diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToWord.cs index bae1f65..b823ae1 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToWord.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/AbstractSaveToWord.cs @@ -34,7 +34,36 @@ namespace PlumbingRepairBusinessLogic.OfficePackage SaveWord(info); } + public void CreateDocShopTable(WordInfoShopTable info) + { + CreateWord(new WordInfo() { FileName = info.FileName}); + CreateParagraph(new WordParagraph + { + Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) }, + TextProperties = new WordTextProperties + { + Size = "24", + JustificationType = WordJustificationType.Center + } + }); + + + CreateTable(new WordTable + { + Columns = new() { ("Название",3000),("Адрес",3000),("Дата открытия",3000)}, + Rows = info.Shops.Select(x => new List + { + x.ShopName, + x.Address, + Convert.ToString(x.DateOpening), + }) + .ToList() + });; + + + SaveWord(new WordInfo() { FileName = info.FileName}); + } /// /// Создание doc-файла /// @@ -47,6 +76,7 @@ namespace PlumbingRepairBusinessLogic.OfficePackage /// /// protected abstract void CreateParagraph(WordParagraph paragraph); + protected abstract void CreateTable(WordTable table); /// /// Сохранение файла diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/ExcelInfoShop.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/ExcelInfoShop.cs new file mode 100644 index 0000000..4898b45 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/ExcelInfoShop.cs @@ -0,0 +1,13 @@ +using PlumbingRepairContracts.ViewModels; + +namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels +{ + public class ExcelInfoShop + { + public string FileName { get; set; } = string.Empty; + + public string Title { get; set; } = string.Empty; + + public List ShopWorks { get; set; } = new(); + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/PdfInfoOrdersByDate.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/PdfInfoOrdersByDate.cs new file mode 100644 index 0000000..c4f53d1 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/PdfInfoOrdersByDate.cs @@ -0,0 +1,12 @@ +using PlumbingRepairContracts.ViewModels; + +namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels +{ + public class PdfInfoOrdersByDate + { + public string FileName { get; set; } = string.Empty; + + public string Title { get; set; } = string.Empty; + public List Orders { get; set; } = new(); + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordInfoShopTable.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordInfoShopTable.cs new file mode 100644 index 0000000..c3d64f0 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordInfoShopTable.cs @@ -0,0 +1,13 @@ +using PlumbingRepairContracts.ViewModels; + +namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels +{ + public class WordInfoShopTable + { + public string FileName { get; set; } = string.Empty; + + public string Title { get; set; } = string.Empty; + + public List Shops { get; set; } = new(); + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordTable.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordTable.cs new file mode 100644 index 0000000..9a4f7e8 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/HelperModels/WordTable.cs @@ -0,0 +1,8 @@ +namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels +{ + public class WordTable + { + public List<(string, int)> Columns { get; set; } = new(); + public List> Rows { get; set; } = new(); + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/Implements/SaveToWord.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/Implements/SaveToWord.cs index 2902910..cf4a0ec 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/Implements/SaveToWord.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/OfficePackage/Implements/SaveToWord.cs @@ -119,6 +119,40 @@ namespace PlumbingRepairBusinessLogic.OfficePackage.Implements _docBody.AppendChild(docParagraph); } + private static TableCell CreateTableCell(string text, int? cellWidth = null) + { + TableCell tableCell = new(new Paragraph(new Run(new Text(text)))); + tableCell.Append(new TableCellProperties() + { + TableCellWidth = new() { Width = cellWidth.ToString() } + }); + return tableCell; + } + protected override void CreateTable(WordTable table) + { + if (_docBody == null || table == null) + { + return; + } + var docTable = new Table(); + + TableProperties tableProperties = new( + new TableBorders( + new TopBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 }, + new BottomBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 }, + new LeftBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 }, + new RightBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 }, + new InsideHorizontalBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 }, + new InsideVerticalBorder() { Val = new EnumValue(BorderValues.BasicBlackDashes), Size = 3 } + ) + ); + docTable.AppendChild(tableProperties); + + docTable.Append(new TableRow(table.Columns.Select(x => CreateTableCell(x.Item1, x.Item2)))); + docTable.Append(table.Rows.Select(x => new TableRow(x.Select(y => CreateTableCell(y))))); + + _docBody.AppendChild(docTable); + } protected override void SaveWord(WordInfo info) { if (_docBody == null || _wordDocument == null) diff --git a/PlumbingRepair/PlumbingRepairContracts/BusinessLogicsContracts/IReportLogic.cs b/PlumbingRepair/PlumbingRepairContracts/BusinessLogicsContracts/IReportLogic.cs index 8ebb970..e7ef301 100644 --- a/PlumbingRepair/PlumbingRepairContracts/BusinessLogicsContracts/IReportLogic.cs +++ b/PlumbingRepair/PlumbingRepairContracts/BusinessLogicsContracts/IReportLogic.cs @@ -10,6 +10,7 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts /// /// List GetWorkComponent(); + List GetShopWork(); /// /// Получение списка заказов за определенный период @@ -17,6 +18,8 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts /// /// List GetOrders(ReportBindingModel model); + List GetOrdersByDate(); + /// /// Сохранение компонент в файл-Word @@ -35,5 +38,9 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts /// /// void SaveOrdersToPdfFile(ReportBindingModel model); + + void SaveShopsToWordFile(ReportBindingModel model); + void SaveShopWorkToExcelFile(ReportBindingModel model); + public void SaveOrdersByDateToPdfFile(ReportBindingModel model); } } diff --git a/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportOrdersByDateViewModel.cs b/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportOrdersByDateViewModel.cs new file mode 100644 index 0000000..27c3574 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportOrdersByDateViewModel.cs @@ -0,0 +1,11 @@ +namespace PlumbingRepairContracts.ViewModels +{ + public class ReportOrderByDateViewModel + { + public DateTime DateCreate { get; set; } + + public int Count { get; set; } + public double Sum{ get; set; } + + } +} diff --git a/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportShopWorkViewModel.cs b/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportShopWorkViewModel.cs new file mode 100644 index 0000000..2edb013 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairContracts/ViewModels/ReportShopWorkViewModel.cs @@ -0,0 +1,11 @@ +namespace PlumbingRepairContracts.ViewModels +{ + public class ReportShopWorkViewModel + { + public string ShopName { get; set; } = string.Empty; + + public int TotalCount { get; set; } + + public List<(string Work, int Count)> Works { get; set; } = new(); + } +} diff --git a/PlumbingRepair/PlumbingRepairView/FormMain.Designer.cs b/PlumbingRepair/PlumbingRepairView/FormMain.Designer.cs index e876a16..8aed46c 100644 --- a/PlumbingRepair/PlumbingRepairView/FormMain.Designer.cs +++ b/PlumbingRepair/PlumbingRepairView/FormMain.Designer.cs @@ -38,16 +38,20 @@ this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.РаботыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); -<<<<<<< HEAD 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.компонентыПоРаботамToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.списокЗаказовToolStripMenuItem2 = 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.работыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.списокЗаказовToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); ->>>>>>> laba_4 ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -137,7 +141,7 @@ this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.справочникиToolStripMenuItem, - this.списокИзделийToolStripMenuItem}); + this.отчетыToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1377, 33); @@ -170,7 +174,6 @@ this.РаботыToolStripMenuItem.Text = "Работы"; this.РаботыToolStripMenuItem.Click += new System.EventHandler(this.РаботыToolStripMenuItem_Click); // -<<<<<<< HEAD // магазиныToolStripMenuItem // this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem"; @@ -191,7 +194,62 @@ this.продажаРаботToolStripMenuItem.Size = new System.Drawing.Size(296, 34); this.продажаРаботToolStripMenuItem.Text = "Продажа работ"; this.продажаРаботToolStripMenuItem.Click += new System.EventHandler(this.продажаРаботToolStripMenuItem_Click); -======= + // + // отчетыToolStripMenuItem + // + this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.списокКомпонентовToolStripMenuItem, + this.компонентыПоРаботамToolStripMenuItem, + this.списокЗаказовToolStripMenuItem2, + this.списокМагазиновToolStripMenuItem, + this.работыПоМагазинамToolStripMenuItem, + this.списокПоВсемToolStripMenuItem}); + this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; + this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(88, 29); + this.отчетыToolStripMenuItem.Text = "Отчеты"; + // + // списокКомпонентовToolStripMenuItem + // + this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem"; + this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(319, 34); + this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов"; + this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click); + // + // компонентыПоРаботамToolStripMenuItem + // + this.компонентыПоРаботамToolStripMenuItem.Name = "компонентыПоРаботамToolStripMenuItem"; + this.компонентыПоРаботамToolStripMenuItem.Size = new System.Drawing.Size(319, 34); + this.компонентыПоРаботамToolStripMenuItem.Text = "Компоненты по работам"; + this.компонентыПоРаботамToolStripMenuItem.Click += new System.EventHandler(this.ComponentProductsToolStripMenuItem_Click); + // + // списокЗаказовToolStripMenuItem2 + // + this.списокЗаказовToolStripMenuItem2.Name = "списокЗаказовToolStripMenuItem2"; + this.списокЗаказовToolStripMenuItem2.Size = new System.Drawing.Size(319, 34); + this.списокЗаказовToolStripMenuItem2.Text = "Список заказов"; + this.списокЗаказовToolStripMenuItem2.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click); + // + // списокМагазиновToolStripMenuItem + // + this.списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem"; + this.списокМагазиновToolStripMenuItem.Size = new System.Drawing.Size(319, 34); + this.списокМагазиновToolStripMenuItem.Text = "Список магазинов"; + this.списокМагазиновToolStripMenuItem.Click += new System.EventHandler(this.ShopsToolStripMenuItem_Click); + // + // работыПоМагазинамToolStripMenuItem + // + this.работыПоМагазинамToolStripMenuItem.Name = "работыПоМагазинамToolStripMenuItem"; + this.работыПоМагазинамToolStripMenuItem.Size = new System.Drawing.Size(319, 34); + this.работыПоМагазинамToolStripMenuItem.Text = "Работы по магазинам"; + this.работыПоМагазинамToolStripMenuItem.Click += new System.EventHandler(this.ShopWorksToolStripMenuItem_Click); + // + // списокПоВсемToolStripMenuItem + // + this.списокПоВсемToolStripMenuItem.Name = "списокПоВсемToolStripMenuItem"; + this.списокПоВсемToolStripMenuItem.Size = new System.Drawing.Size(319, 34); + this.списокПоВсемToolStripMenuItem.Text = "Список всех заказов"; + this.списокПоВсемToolStripMenuItem.Click += new System.EventHandler(this.OrdersByDateToolStripMenuItem_Click); + // // списокИзделийToolStripMenuItem // this.списокИзделийToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -201,7 +259,7 @@ this.списокИзделийToolStripMenuItem.Name = "списокИзделийToolStripMenuItem"; this.списокИзделийToolStripMenuItem.Size = new System.Drawing.Size(88, 29); this.списокИзделийToolStripMenuItem.Text = "Отчеты"; - this.списокИзделийToolStripMenuItem.Click += new System.EventHandler(this.списокИзделийToolStripMenuItem_Click); + this.списокИзделийToolStripMenuItem.Click += new System.EventHandler(this.ComponentProductsToolStripMenuItem_Click); // // работыПоИзделиямToolStripMenuItem // @@ -223,7 +281,6 @@ this.списокЗаказовToolStripMenuItem1.Size = new System.Drawing.Size(283, 34); this.списокЗаказовToolStripMenuItem1.Text = "Список заказов"; this.списокЗаказовToolStripMenuItem1.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click); ->>>>>>> laba_4 // // FormMain // @@ -261,15 +318,19 @@ private ToolStripMenuItem справочникиToolStripMenuItem; private ToolStripMenuItem компонентыToolStripMenuItem; private ToolStripMenuItem РаботыToolStripMenuItem; -<<<<<<< HEAD private ToolStripMenuItem магазиныToolStripMenuItem; private ToolStripMenuItem пToolStripMenuItem; private ToolStripMenuItem продажаРаботToolStripMenuItem; -======= private ToolStripMenuItem списокИзделийToolStripMenuItem; private ToolStripMenuItem работыПоИзделиямToolStripMenuItem; private ToolStripMenuItem списокЗаказовToolStripMenuItem; private ToolStripMenuItem списокЗаказовToolStripMenuItem1; ->>>>>>> laba_4 + private ToolStripMenuItem отчетыToolStripMenuItem; + private ToolStripMenuItem списокКомпонентовToolStripMenuItem; + private ToolStripMenuItem компонентыПоРаботамToolStripMenuItem; + private ToolStripMenuItem списокЗаказовToolStripMenuItem2; + private ToolStripMenuItem списокМагазиновToolStripMenuItem; + private ToolStripMenuItem работыПоМагазинамToolStripMenuItem; + private ToolStripMenuItem списокПоВсемToolStripMenuItem; } } \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormMain.cs b/PlumbingRepair/PlumbingRepairView/FormMain.cs index 73dbcd7..dd71ed5 100644 --- a/PlumbingRepair/PlumbingRepairView/FormMain.cs +++ b/PlumbingRepair/PlumbingRepairView/FormMain.cs @@ -1,5 +1,4 @@ -using AbstractShopView; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using PlumbingRepairBusinessLogic.BusinessLogics; using PlumbingRepairContracts.BindingModels; using PlumbingRepairContracts.BusinessLogicsContracts; @@ -35,7 +34,7 @@ namespace PlumbingRepairView if (list != null) { dataGridView.DataSource = list; - dataGridView.Columns["WorkId"].Visible= false; + dataGridView.Columns["WorkId"].Visible = false; } _logger.LogInformation("Загрузка заказов"); } @@ -194,7 +193,6 @@ namespace PlumbingRepairView LoadData(); } -<<<<<<< HEAD private void продажаРаботToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormSellWorks)); @@ -202,11 +200,50 @@ namespace PlumbingRepairView { form.ShowDialog(); } -======= - private void списокИзделийToolStripMenuItem_Click(object sender, EventArgs e) - { + } ->>>>>>> laba_4 + private void ComponentWorksToolStripMenuItem_Click(object sender, + EventArgs e) + { + var service = + Program.ServiceProvider?.GetService(typeof(FormReportWorkComponents)); + if (service is FormReportWorkComponents form) + { + form.ShowDialog(); + } + } + + private void ShopsToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveShopsToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + private void ShopWorksToolStripMenuItem_Click(object sender, + EventArgs e) + { + var service = + Program.ServiceProvider?.GetService(typeof(FormReportShopWorks)); + if (service is FormReportShopWorks form) + { + form.ShowDialog(); + } + } + private void OrdersByDateToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = + Program.ServiceProvider?.GetService(typeof(FormReportOrdersByDate)); + if (service is FormReportOrdersByDate form) + { + form.ShowDialog(); + } } } } \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.Designer.cs b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.Designer.cs new file mode 100644 index 0000000..0c08c33 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.Designer.cs @@ -0,0 +1,90 @@ +namespace PlumbingRepairView +{ + partial class FormReportOrdersByDate + { + /// + /// 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.button1 = new System.Windows.Forms.Button(); + this.buttonToPdf = new System.Windows.Forms.Button(); + this.panel = new System.Windows.Forms.Panel(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(422, 14); + this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(199, 45); + this.button1.TabIndex = 6; + this.button1.Text = "В Pdf"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.ButtonToPdf_Click); + // + // buttonToPdf + // + this.buttonToPdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonToPdf.Location = new System.Drawing.Point(1955, 13); + this.buttonToPdf.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.buttonToPdf.Name = "buttonToPdf"; + this.buttonToPdf.Size = new System.Drawing.Size(199, 45); + this.buttonToPdf.TabIndex = 5; + this.buttonToPdf.Text = "В Pdf"; + this.buttonToPdf.UseVisualStyleBackColor = true; + // + // panel + // + this.panel.Controls.Add(this.button1); + this.panel.Controls.Add(this.buttonToPdf); + 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(6, 5, 6, 5); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(901, 67); + this.panel.TabIndex = 1; + // + // FormReportOrdersByDate + // + this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(901, 450); + this.Controls.Add(this.panel); + this.Name = "FormReportOrdersByDate"; + this.Text = "Заказы за весь период"; + this.Load += new System.EventHandler(this.FormReportOrdersByDate_Load); + this.panel.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private Button button1; + private Button buttonToPdf; + private Panel panel; + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.cs b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.cs new file mode 100644 index 0000000..831faf5 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.cs @@ -0,0 +1,74 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; +using PlumbingRepairContracts.BindingModels; +using PlumbingRepairContracts.BusinessLogicsContracts; + +namespace PlumbingRepairView +{ + public partial class FormReportOrdersByDate : Form + { + private readonly ReportViewer reportViewer; + + private readonly ILogger _logger; + + private readonly IReportLogic _logic; + public FormReportOrdersByDate(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + 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 FormReportOrdersByDate_Load(object sender, EventArgs e) + { + + try + { + var dataSource = _logic.GetOrdersByDate(); + 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 ButtonToPdf_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveOrdersByDateToPdfFile(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/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.resx b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.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/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.Designer.cs b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.Designer.cs new file mode 100644 index 0000000..ae04838 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.Designer.cs @@ -0,0 +1,121 @@ +namespace PlumbingRepairView +{ + partial class FormReportShopWorks + { + /// + /// 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.Shop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Work = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + this.SuspendLayout(); + // + // buttonSaveToExcel + // + this.buttonSaveToExcel.Location = new System.Drawing.Point(14, 15); + this.buttonSaveToExcel.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.buttonSaveToExcel.Name = "buttonSaveToExcel"; + this.buttonSaveToExcel.Size = new System.Drawing.Size(265, 44); + this.buttonSaveToExcel.TabIndex = 2; + this.buttonSaveToExcel.Text = "Сохранить в Excel"; + this.buttonSaveToExcel.UseVisualStyleBackColor = true; + this.buttonSaveToExcel.Click += new System.EventHandler(this.ButtonSaveToExcel_Click); + // + // dataGridView + // + this.dataGridView.AllowUserToAddRows = false; + this.dataGridView.AllowUserToDeleteRows = false; + this.dataGridView.AllowUserToOrderColumns = true; + this.dataGridView.AllowUserToResizeColumns = false; + this.dataGridView.AllowUserToResizeRows = false; + this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; + this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Shop, + this.Work, + this.Count}); + this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom; + this.dataGridView.Location = new System.Drawing.Point(0, 68); + this.dataGridView.MultiSelect = false; + this.dataGridView.Name = "dataGridView"; + this.dataGridView.ReadOnly = true; + this.dataGridView.RowHeadersVisible = false; + this.dataGridView.RowHeadersWidth = 62; + this.dataGridView.RowTemplate.Height = 33; + this.dataGridView.Size = new System.Drawing.Size(455, 423); + this.dataGridView.TabIndex = 3; + // + // Shop + // + this.Shop.HeaderText = "Магазин"; + this.Shop.MinimumWidth = 8; + this.Shop.Name = "Shop"; + this.Shop.ReadOnly = true; + this.Shop.Width = 150; + // + // Work + // + this.Work.HeaderText = "Работа"; + this.Work.MinimumWidth = 8; + this.Work.Name = "Work"; + this.Work.ReadOnly = true; + this.Work.Width = 150; + // + // Count + // + this.Count.HeaderText = "Количество"; + this.Count.MinimumWidth = 8; + this.Count.Name = "Count"; + this.Count.ReadOnly = true; + this.Count.Width = 150; + // + // FormReportShopWorks + // + this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(455, 491); + this.Controls.Add(this.dataGridView); + this.Controls.Add(this.buttonSaveToExcel); + this.Name = "FormReportShopWorks"; + this.Text = "Работы по магазинам"; + this.Load += new System.EventHandler(this.FormReportShopWorks_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Button buttonSaveToExcel; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn Shop; + private DataGridViewTextBoxColumn Work; + private DataGridViewTextBoxColumn Count; + } +} \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.cs b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.cs new file mode 100644 index 0000000..f043e58 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.cs @@ -0,0 +1,70 @@ +using AbstractShopView; +using Microsoft.Extensions.Logging; +using PlumbingRepairContracts.BindingModels; +using PlumbingRepairContracts.BusinessLogicsContracts; + + +namespace PlumbingRepairView +{ + public partial class FormReportShopWorks : Form + { + private readonly ILogger _logger; + + private readonly IReportLogic _logic; + public FormReportShopWorks(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + private void FormReportShopWorks_Load(object sender, EventArgs e) + { + try + { + var dict = _logic.GetShopWork(); + if (dict != null) + { + dataGridView.Rows.Clear(); + foreach (var elem in dict) + { + dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" }); + foreach (var listElem in elem.Works) + { + 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.SaveShopWorkToExcelFile(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/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.resx b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.resx new file mode 100644 index 0000000..c7b3923 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/FormReportShopWorks.resx @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/FormReportWorkComponents.cs b/PlumbingRepair/PlumbingRepairView/FormReportWorkComponents.cs index dacb174..be96f9f 100644 --- a/PlumbingRepair/PlumbingRepairView/FormReportWorkComponents.cs +++ b/PlumbingRepair/PlumbingRepairView/FormReportWorkComponents.cs @@ -2,7 +2,7 @@ using PlumbingRepairContracts.BusinessLogicsContracts; using Microsoft.Extensions.Logging; -namespace AbstractShopView +namespace PlumbingRepairView { public partial class FormReportWorkComponents : Form { diff --git a/PlumbingRepair/PlumbingRepairView/Program.cs b/PlumbingRepair/PlumbingRepairView/Program.cs index 187f991..9f3db3d 100644 --- a/PlumbingRepair/PlumbingRepairView/Program.cs +++ b/PlumbingRepair/PlumbingRepairView/Program.cs @@ -41,24 +41,17 @@ namespace PlumbingRepairView services.AddTransient(); services.AddTransient(); services.AddTransient(); -<<<<<<< HEAD services.AddTransient(); -======= - ->>>>>>> laba_4 services.AddTransient(); services.AddTransient(); services.AddTransient(); -<<<<<<< HEAD services.AddTransient(); -======= services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); ->>>>>>> laba_4 services.AddTransient(); services.AddTransient(); @@ -69,13 +62,12 @@ namespace PlumbingRepairView services.AddTransient(); services.AddTransient(); services.AddTransient(); -<<<<<<< HEAD services.AddTransient(); services.AddTransient(); -======= services.AddTransient(); + services.AddTransient(); services.AddTransient(); ->>>>>>> laba_4 + services.AddTransient(); } } } \ No newline at end of file diff --git a/PlumbingRepair/PlumbingRepairView/ReportOrdersByDate.rdlc b/PlumbingRepair/PlumbingRepairView/ReportOrdersByDate.rdlc new file mode 100644 index 0000000..f14a031 --- /dev/null +++ b/PlumbingRepair/PlumbingRepairView/ReportOrdersByDate.rdlc @@ -0,0 +1,404 @@ + + + + + + true + true + + + + + Заказы + + + + + + + Textbox1 + 0.89986cm + 11.67694cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.81116cm + + + 3.5551cm + + + 3.72296cm + + + + + 0.6cm + + + + + true + true + + + + + Дата создания + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Количество + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!DateCreate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Count.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 1.07625cm + 0.30551cm + 1.2cm + 11.08922cm + 1 + + + + + + true + true + + + + + Итого: + + + + + + + Textbox12 + 2.73389cm + 5.43634cm + 0.6cm + 2.23542cm + 2 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + + + + + Textbox11 + 2.73389cm + 7.67176cm + 0.6cm + 3.72296cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.55556in +