PIbd-22. Kozlova A.A. Lab work 04 hard #13
@ -19,17 +19,20 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
|
||||
private readonly IOrderStorage _orderStorage;
|
||||
|
||||
private readonly IShopStorage _shopStorage;
|
||||
|
||||
private readonly AbstractSaveToExcel _saveToExcel;
|
||||
|
||||
private readonly AbstractSaveToWord _saveToWord;
|
||||
|
||||
private readonly AbstractSaveToPdf _saveToPdf;
|
||||
|
||||
public ReportLogic(IReinforcedStorage reinforcedStorage, IComponentStorage componentStorage, IOrderStorage orderStorage,
|
||||
public ReportLogic(IReinforcedStorage reinforcedStorage, IComponentStorage componentStorage, IShopStorage shopStorage, IOrderStorage orderStorage,
|
||||
AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||
{
|
||||
_reinforcedStorage = reinforcedStorage;
|
||||
_orderStorage = orderStorage;
|
||||
_shopStorage = shopStorage;
|
||||
|
||||
_saveToExcel = saveToExcel;
|
||||
_saveToWord = saveToWord;
|
||||
@ -63,6 +66,32 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ReportShopReinforcedViewModel> GetShopReinforceds()
|
||||
{
|
||||
var shops = _shopStorage.GetFullList();
|
||||
|
||||
var list = new List<ReportShopReinforcedViewModel>();
|
||||
|
||||
foreach (var shop in shops)
|
||||
{
|
||||
var record = new ReportShopReinforcedViewModel
|
||||
{
|
||||
ShopName = shop.ShopName,
|
||||
Reinforceds = new List<(string Reinforced, int Count)>(),
|
||||
TotalCount = 0,
|
||||
};
|
||||
foreach (var reinforced in shop.ShopReinforceds)
|
||||
{
|
||||
record.Reinforceds.Add(new(reinforced.Value.Item1.ReinforcedName, reinforced.Value.Item2));
|
||||
record.TotalCount += reinforced.Value.Item2;
|
||||
}
|
||||
|
||||
list.Add(record);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ReportOrdersViewModel> GetOrders(ReportBindingModel model)
|
||||
{
|
||||
return _orderStorage.GetFilteredList(new OrderSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo })
|
||||
@ -77,6 +106,18 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<ReportOrdersByDateViewModel> GetGroupedByDateOrders()
|
||||
{
|
||||
return _orderStorage.GetFullList().GroupBy(x => x.DateCreate.Date)
|
||||
.Select(x => new ReportOrdersByDateViewModel
|
||||
{
|
||||
Date = x.Key,
|
||||
Count = x.Count(),
|
||||
Sum = x.Sum(y => y.Sum)
|
||||
})
|
||||
.ToList();
|
||||
|
||||
}
|
||||
public void SaveReinforcedsToWordFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToWord.CreateDoc(new WordInfo
|
||||
@ -87,6 +128,16 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveShopsToWordFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToWord.CreateShopsTable(new WordInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список магазинов",
|
||||
Shops = _shopStorage.GetFullList()
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveReinforcedComponentToExcelFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToExcel.CreateReport(new ExcelInfo
|
||||
@ -97,6 +148,16 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveShopReinforcedToExcelFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToExcel.CreateShopReport(new ExcelInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Загруженность магазинов",
|
||||
ShopReinforceds = GetShopReinforceds()
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveOrdersToPdfFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToPdf.CreateDoc(new PdfInfo
|
||||
@ -108,5 +169,15 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
Orders = GetOrders(model)
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveGroupedOrdersToPdfFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToPdf.CreateDocWithGroupedOrders(new PdfInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Заказы по датам",
|
||||
GroupedOrders = GetGroupedByDateOrders()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,6 +81,76 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
||||
SaveExcel(info);
|
||||
}
|
||||
|
||||
public void CreateShopReport(ExcelInfo info)
|
||||
{
|
||||
CreateExcel(info);
|
||||
|
||||
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 si in info.ShopReinforceds)
|
||||
{
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
RowIndex = rowIndex,
|
||||
Text = si.ShopName,
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
rowIndex++;
|
||||
|
||||
foreach (var (Reinforced, Count) in si.Reinforceds)
|
||||
{
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = Reinforced,
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = Count.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
});
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
RowIndex = rowIndex,
|
||||
Text = "Итого",
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = si.TotalCount.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
SaveExcel(info);
|
||||
}
|
||||
|
||||
// Создание excel-файла
|
||||
protected abstract void CreateExcel(ExcelInfo info);
|
||||
|
@ -36,8 +36,36 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
||||
SavePdf(info);
|
||||
}
|
||||
|
||||
public void CreateDocWithGroupedOrders(PdfInfo info)
|
||||
{
|
||||
CreatePdf(info);
|
||||
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
|
||||
|
||||
// Создание pdf-файла
|
||||
CreateTable(new List<string> { "5cm", "6cm", "5cm" });
|
||||
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Дата", "Количество заказов", "Сумма" },
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
|
||||
foreach (var order in info.GroupedOrders)
|
||||
{
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { order.Date.ToShortDateString(), order.Count.ToString(), order.Sum.ToString() },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
}
|
||||
CreateParagraph(new PdfParagraph { Text = $"Итого: {info.GroupedOrders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Right });
|
||||
|
||||
SavePdf(info);
|
||||
}
|
||||
|
||||
|
||||
// Создание pdf-файла
|
||||
protected abstract void CreatePdf(PdfInfo info);
|
||||
|
||||
|
||||
|
@ -41,15 +41,67 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
public void CreateShopsTable(WordInfo info)
|
||||
{
|
||||
CreateWord(info);
|
||||
|
||||
// Создание doc-файла
|
||||
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 List<string> { "3000", "3000", "3000" });
|
||||
|
||||
CreateRow(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { ("Название магазина", new WordTextProperties { Size = "24" }),
|
||||
("Адрес", new WordTextProperties { Size = "24" }), ("Дата открытия", new WordTextProperties { Size = "24" }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
Bold = true,
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
|
||||
foreach (var shop in info.Shops)
|
||||
{
|
||||
CreateRow(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { (shop.ShopName, new WordTextProperties { Size = "22" }),
|
||||
(shop.Address, new WordTextProperties { Size = "22" }), (shop.DateOpening.ToString(), new WordTextProperties { Size = "22" })},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "22",
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
|
||||
|
||||
// Создание doc-файла
|
||||
protected abstract void CreateWord(WordInfo info);
|
||||
|
||||
|
||||
// Создание абзаца с текстом
|
||||
protected abstract void CreateParagraph(WordParagraph paragraph);
|
||||
|
||||
//Сохранение файла
|
||||
// Создание таблицы
|
||||
protected abstract void CreateTable(List<string> columns);
|
||||
|
||||
// Создание строки таблицы
|
||||
protected abstract void CreateRow(WordParagraph paragraph);
|
||||
|
||||
//Сохранение файла
|
||||
protected abstract void SaveWord(WordInfo info);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -14,5 +14,7 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public List<ReportReinforcedComponentViewModel> ReinforcedComponents { get; set; } = new();
|
||||
|
||||
public List<ReportShopReinforcedViewModel> ShopReinforceds { get; set; } = new();
|
||||
}
|
||||
}
|
@ -18,5 +18,7 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||
public DateTime DateTo { get; set; }
|
||||
|
||||
public List<ReportOrdersViewModel> Orders { get; set; } = new();
|
||||
|
||||
public List<ReportOrdersByDateViewModel> GroupedOrders { get; set; } = new();
|
||||
}
|
||||
}
|
@ -14,5 +14,7 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public List<ReinforcedViewModel> Reinforceds { get; set; } = new();
|
||||
|
||||
public List<ShopViewModel> Shops { get; set; } = new();
|
||||
}
|
||||
}
|
@ -18,7 +18,9 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.Implements
|
||||
|
||||
private Body? _docBody;
|
||||
|
||||
|
||||
private Table? table;
|
||||
|
||||
|
||||
// Получение типа выравнивания
|
||||
private static JustificationValues GetJustificationValues(WordJustificationType type)
|
||||
{
|
||||
@ -117,6 +119,67 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.Implements
|
||||
_docBody.AppendChild(docParagraph);
|
||||
}
|
||||
|
||||
protected override void CreateTable(List<string> columns)
|
||||
{
|
||||
if (_docBody == null || columns == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
table = new();
|
||||
TableProperties properties = new();
|
||||
properties.AppendChild(new TableLayout { Type = TableLayoutValues.Fixed });
|
||||
properties.AppendChild(new TableBorders(
|
||||
new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||
new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||
new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||
new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||
new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||
new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 }
|
||||
));
|
||||
properties.AppendChild(new TableWidth { Type = TableWidthUnitValues.Auto });
|
||||
table.AppendChild(properties);
|
||||
|
||||
TableGrid tableGrid = new();
|
||||
foreach (var column in columns)
|
||||
{
|
||||
tableGrid.AppendChild(new GridColumn() { Width = column });
|
||||
}
|
||||
table.AppendChild(tableGrid);
|
||||
|
||||
_docBody.AppendChild(table);
|
||||
}
|
||||
|
||||
protected override void CreateRow(WordParagraph paragraph)
|
||||
{
|
||||
if (_docBody == null || table == null || paragraph == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TableRow tableRow = new();
|
||||
foreach (var column in paragraph.Texts)
|
||||
{
|
||||
var tableParagraph = new Paragraph();
|
||||
tableParagraph.AppendChild(CreateParagraphProperties(paragraph.TextProperties));
|
||||
|
||||
var tableRun = new Run();
|
||||
var runProperties = new RunProperties();
|
||||
runProperties.AppendChild(new FontSize { Val = column.Item2.Size });
|
||||
if (column.Item2.Bold)
|
||||
{
|
||||
runProperties.AppendChild(new Bold());
|
||||
}
|
||||
tableRun.AppendChild(runProperties);
|
||||
tableRun.AppendChild(new Text { Text = column.Item1, Space = SpaceProcessingModeValues.Preserve });
|
||||
tableParagraph.AppendChild(tableRun);
|
||||
|
||||
TableCell cell = new();
|
||||
cell.AppendChild(tableParagraph);
|
||||
tableRow.AppendChild(cell);
|
||||
}
|
||||
table.AppendChild(tableRow);
|
||||
}
|
||||
|
||||
protected override void SaveWord(WordInfo info)
|
||||
{
|
||||
if (_docBody == null || _wordDocument == null)
|
||||
|
@ -12,12 +12,22 @@ namespace PrecastConcretePlantContracts.BusinessLogicsContracts
|
||||
{
|
||||
List<ReportReinforcedComponentViewModel> GetReinforcedComponents();
|
||||
|
||||
List<ReportShopReinforcedViewModel> GetShopReinforceds();
|
||||
|
||||
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
|
||||
|
||||
List<ReportOrdersByDateViewModel> GetGroupedByDateOrders();
|
||||
|
||||
void SaveReinforcedsToWordFile(ReportBindingModel model);
|
||||
|
||||
void SaveShopsToWordFile(ReportBindingModel model);
|
||||
|
||||
void SaveReinforcedComponentToExcelFile(ReportBindingModel model);
|
||||
|
||||
void SaveShopReinforcedToExcelFile(ReportBindingModel model);
|
||||
|
||||
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||
|
||||
void SaveGroupedOrdersToPdfFile(ReportBindingModel model);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PrecastConcretePlantContracts.ViewModels
|
||||
{
|
||||
public class ReportOrdersByDateViewModel
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public int Count { get; set; }
|
||||
|
||||
public double Sum { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PrecastConcretePlantContracts.ViewModels
|
||||
{
|
||||
public class ReportShopReinforcedViewModel
|
||||
{
|
||||
public string ShopName { get; set; } = string.Empty;
|
||||
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
public List<(string Reinforced, int Count)> Reinforceds { get; set; } = new();
|
||||
}
|
||||
}
|
@ -38,8 +38,8 @@
|
||||
компонентыПоИзделиямToolStripMenuItem = new ToolStripMenuItem();
|
||||
списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
|
||||
списокМагазиновToolStripMenuItem = new ToolStripMenuItem();
|
||||
загруженностьМагазиновToolStripMenuItem = new ToolStripMenuItem();
|
||||
заказыПоДатамToolStripMenuItem = new ToolStripMenuItem();
|
||||
загруженностьПоМагазинамToolStripMenuItem = new ToolStripMenuItem();
|
||||
пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem();
|
||||
продажаИзделийToolStripMenuItem = new ToolStripMenuItem();
|
||||
buttonIssuedOrder = new Button();
|
||||
@ -54,11 +54,12 @@
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, отчетыToolStripMenuItem, пополнениеМагазинаToolStripMenuItem, продажаИзделийToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Padding = new Padding(7, 2, 0, 2);
|
||||
menuStrip.Size = new Size(1031, 24);
|
||||
menuStrip.Padding = new Padding(8, 3, 0, 3);
|
||||
menuStrip.Size = new Size(1178, 30);
|
||||
menuStrip.TabIndex = 0;
|
||||
menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
@ -66,13 +67,13 @@
|
||||
//
|
||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, изделияToolStripMenuItem, магазиныToolStripMenuItem });
|
||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||
справочникиToolStripMenuItem.Size = new Size(94, 20);
|
||||
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||
справочникиToolStripMenuItem.Text = "Справочники";
|
||||
//
|
||||
// компонентыToolStripMenuItem
|
||||
//
|
||||
компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||
компонентыToolStripMenuItem.Size = new Size(145, 22);
|
||||
компонентыToolStripMenuItem.Size = new Size(182, 26);
|
||||
компонентыToolStripMenuItem.Text = "Компоненты";
|
||||
компонентыToolStripMenuItem.Click += КомпонентыToolStripMenuItem_Click;
|
||||
//
|
||||
@ -86,15 +87,15 @@
|
||||
// магазиныToolStripMenuItem
|
||||
//
|
||||
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||
магазиныToolStripMenuItem.Size = new Size(145, 22);
|
||||
магазиныToolStripMenuItem.Size = new Size(182, 26);
|
||||
магазиныToolStripMenuItem.Text = "Магазины";
|
||||
магазиныToolStripMenuItem.Click += МагазиныToolStripMenuItem_Click;
|
||||
//
|
||||
// отчетыToolStripMenuItem
|
||||
//
|
||||
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокИзделийToolStripMenuItem, компонентыПоИзделиямToolStripMenuItem, списокЗаказовToolStripMenuItem, списокМагазиновToolStripMenuItem, загруженностьМагазиновToolStripMenuItem, заказыПоДатамToolStripMenuItem });
|
||||
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокИзделийToolStripMenuItem, компонентыПоИзделиямToolStripMenuItem, списокЗаказовToolStripMenuItem, списокМагазиновToolStripMenuItem, загруженностьПоМагазинамToolStripMenuItem, заказыПоДатамToolStripMenuItem });
|
||||
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
отчетыToolStripMenuItem.Size = new Size(60, 20);
|
||||
отчетыToolStripMenuItem.Size = new Size(73, 24);
|
||||
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// списокИзделийToolStripMenuItem
|
||||
@ -114,52 +115,52 @@
|
||||
// списокЗаказовToolStripMenuItem
|
||||
//
|
||||
списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
|
||||
списокЗаказовToolStripMenuItem.Size = new Size(235, 22);
|
||||
списокЗаказовToolStripMenuItem.Size = new Size(276, 26);
|
||||
списокЗаказовToolStripMenuItem.Text = "Список заказов";
|
||||
списокЗаказовToolStripMenuItem.Click += СписокЗаказовToolStripMenuItem_Click;
|
||||
//
|
||||
// списокМагазиновToolStripMenuItem
|
||||
//
|
||||
списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem";
|
||||
списокМагазиновToolStripMenuItem.Size = new Size(235, 22);
|
||||
списокМагазиновToolStripMenuItem.Size = new Size(276, 26);
|
||||
списокМагазиновToolStripMenuItem.Text = "Список магазинов";
|
||||
списокМагазиновToolStripMenuItem.Click += СписокМагазиновToolStripMenuItem_Click;
|
||||
//
|
||||
// загруженностьМагазиновToolStripMenuItem
|
||||
//
|
||||
загруженностьМагазиновToolStripMenuItem.Name = "загруженностьМагазиновToolStripMenuItem";
|
||||
загруженностьМагазиновToolStripMenuItem.Size = new Size(235, 22);
|
||||
загруженностьМагазиновToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
загруженностьМагазиновToolStripMenuItem.Click += ЗагруженностьМагазиновToolStripMenuItem_Click;
|
||||
//
|
||||
// заказыПоДатамToolStripMenuItem
|
||||
//
|
||||
заказыПоДатамToolStripMenuItem.Name = "заказыПоДатамToolStripMenuItem";
|
||||
заказыПоДатамToolStripMenuItem.Size = new Size(235, 22);
|
||||
заказыПоДатамToolStripMenuItem.Size = new Size(276, 26);
|
||||
заказыПоДатамToolStripMenuItem.Text = "Заказы по датам";
|
||||
заказыПоДатамToolStripMenuItem.Click += ЗаказыПоДатамToolStripMenuItem_Click;
|
||||
//
|
||||
// загруженностьПоМагазинамToolStripMenuItem
|
||||
//
|
||||
загруженностьПоМагазинамToolStripMenuItem.Name = "загруженностьПоМагазинамToolStripMenuItem";
|
||||
загруженностьПоМагазинамToolStripMenuItem.Size = new Size(276, 26);
|
||||
загруженностьПоМагазинамToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
загруженностьПоМагазинамToolStripMenuItem.Click += ЗагруженностьМагазиновToolStripMenuItem_Click;
|
||||
//
|
||||
// пополнениеМагазинаToolStripMenuItem
|
||||
//
|
||||
пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem";
|
||||
пополнениеМагазинаToolStripMenuItem.Size = new Size(143, 20);
|
||||
пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24);
|
||||
пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина";
|
||||
пополнениеМагазинаToolStripMenuItem.Click += ПополнениеМагазинаToolStripMenuItem_Click;
|
||||
//
|
||||
// продажаИзделийToolStripMenuItem
|
||||
//
|
||||
продажаИзделийToolStripMenuItem.Name = "продажаИзделийToolStripMenuItem";
|
||||
продажаИзделийToolStripMenuItem.Size = new Size(149, 24);
|
||||
продажаИзделийToolStripMenuItem.Size = new Size(147, 24);
|
||||
продажаИзделийToolStripMenuItem.Text = "продажа изделий";
|
||||
продажаИзделийToolStripMenuItem.Click += ПродажаИзделийToolStripMenuItem_Click;
|
||||
//
|
||||
// buttonIssuedOrder
|
||||
//
|
||||
buttonIssuedOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonIssuedOrder.Location = new Point(844, 231);
|
||||
buttonIssuedOrder.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonIssuedOrder.Location = new Point(965, 308);
|
||||
buttonIssuedOrder.Margin = new Padding(5, 4, 5, 4);
|
||||
buttonIssuedOrder.Name = "buttonIssuedOrder";
|
||||
buttonIssuedOrder.Size = new Size(174, 27);
|
||||
buttonIssuedOrder.Size = new Size(199, 36);
|
||||
buttonIssuedOrder.TabIndex = 4;
|
||||
buttonIssuedOrder.Text = "Заказ выдан";
|
||||
buttonIssuedOrder.UseVisualStyleBackColor = true;
|
||||
@ -168,10 +169,10 @@
|
||||
// buttonOrderReady
|
||||
//
|
||||
buttonOrderReady.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonOrderReady.Location = new Point(844, 171);
|
||||
buttonOrderReady.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonOrderReady.Location = new Point(965, 228);
|
||||
buttonOrderReady.Margin = new Padding(5, 4, 5, 4);
|
||||
buttonOrderReady.Name = "buttonOrderReady";
|
||||
buttonOrderReady.Size = new Size(174, 27);
|
||||
buttonOrderReady.Size = new Size(199, 36);
|
||||
buttonOrderReady.TabIndex = 3;
|
||||
buttonOrderReady.Text = "Заказ готов";
|
||||
buttonOrderReady.UseVisualStyleBackColor = true;
|
||||
@ -180,10 +181,10 @@
|
||||
// buttonTakeOrderInWork
|
||||
//
|
||||
buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonTakeOrderInWork.Location = new Point(844, 117);
|
||||
buttonTakeOrderInWork.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonTakeOrderInWork.Location = new Point(965, 156);
|
||||
buttonTakeOrderInWork.Margin = new Padding(5, 4, 5, 4);
|
||||
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
|
||||
buttonTakeOrderInWork.Size = new Size(174, 27);
|
||||
buttonTakeOrderInWork.Size = new Size(199, 36);
|
||||
buttonTakeOrderInWork.TabIndex = 2;
|
||||
buttonTakeOrderInWork.Text = "Отдать на выполнение";
|
||||
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
|
||||
@ -192,10 +193,10 @@
|
||||
// buttonCreateOrder
|
||||
//
|
||||
buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonCreateOrder.Location = new Point(844, 58);
|
||||
buttonCreateOrder.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonCreateOrder.Location = new Point(965, 77);
|
||||
buttonCreateOrder.Margin = new Padding(5, 4, 5, 4);
|
||||
buttonCreateOrder.Name = "buttonCreateOrder";
|
||||
buttonCreateOrder.Size = new Size(174, 27);
|
||||
buttonCreateOrder.Size = new Size(199, 36);
|
||||
buttonCreateOrder.TabIndex = 1;
|
||||
buttonCreateOrder.Text = "Создать заказ";
|
||||
buttonCreateOrder.UseVisualStyleBackColor = true;
|
||||
@ -208,23 +209,24 @@
|
||||
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
dataGridView.BackgroundColor = SystemColors.ControlLightLight;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Location = new Point(0, 28);
|
||||
dataGridView.Margin = new Padding(4, 3, 4, 3);
|
||||
dataGridView.Location = new Point(0, 37);
|
||||
dataGridView.Margin = new Padding(5, 4, 5, 4);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(826, 320);
|
||||
dataGridView.Size = new Size(944, 427);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
// buttonUpd
|
||||
//
|
||||
buttonUpd.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonUpd.Location = new Point(844, 290);
|
||||
buttonUpd.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonUpd.Location = new Point(965, 387);
|
||||
buttonUpd.Margin = new Padding(5, 4, 5, 4);
|
||||
buttonUpd.Name = "buttonUpd";
|
||||
buttonUpd.Size = new Size(174, 27);
|
||||
buttonUpd.Size = new Size(199, 36);
|
||||
buttonUpd.TabIndex = 5;
|
||||
buttonUpd.Text = "Обновить список";
|
||||
buttonUpd.UseVisualStyleBackColor = true;
|
||||
@ -232,9 +234,9 @@
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1031, 347);
|
||||
ClientSize = new Size(1178, 463);
|
||||
Controls.Add(buttonUpd);
|
||||
Controls.Add(buttonIssuedOrder);
|
||||
Controls.Add(buttonOrderReady);
|
||||
@ -243,7 +245,7 @@
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Margin = new Padding(5, 4, 5, 4);
|
||||
Name = "FormMain";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Завод";
|
||||
@ -275,7 +277,7 @@
|
||||
private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
|
||||
private ToolStripMenuItem списокМагазиновToolStripMenuItem;
|
||||
private ToolStripMenuItem загруженностьМагазиновToolStripMenuItem;
|
||||
private ToolStripMenuItem заказыПоДатамToolStripMenuItem;
|
||||
private ToolStripMenuItem загруженностьПоМагазинамToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -131,30 +131,30 @@ namespace PrecastConcretePlantView
|
||||
|
||||
private void СписокМагазиновToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
/*using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
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 ЗагруженностьМагазиновToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
/* var service = Program.ServiceProvider?.GetService(typeof(FormReportShopIceCreams));
|
||||
if (service is FormReportShopIceCreams form)
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopReinforceds));
|
||||
if (service is FormReportShopReinforceds form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
private void ЗаказыПоДатамToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
/*var service = Program.ServiceProvider?.GetService(typeof(FormReportGroupedOrders));
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportGroupedOrders));
|
||||
if (service is FormReportGroupedOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||
@ -241,5 +241,6 @@ namespace PrecastConcretePlantView
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
using PrecastConcretePlantContracts.BindingModels;
|
||||
using PrecastConcretePlantContracts.BusinessLogicsContracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Reporting.WinForms;
|
||||
|
||||
namespace PrecastConcretePlantView
|
||||
{
|
||||
public partial class FormReportGroupedOrders : Form
|
||||
{
|
||||
private readonly ReportViewer reportViewer;
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IReportLogic _logic;
|
||||
|
||||
public FormReportGroupedOrders(ILogger<FormReportOrders> logger, IReportLogic logic)
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_logic = logic;
|
||||
reportViewer = new ReportViewer
|
||||
{
|
||||
Dock = DockStyle.Fill
|
||||
};
|
||||
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportGroupedOrders.rdlc", FileMode.Open));
|
||||
Controls.Clear();
|
||||
Controls.Add(reportViewer);
|
||||
Controls.Add(panel);
|
||||
}
|
||||
|
||||
private void ButtonCreateReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataSource = _logic.GetGroupedByDateOrders();
|
||||
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||
reportViewer.LocalReport.DataSources.Clear();
|
||||
reportViewer.LocalReport.DataSources.Add(source);
|
||||
|
||||
reportViewer.RefreshReport();
|
||||
_logger.LogInformation("Loading list of grouped orders");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Loading list of grouped orders error");
|
||||
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.SaveGroupedOrdersToPdfFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName,
|
||||
});
|
||||
_logger.LogInformation("Saving list of grouped orders");
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Saving list of grouped orders error");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
91
PrecastConcretePlant/PrecastConcretePlantView/FormReportGroupedOrders.designer.cs
generated
Normal file
91
PrecastConcretePlant/PrecastConcretePlantView/FormReportGroupedOrders.designer.cs
generated
Normal file
@ -0,0 +1,91 @@
|
||||
namespace PrecastConcretePlantView
|
||||
{
|
||||
partial class FormReportGroupedOrders
|
||||
{
|
||||
/// <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();
|
||||
buttonToPdf = new Button();
|
||||
buttonCreateReport = new Button();
|
||||
panel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel
|
||||
//
|
||||
panel.Controls.Add(buttonToPdf);
|
||||
panel.Controls.Add(buttonCreateReport);
|
||||
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(1031, 40);
|
||||
panel.TabIndex = 0;
|
||||
//
|
||||
// buttonToPdf
|
||||
//
|
||||
buttonToPdf.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonToPdf.Location = new Point(188, 8);
|
||||
buttonToPdf.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonToPdf.Name = "buttonToPdf";
|
||||
buttonToPdf.Size = new Size(139, 27);
|
||||
buttonToPdf.TabIndex = 5;
|
||||
buttonToPdf.Text = "В Pdf";
|
||||
buttonToPdf.UseVisualStyleBackColor = true;
|
||||
buttonToPdf.Click += ButtonToPdf_Click;
|
||||
//
|
||||
// buttonCreateReport
|
||||
//
|
||||
buttonCreateReport.Location = new Point(11, 8);
|
||||
buttonCreateReport.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonCreateReport.Name = "buttonCreateReport";
|
||||
buttonCreateReport.Size = new Size(139, 27);
|
||||
buttonCreateReport.TabIndex = 4;
|
||||
buttonCreateReport.Text = "Сформировать";
|
||||
buttonCreateReport.UseVisualStyleBackColor = true;
|
||||
buttonCreateReport.Click += ButtonCreateReport_Click;
|
||||
//
|
||||
// FormReportGroupedOrders
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1031, 647);
|
||||
Controls.Add(panel);
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Name = "FormReportGroupedOrders";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Заказы по датам";
|
||||
panel.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel;
|
||||
private System.Windows.Forms.Button buttonToPdf;
|
||||
private System.Windows.Forms.Button buttonCreateReport;
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
@ -0,0 +1,70 @@
|
||||
using PrecastConcretePlantContracts.BindingModels;
|
||||
using PrecastConcretePlantContracts.BusinessLogicsContracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace PrecastConcretePlantView
|
||||
{
|
||||
public partial class FormReportShopReinforceds : Form
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IReportLogic _logic;
|
||||
|
||||
public FormReportShopReinforceds(ILogger<FormReportReinforcedComponents> logger, IReportLogic logic)
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_logic = logic;
|
||||
}
|
||||
|
||||
private void FormReportShopReinforceds_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dict = _logic.GetShopReinforceds();
|
||||
if (dict != null)
|
||||
{
|
||||
dataGridView.Rows.Clear();
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" });
|
||||
foreach (var listElem in elem.Reinforceds)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
||||
}
|
||||
dataGridView.Rows.Add(new object[] { "Итого", "", elem.TotalCount });
|
||||
dataGridView.Rows.Add(Array.Empty<object>());
|
||||
}
|
||||
}
|
||||
_logger.LogInformation("Loading information on store workload");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Loading information on store workload error");
|
||||
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.SaveShopReinforcedToExcelFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
_logger.LogInformation("Saving information on store workload");
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Saving information on store workload error");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
114
PrecastConcretePlant/PrecastConcretePlantView/FormReportShopReinforceds.designer.cs
generated
Normal file
114
PrecastConcretePlant/PrecastConcretePlantView/FormReportShopReinforceds.designer.cs
generated
Normal file
@ -0,0 +1,114 @@
|
||||
namespace PrecastConcretePlantView
|
||||
{
|
||||
partial class FormReportShopReinforceds
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
dataGridView = new DataGridView();
|
||||
buttonSaveToExcel = new Button();
|
||||
ColumnShop = new DataGridViewTextBoxColumn();
|
||||
ColumnReinforced = new DataGridViewTextBoxColumn();
|
||||
ColumnCount = new DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToOrderColumns = true;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.BackgroundColor = SystemColors.ControlLightLight;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnShop, ColumnReinforced, ColumnCount });
|
||||
dataGridView.Dock = DockStyle.Bottom;
|
||||
dataGridView.Location = new Point(0, 47);
|
||||
dataGridView.Margin = new Padding(4, 3, 4, 3);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.Size = new Size(616, 510);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
// buttonSaveToExcel
|
||||
//
|
||||
buttonSaveToExcel.Location = new Point(13, 10);
|
||||
buttonSaveToExcel.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonSaveToExcel.Name = "buttonSaveToExcel";
|
||||
buttonSaveToExcel.Size = new Size(186, 27);
|
||||
buttonSaveToExcel.TabIndex = 1;
|
||||
buttonSaveToExcel.Text = "Сохранить в Excel";
|
||||
buttonSaveToExcel.UseVisualStyleBackColor = true;
|
||||
buttonSaveToExcel.Click += ButtonSaveToExcel_Click;
|
||||
//
|
||||
// ColumnShop
|
||||
//
|
||||
ColumnShop.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
ColumnShop.HeaderText = "Магазин";
|
||||
ColumnShop.Name = "ColumnShop";
|
||||
ColumnShop.ReadOnly = true;
|
||||
//
|
||||
// ColumnIceCream
|
||||
//
|
||||
ColumnReinforced.HeaderText = "Изделия";
|
||||
ColumnReinforced.Name = "ColumnReinforced";
|
||||
ColumnReinforced.ReadOnly = true;
|
||||
ColumnReinforced.Width = 200;
|
||||
//
|
||||
// ColumnCount
|
||||
//
|
||||
ColumnCount.HeaderText = "Количество";
|
||||
ColumnCount.Name = "ColumnCount";
|
||||
ColumnCount.ReadOnly = true;
|
||||
//
|
||||
// FormReportShopReinforceds
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(616, 557);
|
||||
Controls.Add(buttonSaveToExcel);
|
||||
Controls.Add(dataGridView);
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Name = "FormReportShopReinforceds";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Загруженность магазинов";
|
||||
Load += FormReportShopReinforceds_Load;
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView;
|
||||
private System.Windows.Forms.Button buttonSaveToExcel;
|
||||
private DataGridViewTextBoxColumn ColumnShop;
|
||||
private DataGridViewTextBoxColumn ColumnReinforced;
|
||||
private DataGridViewTextBoxColumn ColumnCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
@ -28,6 +28,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="ReportGroupedOrders.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="ReportOrders.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
@ -67,6 +67,9 @@ namespace PrecastConcretePlantView
|
||||
|
||||
services.AddTransient<FormReportReinforcedComponents>();
|
||||
services.AddTransient<FormReportOrders>();
|
||||
|
||||
services.AddTransient<FormReportShopReinforceds>();
|
||||
services.AddTransient<FormReportGroupedOrders>();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,424 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="PrecastConcretePlantContractsViewModels">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>10791c83-cee8-4a38-bbd0-245fc17cefb3</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DataSetOrders">
|
||||
<Query>
|
||||
<DataSourceName>PrecastConcretePlantContractsViewModels</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Date">
|
||||
<DataField>Date</DataField>
|
||||
<rd:TypeName>System.DateTime</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Count">
|
||||
<DataField>Count</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Sum">
|
||||
<DataField>Sum</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>PrecastConcretePlantContracts.ViewModels</rd:DataSetName>
|
||||
<rd:TableName>ReportOrdersByDateViewModel</rd:TableName>
|
||||
<rd:ObjectDataSourceType>PrecastConcretePlantContracts.ViewModels.ReportOrdersByDateViewModel, PrecastConcretePlantContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<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="Tablix">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>6.01401cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>6.56042cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>6.12687cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="TextboxDate">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Дата</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>TextboxDate</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="TextboxCount">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Количество заказов</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>TextboxCount</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="TextboxSum">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Сумма</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>TextboxSum</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="Date">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Date.Value</Value>
|
||||
<Style>
|
||||
<Format>dd.MM.yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Date</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="Count">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Count.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Count</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="Sum">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Sum.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Sum</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>1.95474cm</Top>
|
||||
<Left>1.16099cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>18.7013cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Double</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="TextboxTotal">
|
||||
<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>11.23542cm</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="TextboxTotalSum">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Sum(Fields!Sum.Value, "DataSetOrders")</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<Top>4cm</Top>
|
||||
<Left>13.73542cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>6.12687cm</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>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="ReportParameterPeriod">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>ReportParameterPeriod</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>2de0031a-4d17-449d-922d-d9fc54572312</rd:ReportID>
|
||||
</Report>
|
Loading…
Reference in New Issue
Block a user