Laba 4 Comlicated bruhh done
This commit is contained in:
parent
757ced9b9e
commit
3e8bbabeb1
@ -13,14 +13,16 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
private readonly IComponentStorage _componentStorage;
|
private readonly IComponentStorage _componentStorage;
|
||||||
private readonly ICarStorage _carStorage;
|
private readonly ICarStorage _carStorage;
|
||||||
private readonly IOrderStorage _orderStorage;
|
private readonly IOrderStorage _orderStorage;
|
||||||
|
private readonly IShopStorage _shopStorage;
|
||||||
private readonly AbstractSaveToExcel _saveToExcel;
|
private readonly AbstractSaveToExcel _saveToExcel;
|
||||||
private readonly AbstractSaveToWord _saveToWord;
|
private readonly AbstractSaveToWord _saveToWord;
|
||||||
private readonly AbstractSaveToPdf _saveToPdf;
|
private readonly AbstractSaveToPdf _saveToPdf;
|
||||||
public ReportLogic(ICarStorage carStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
public ReportLogic(ICarStorage carStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, IShopStorage shopStorage, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||||
{
|
{
|
||||||
_carStorage = carStorage;
|
_carStorage = carStorage;
|
||||||
_componentStorage = componentStorage;
|
_componentStorage = componentStorage;
|
||||||
_orderStorage = orderStorage;
|
_orderStorage = orderStorage;
|
||||||
|
_shopStorage = shopStorage;
|
||||||
_saveToExcel = saveToExcel;
|
_saveToExcel = saveToExcel;
|
||||||
_saveToWord = saveToWord;
|
_saveToWord = saveToWord;
|
||||||
_saveToPdf = saveToPdf;
|
_saveToPdf = saveToPdf;
|
||||||
@ -113,5 +115,62 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
Orders = GetOrders(model)
|
Orders = GetOrders(model)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public void SaveShopsToWordFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToWord.CreateTableDoc(new WordInfo
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Список магазинов",
|
||||||
|
Shops = _shopStorage.GetFullList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void SaveShopCarsToExcelFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToExcel.CreateShopReport(new ExcelInfo
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Загруженность магазинов",
|
||||||
|
ShopCars = GetShopCars()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public List<ReportShopCarsViewModel> GetShopCars()
|
||||||
|
{
|
||||||
|
var shops = _shopStorage.GetFullList();
|
||||||
|
var list = new List<ReportShopCarsViewModel>();
|
||||||
|
foreach (var shop in shops)
|
||||||
|
{
|
||||||
|
var record = new ReportShopCarsViewModel
|
||||||
|
{
|
||||||
|
ShopName = shop.Name,
|
||||||
|
Cars = new List<Tuple<string, int>>(),
|
||||||
|
Count = 0
|
||||||
|
};
|
||||||
|
foreach (var carCount in shop.ShopCars.Values)
|
||||||
|
{
|
||||||
|
record.Cars.Add(new Tuple<string, int>(carCount.Item1.CarName, carCount.Item2));
|
||||||
|
record.Count += carCount.Item2;
|
||||||
|
}
|
||||||
|
list.Add(record);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
public List<ReportDateOrdersViewModel> GetDateOrders()
|
||||||
|
{
|
||||||
|
return _orderStorage.GetFullList().GroupBy(x => x.DateCreate.Date).Select(x => new ReportDateOrdersViewModel
|
||||||
|
{
|
||||||
|
DateCreate = x.Key,
|
||||||
|
CountOrders = x.Count(),
|
||||||
|
SumOrders = x.Sum(y => y.Sum)
|
||||||
|
}).ToList();
|
||||||
|
}
|
||||||
|
public void SaveDateOrdersToPdfFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToPdf.CreateReportDateDoc(new PdfInfo
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Заказы по датам",
|
||||||
|
DateOrders = GetDateOrders()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,68 @@ namespace AutomobilePlantBusinessLogic.OfficePackage
|
|||||||
}
|
}
|
||||||
SaveExcel(info);
|
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 pc in info.ShopCars)
|
||||||
|
{
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "A",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = pc.ShopName,
|
||||||
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
|
});
|
||||||
|
rowIndex++;
|
||||||
|
foreach (var (CarName, Count) in pc.Cars)
|
||||||
|
{
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "B",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = CarName,
|
||||||
|
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 = pc.Count.ToString(),
|
||||||
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
|
});
|
||||||
|
rowIndex++;
|
||||||
|
}
|
||||||
|
SaveExcel(info);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание excel-файла
|
/// Создание excel-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -44,6 +44,39 @@ namespace AutomobilePlantBusinessLogic.OfficePackage
|
|||||||
});
|
});
|
||||||
SavePdf(info);
|
SavePdf(info);
|
||||||
}
|
}
|
||||||
|
public void CreateReportDateDoc(PdfInfo info)
|
||||||
|
{
|
||||||
|
CreatePdf(info);
|
||||||
|
CreateParagraph(new PdfParagraph
|
||||||
|
{
|
||||||
|
Text = info.Title,
|
||||||
|
Style = "NormalTitle",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
|
});
|
||||||
|
CreateTable(new List<string> { "3cm", "3cm", "7cm" });
|
||||||
|
CreateRow(new PdfRowParameters
|
||||||
|
{
|
||||||
|
Texts = new List<string> { "Дата", "Количество", "Сумма" },
|
||||||
|
Style = "NormalTitle",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
|
});
|
||||||
|
foreach (var order in info.DateOrders)
|
||||||
|
{
|
||||||
|
CreateRow(new PdfRowParameters
|
||||||
|
{
|
||||||
|
Texts = new List<string> { order.DateCreate.ToShortDateString(), order.CountOrders.ToString(), order.SumOrders.ToString() },
|
||||||
|
Style = "Normal",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||||
|
});
|
||||||
|
}
|
||||||
|
CreateParagraph(new PdfParagraph
|
||||||
|
{
|
||||||
|
Text = $"Итого: {info.DateOrders.Sum(x => x.SumOrders)}\t",
|
||||||
|
Style = "Normal",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
|
});
|
||||||
|
SavePdf(info);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание doc-файла
|
/// Создание doc-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -35,6 +35,27 @@ namespace AutomobilePlantBusinessLogic.OfficePackage
|
|||||||
}
|
}
|
||||||
SaveWord(info);
|
SaveWord(info);
|
||||||
}
|
}
|
||||||
|
public void CreateTableDoc(WordInfo wordInfo)
|
||||||
|
{
|
||||||
|
CreateWord(wordInfo);
|
||||||
|
var list = new List<string>();
|
||||||
|
foreach (var shop in wordInfo.Shops)
|
||||||
|
{
|
||||||
|
list.Add(shop.Name);
|
||||||
|
list.Add(shop.Address);
|
||||||
|
list.Add(shop.OpeningDate.ToString());
|
||||||
|
}
|
||||||
|
var wordTable = new WordTable
|
||||||
|
{
|
||||||
|
Headers = new List<string> {
|
||||||
|
"Название",
|
||||||
|
"Адрес",
|
||||||
|
"Дата открытия"},
|
||||||
|
Texts = list
|
||||||
|
};
|
||||||
|
CreateTable(wordTable);
|
||||||
|
SaveWord(wordInfo);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание doc-файла
|
/// Создание doc-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -51,5 +72,10 @@ namespace AutomobilePlantBusinessLogic.OfficePackage
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info"></param>
|
/// <param name="info"></param>
|
||||||
protected abstract void SaveWord(WordInfo info);
|
protected abstract void SaveWord(WordInfo info);
|
||||||
|
/// <summary>
|
||||||
|
/// создание таблицы
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="info"></param>
|
||||||
|
protected abstract void CreateTable(WordTable info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,10 @@ namespace AutomobilePlantBusinessLogic.OfficePackage.HelperModels
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
} = new();
|
} = new();
|
||||||
|
public List<ReportShopCarsViewModel> ShopCars
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,6 @@ namespace AutomobilePlantBusinessLogic.OfficePackage.HelperModels
|
|||||||
public DateTime DateFrom { get; set; }
|
public DateTime DateFrom { get; set; }
|
||||||
public DateTime DateTo { get; set; }
|
public DateTime DateTo { get; set; }
|
||||||
public List<ReportOrdersViewModel> Orders { get; set; } = new();
|
public List<ReportOrdersViewModel> Orders { get; set; } = new();
|
||||||
|
public List<ReportDateOrdersViewModel> DateOrders { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,6 @@ namespace AutomobilePlantBusinessLogic.OfficePackage.HelperModels
|
|||||||
public string FileName { get; set; } = string.Empty;
|
public string FileName { get; set; } = string.Empty;
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
public List<CarViewModel> Cars { get; set; } = new();
|
public List<CarViewModel> Cars { get; set; } = new();
|
||||||
|
public List<ShopViewModel> Shops { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
namespace AutomobilePlantBusinessLogic.OfficePackage.HelperModels
|
||||||
|
{
|
||||||
|
public class WordTable
|
||||||
|
{
|
||||||
|
public List<string> Headers { get; set; } = new();
|
||||||
|
public List<string> Texts { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -120,5 +120,85 @@ namespace AutomobilePlantBusinessLogic.OfficePackage.Implements
|
|||||||
_wordDocument.MainDocumentPart!.Document.Save();
|
_wordDocument.MainDocumentPart!.Document.Save();
|
||||||
_wordDocument.Close();
|
_wordDocument.Close();
|
||||||
}
|
}
|
||||||
|
protected override void CreateTable(WordTable table)
|
||||||
|
{
|
||||||
|
if (_docBody == null || table == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Table tab = new Table();
|
||||||
|
TableProperties props = new TableProperties(
|
||||||
|
new TableBorders(
|
||||||
|
new TopBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
},
|
||||||
|
new BottomBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
},
|
||||||
|
new LeftBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
},
|
||||||
|
new RightBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
},
|
||||||
|
new InsideHorizontalBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
},
|
||||||
|
new InsideVerticalBorder
|
||||||
|
{
|
||||||
|
Val = new EnumValue<BorderValues>(BorderValues.Single),
|
||||||
|
Size = 12
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
tab.AppendChild<TableProperties>(props);
|
||||||
|
TableGrid tableGrid = new TableGrid();
|
||||||
|
for (int i = 0; i < table.Headers.Count; i++)
|
||||||
|
{
|
||||||
|
tableGrid.AppendChild(new GridColumn());
|
||||||
|
}
|
||||||
|
tab.AppendChild(tableGrid);
|
||||||
|
TableRow tableRow = new TableRow();
|
||||||
|
foreach (var text in table.Headers)
|
||||||
|
{
|
||||||
|
tableRow.AppendChild(CreateTableCell(text));
|
||||||
|
}
|
||||||
|
tab.AppendChild(tableRow);
|
||||||
|
int height = table.Texts.Count / table.Headers.Count;
|
||||||
|
int width = table.Headers.Count;
|
||||||
|
for (int i = 0; i < height; i++)
|
||||||
|
{
|
||||||
|
tableRow = new TableRow();
|
||||||
|
for (int j = 0; j < width; j++)
|
||||||
|
{
|
||||||
|
var element = table.Texts[i * table.Headers.Count + j];
|
||||||
|
tableRow.AppendChild(CreateTableCell(element));
|
||||||
|
}
|
||||||
|
tab.AppendChild(tableRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
_docBody.AppendChild(tab);
|
||||||
|
|
||||||
|
}
|
||||||
|
private TableCell CreateTableCell(string element)
|
||||||
|
{
|
||||||
|
var tableParagraph = new Paragraph();
|
||||||
|
var run = new Run();
|
||||||
|
run.AppendChild(new Text { Text = element });
|
||||||
|
tableParagraph.AppendChild(run);
|
||||||
|
var tableCell = new TableCell();
|
||||||
|
tableCell.AppendChild(tableParagraph);
|
||||||
|
return tableCell;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,31 @@ namespace AutomobilePlantContracts.BusinessLogicsContracts
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model"></param>
|
/// <param name="model"></param>
|
||||||
void SaveOrdersToPdfFile(ReportBindingModel model);
|
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение магазинов в файл-Word
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveShopsToWordFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение магазинов с указаеним продуктов в файл-Excel
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveShopCarsToExcelFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка магазинов
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportShopCarsViewModel> GetShopCars();
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка заказов с группировкой по датам
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportDateOrdersViewModel> GetDateOrders();
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение заказов с группировкой по датам в файл-Pdf
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveDateOrdersToPdfFile(ReportBindingModel model);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace AutomobilePlantContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportDateOrdersViewModel
|
||||||
|
{
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public int CountOrders { get; set; }
|
||||||
|
public double SumOrders { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace AutomobilePlantContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportShopCarsViewModel
|
||||||
|
{
|
||||||
|
public string ShopName { get; set; } = string.Empty;
|
||||||
|
public int Count { get; set; }
|
||||||
|
public List<Tuple<string, int>> Cars { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -33,6 +33,9 @@
|
|||||||
<None Update="ReportOrders.rdlc">
|
<None Update="ReportOrders.rdlc">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="ReportOrdersByDate.rdlc">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -32,19 +32,22 @@
|
|||||||
toolStripMenuItemCatalogs = new ToolStripMenuItem();
|
toolStripMenuItemCatalogs = new ToolStripMenuItem();
|
||||||
toolStripMenuItemComponents = new ToolStripMenuItem();
|
toolStripMenuItemComponents = new ToolStripMenuItem();
|
||||||
toolStripMenuItemCars = new ToolStripMenuItem();
|
toolStripMenuItemCars = new ToolStripMenuItem();
|
||||||
|
shopsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
shopsSupplyToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
sellCarsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
reportsToolStripMenuItem = new ToolStripMenuItem();
|
reportsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
carsListToolStripMenuItem = new ToolStripMenuItem();
|
carsListToolStripMenuItem = new ToolStripMenuItem();
|
||||||
componentsByCarsToolStripMenuItem = new ToolStripMenuItem();
|
componentsByCarsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
ordersListToolStripMenuItem = new ToolStripMenuItem();
|
ordersListToolStripMenuItem = new ToolStripMenuItem();
|
||||||
shopsToolStripMenuItem = new ToolStripMenuItem();
|
|
||||||
shopsSupplyToolStripMenuItem = new ToolStripMenuItem();
|
|
||||||
dataGridView = new DataGridView();
|
dataGridView = new DataGridView();
|
||||||
buttonCreateOrder = new Button();
|
buttonCreateOrder = new Button();
|
||||||
buttonTakeOrderInWork = new Button();
|
buttonTakeOrderInWork = new Button();
|
||||||
buttonOrderReady = new Button();
|
buttonOrderReady = new Button();
|
||||||
buttonIssuedOrder = new Button();
|
buttonIssuedOrder = new Button();
|
||||||
buttonRefresh = new Button();
|
buttonRefresh = new Button();
|
||||||
sellCarsToolStripMenuItem = new ToolStripMenuItem();
|
shopsListToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
storeCongestionToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
listOdOrdersByDatesToolStripMenuItem = new ToolStripMenuItem();
|
||||||
menuStrip1.SuspendLayout();
|
menuStrip1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@ -68,20 +71,41 @@
|
|||||||
// toolStripMenuItemComponents
|
// toolStripMenuItemComponents
|
||||||
//
|
//
|
||||||
toolStripMenuItemComponents.Name = "toolStripMenuItemComponents";
|
toolStripMenuItemComponents.Name = "toolStripMenuItemComponents";
|
||||||
toolStripMenuItemComponents.Size = new Size(143, 22);
|
toolStripMenuItemComponents.Size = new Size(147, 22);
|
||||||
toolStripMenuItemComponents.Text = "Components";
|
toolStripMenuItemComponents.Text = "Components";
|
||||||
toolStripMenuItemComponents.Click += ComponentsToolStripMenuItem_Click;
|
toolStripMenuItemComponents.Click += ComponentsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItemCars
|
// toolStripMenuItemCars
|
||||||
//
|
//
|
||||||
toolStripMenuItemCars.Name = "toolStripMenuItemCars";
|
toolStripMenuItemCars.Name = "toolStripMenuItemCars";
|
||||||
toolStripMenuItemCars.Size = new Size(143, 22);
|
toolStripMenuItemCars.Size = new Size(147, 22);
|
||||||
toolStripMenuItemCars.Text = "Cars";
|
toolStripMenuItemCars.Text = "Cars";
|
||||||
toolStripMenuItemCars.Click += CarsToolStripMenuItem_Click;
|
toolStripMenuItemCars.Click += CarsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// shopsToolStripMenuItem
|
||||||
|
//
|
||||||
|
shopsToolStripMenuItem.Name = "shopsToolStripMenuItem";
|
||||||
|
shopsToolStripMenuItem.Size = new Size(147, 22);
|
||||||
|
shopsToolStripMenuItem.Text = "Shops";
|
||||||
|
shopsToolStripMenuItem.Click += shopsToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// shopsSupplyToolStripMenuItem
|
||||||
|
//
|
||||||
|
shopsSupplyToolStripMenuItem.Name = "shopsSupplyToolStripMenuItem";
|
||||||
|
shopsSupplyToolStripMenuItem.Size = new Size(147, 22);
|
||||||
|
shopsSupplyToolStripMenuItem.Text = "Shop's supply";
|
||||||
|
shopsSupplyToolStripMenuItem.Click += shopsSupplyToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// sellCarsToolStripMenuItem
|
||||||
|
//
|
||||||
|
sellCarsToolStripMenuItem.Name = "sellCarsToolStripMenuItem";
|
||||||
|
sellCarsToolStripMenuItem.Size = new Size(147, 22);
|
||||||
|
sellCarsToolStripMenuItem.Text = "Sell Cars";
|
||||||
|
sellCarsToolStripMenuItem.Click += sellCarsToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
// reportsToolStripMenuItem
|
// reportsToolStripMenuItem
|
||||||
//
|
//
|
||||||
reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { carsListToolStripMenuItem, componentsByCarsToolStripMenuItem, ordersListToolStripMenuItem });
|
reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { carsListToolStripMenuItem, componentsByCarsToolStripMenuItem, ordersListToolStripMenuItem, shopsListToolStripMenuItem, storeCongestionToolStripMenuItem, listOdOrdersByDatesToolStripMenuItem });
|
||||||
reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
||||||
reportsToolStripMenuItem.Size = new Size(59, 20);
|
reportsToolStripMenuItem.Size = new Size(59, 20);
|
||||||
reportsToolStripMenuItem.Text = "Reports";
|
reportsToolStripMenuItem.Text = "Reports";
|
||||||
@ -107,20 +131,6 @@
|
|||||||
ordersListToolStripMenuItem.Text = "Orders' list";
|
ordersListToolStripMenuItem.Text = "Orders' list";
|
||||||
ordersListToolStripMenuItem.Click += ordersListToolStripMenuItem_Click;
|
ordersListToolStripMenuItem.Click += ordersListToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// shopsToolStripMenuItem
|
|
||||||
//
|
|
||||||
shopsToolStripMenuItem.Name = "shopsToolStripMenuItem";
|
|
||||||
shopsToolStripMenuItem.Size = new Size(180, 22);
|
|
||||||
shopsToolStripMenuItem.Text = "Shops";
|
|
||||||
shopsToolStripMenuItem.Click += shopsToolStripMenuItem_Click;
|
|
||||||
//
|
|
||||||
// shopsSupplyToolStripMenuItem
|
|
||||||
//
|
|
||||||
shopsSupplyToolStripMenuItem.Name = "shopsSupplyToolStripMenuItem";
|
|
||||||
shopsSupplyToolStripMenuItem.Size = new Size(180, 22);
|
|
||||||
shopsSupplyToolStripMenuItem.Text = "Shop's supply";
|
|
||||||
shopsSupplyToolStripMenuItem.Click += shopsSupplyToolStripMenuItem_Click;
|
|
||||||
//
|
|
||||||
// dataGridView
|
// dataGridView
|
||||||
//
|
//
|
||||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
@ -180,12 +190,26 @@
|
|||||||
buttonRefresh.UseVisualStyleBackColor = true;
|
buttonRefresh.UseVisualStyleBackColor = true;
|
||||||
buttonRefresh.Click += ButtonRef_Click;
|
buttonRefresh.Click += ButtonRef_Click;
|
||||||
//
|
//
|
||||||
// sellCarsToolStripMenuItem
|
// shopsListToolStripMenuItem
|
||||||
//
|
//
|
||||||
sellCarsToolStripMenuItem.Name = "sellCarsToolStripMenuItem";
|
shopsListToolStripMenuItem.Name = "shopsListToolStripMenuItem";
|
||||||
sellCarsToolStripMenuItem.Size = new Size(180, 22);
|
shopsListToolStripMenuItem.Size = new Size(192, 22);
|
||||||
sellCarsToolStripMenuItem.Text = "Sell Cars";
|
shopsListToolStripMenuItem.Text = "Shops' list";
|
||||||
sellCarsToolStripMenuItem.Click += sellCarsToolStripMenuItem_Click;
|
shopsListToolStripMenuItem.Click += shopsListToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// storeCongestionToolStripMenuItem
|
||||||
|
//
|
||||||
|
storeCongestionToolStripMenuItem.Name = "storeCongestionToolStripMenuItem";
|
||||||
|
storeCongestionToolStripMenuItem.Size = new Size(192, 22);
|
||||||
|
storeCongestionToolStripMenuItem.Text = "Store congestion";
|
||||||
|
storeCongestionToolStripMenuItem.Click += storeCongestionToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// listOdOrdersByDatesToolStripMenuItem
|
||||||
|
//
|
||||||
|
listOdOrdersByDatesToolStripMenuItem.Name = "listOdOrdersByDatesToolStripMenuItem";
|
||||||
|
listOdOrdersByDatesToolStripMenuItem.Size = new Size(192, 22);
|
||||||
|
listOdOrdersByDatesToolStripMenuItem.Text = "List od orders by dates";
|
||||||
|
listOdOrdersByDatesToolStripMenuItem.Click += listOdOrdersByDatesToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// FormMain
|
// FormMain
|
||||||
//
|
//
|
||||||
@ -228,5 +252,8 @@
|
|||||||
private ToolStripMenuItem shopsToolStripMenuItem;
|
private ToolStripMenuItem shopsToolStripMenuItem;
|
||||||
private ToolStripMenuItem shopsSupplyToolStripMenuItem;
|
private ToolStripMenuItem shopsSupplyToolStripMenuItem;
|
||||||
private ToolStripMenuItem sellCarsToolStripMenuItem;
|
private ToolStripMenuItem sellCarsToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem shopsListToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem storeCongestionToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem listOdOrdersByDatesToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -125,6 +125,37 @@ namespace AutomobilePlantView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void shopsListToolStripMenuItem_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 storeCongestionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopCars));
|
||||||
|
if (service is FormReportShopCars form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void listOdOrdersByDatesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportDateOrders));
|
||||||
|
if (service is FormReportDateOrders form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// управление заказами
|
// управление заказами
|
||||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
86
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.Designer.cs
generated
Normal file
86
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.Designer.cs
generated
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
namespace AutomobilePlantView
|
||||||
|
{
|
||||||
|
partial class FormReportDateOrders
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
panel = new Panel();
|
||||||
|
ButtonToPdf = new Button();
|
||||||
|
buttonMake = new Button();
|
||||||
|
panel.SuspendLayout();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// panel
|
||||||
|
//
|
||||||
|
panel.Controls.Add(ButtonToPdf);
|
||||||
|
panel.Controls.Add(buttonMake);
|
||||||
|
panel.Dock = DockStyle.Top;
|
||||||
|
panel.Location = new Point(0, 0);
|
||||||
|
panel.Name = "panel";
|
||||||
|
panel.Size = new Size(800, 46);
|
||||||
|
panel.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// ButtonToPdf
|
||||||
|
//
|
||||||
|
ButtonToPdf.Location = new Point(93, 12);
|
||||||
|
ButtonToPdf.Name = "ButtonToPdf";
|
||||||
|
ButtonToPdf.Size = new Size(75, 23);
|
||||||
|
ButtonToPdf.TabIndex = 7;
|
||||||
|
ButtonToPdf.Text = "To PDF";
|
||||||
|
ButtonToPdf.UseVisualStyleBackColor = true;
|
||||||
|
ButtonToPdf.Click += buttonToPDF_Click;
|
||||||
|
//
|
||||||
|
// buttonMake
|
||||||
|
//
|
||||||
|
buttonMake.Location = new Point(12, 12);
|
||||||
|
buttonMake.Name = "buttonMake";
|
||||||
|
buttonMake.Size = new Size(75, 23);
|
||||||
|
buttonMake.TabIndex = 6;
|
||||||
|
buttonMake.Text = "Make";
|
||||||
|
buttonMake.UseVisualStyleBackColor = true;
|
||||||
|
buttonMake.Click += buttonMake_Click;
|
||||||
|
//
|
||||||
|
// FormReportDateOrders
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(panel);
|
||||||
|
Name = "FormReportDateOrders";
|
||||||
|
Text = "FormReportDateOrders";
|
||||||
|
FormClosed += FormReportDateOrders_FormClosed;
|
||||||
|
panel.ResumeLayout(false);
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Panel panel;
|
||||||
|
private Button ButtonToPdf;
|
||||||
|
private Button buttonMake;
|
||||||
|
}
|
||||||
|
}
|
75
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.cs
Normal file
75
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.cs
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
using AutomobilePlantContracts.BindingModels;
|
||||||
|
using AutomobilePlantContracts.BusinessLogicsContracts;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Reporting.WinForms;
|
||||||
|
|
||||||
|
namespace AutomobilePlantView
|
||||||
|
{
|
||||||
|
public partial class FormReportDateOrders : Form
|
||||||
|
{
|
||||||
|
private readonly ReportViewer reportViewer;
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IReportLogic _logic;
|
||||||
|
private readonly FileStream _fileStream;
|
||||||
|
public FormReportDateOrders(ILogger<FormReportDateOrders> logger, IReportLogic reportLogic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logic = reportLogic;
|
||||||
|
reportViewer = new ReportViewer
|
||||||
|
{
|
||||||
|
Dock = DockStyle.Fill
|
||||||
|
};
|
||||||
|
_fileStream = new FileStream("ReportOrdersByDate.rdlc", FileMode.Open);
|
||||||
|
reportViewer.LocalReport.LoadReportDefinition(_fileStream);
|
||||||
|
Controls.Clear();
|
||||||
|
Controls.Add(reportViewer);
|
||||||
|
Controls.Add(panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonMake_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dataSource = _logic.GetDateOrders();
|
||||||
|
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||||
|
reportViewer.LocalReport.DataSources.Clear();
|
||||||
|
reportViewer.LocalReport.DataSources.Add(source);
|
||||||
|
reportViewer.RefreshReport();
|
||||||
|
_logger.LogInformation("Загрузка списка заказов на весь период по датам");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки списка заказов на период");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonToPDF_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" };
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logic.SaveDateOrdersToPdfFile(new ReportBindingModel
|
||||||
|
{
|
||||||
|
FileName = dialog.FileName
|
||||||
|
});
|
||||||
|
_logger.LogInformation("Сохранение списка заказов на весь период по датам");
|
||||||
|
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка сохранения списка заказов на период");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FormReportDateOrders_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
_fileStream.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.resx
Normal file
120
AutomobilePlant/AutomobilePlantView/FormReportDateOrders.resx
Normal file
@ -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>
|
99
AutomobilePlant/AutomobilePlantView/FormReportShopCars.Designer.cs
generated
Normal file
99
AutomobilePlant/AutomobilePlantView/FormReportShopCars.Designer.cs
generated
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
namespace AutomobilePlantView
|
||||||
|
{
|
||||||
|
partial class FormReportShopCars
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
buttonSaveToExcel = new Button();
|
||||||
|
dataGridView = new DataGridView();
|
||||||
|
Shop = new DataGridViewTextBoxColumn();
|
||||||
|
Car = new DataGridViewTextBoxColumn();
|
||||||
|
Count = new DataGridViewTextBoxColumn();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonSaveToExcel
|
||||||
|
//
|
||||||
|
buttonSaveToExcel.Location = new Point(12, 12);
|
||||||
|
buttonSaveToExcel.Name = "buttonSaveToExcel";
|
||||||
|
buttonSaveToExcel.Size = new Size(128, 23);
|
||||||
|
buttonSaveToExcel.TabIndex = 0;
|
||||||
|
buttonSaveToExcel.Text = "Save to Excel";
|
||||||
|
buttonSaveToExcel.UseVisualStyleBackColor = true;
|
||||||
|
buttonSaveToExcel.Click += buttonSaveToExcel_Click;
|
||||||
|
//
|
||||||
|
// dataGridView
|
||||||
|
//
|
||||||
|
dataGridView.AllowUserToAddRows = false;
|
||||||
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridView.Columns.AddRange(new DataGridViewColumn[] { Shop, Car, Count });
|
||||||
|
dataGridView.Location = new Point(12, 41);
|
||||||
|
dataGridView.Name = "dataGridView";
|
||||||
|
dataGridView.RowTemplate.Height = 25;
|
||||||
|
dataGridView.Size = new Size(776, 397);
|
||||||
|
dataGridView.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// Shop
|
||||||
|
//
|
||||||
|
Shop.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
Shop.HeaderText = "Shop";
|
||||||
|
Shop.Name = "Shop";
|
||||||
|
//
|
||||||
|
// Car
|
||||||
|
//
|
||||||
|
Car.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
Car.HeaderText = "Car";
|
||||||
|
Car.Name = "Car";
|
||||||
|
//
|
||||||
|
// Count
|
||||||
|
//
|
||||||
|
Count.HeaderText = "Count";
|
||||||
|
Count.Name = "Count";
|
||||||
|
//
|
||||||
|
// FormReportShopCars
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(dataGridView);
|
||||||
|
Controls.Add(buttonSaveToExcel);
|
||||||
|
Name = "FormReportShopCars";
|
||||||
|
Text = "FormReportShopCars";
|
||||||
|
Load += FormReportShopCars_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Button buttonSaveToExcel;
|
||||||
|
private DataGridView dataGridView;
|
||||||
|
private DataGridViewTextBoxColumn Shop;
|
||||||
|
private DataGridViewTextBoxColumn Car;
|
||||||
|
private DataGridViewTextBoxColumn Count;
|
||||||
|
}
|
||||||
|
}
|
72
AutomobilePlant/AutomobilePlantView/FormReportShopCars.cs
Normal file
72
AutomobilePlant/AutomobilePlantView/FormReportShopCars.cs
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
using AutomobilePlantContracts.BindingModels;
|
||||||
|
using AutomobilePlantContracts.BusinessLogicsContracts;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace AutomobilePlantView
|
||||||
|
{
|
||||||
|
public partial class FormReportShopCars : Form
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IReportLogic _logic;
|
||||||
|
|
||||||
|
public FormReportShopCars(ILogger<FormReportShopCars> logger, IReportLogic reportLogic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logic = reportLogic;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSaveToExcel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using var dialog = new SaveFileDialog
|
||||||
|
{
|
||||||
|
Filter = "xlsx|*.xlsx"
|
||||||
|
};
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logic.SaveShopCarsToExcelFile(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FormReportShopCars_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dict = _logic.GetShopCars();
|
||||||
|
if (dict != null)
|
||||||
|
{
|
||||||
|
dataGridView.Rows.Clear();
|
||||||
|
foreach (var elem in dict)
|
||||||
|
{
|
||||||
|
dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" });
|
||||||
|
foreach (var listElem in elem.Cars)
|
||||||
|
{
|
||||||
|
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
||||||
|
}
|
||||||
|
dataGridView.Rows.Add(new object[] { "Всего:", "", elem.Count });
|
||||||
|
dataGridView.Rows.Add(Array.Empty<object>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_logger.LogInformation("Загрузка списка магазинов с авто в них");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки списка магазинов с авто в них");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
129
AutomobilePlant/AutomobilePlantView/FormReportShopCars.resx
Normal file
129
AutomobilePlant/AutomobilePlantView/FormReportShopCars.resx
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<?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>
|
||||||
|
<metadata name="Shop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Car.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
@ -56,6 +56,8 @@ namespace AutomobilePlantView
|
|||||||
services.AddTransient<FormCars>();
|
services.AddTransient<FormCars>();
|
||||||
services.AddTransient<FormReportCarComponents>();
|
services.AddTransient<FormReportCarComponents>();
|
||||||
services.AddTransient<FormReportOrders>();
|
services.AddTransient<FormReportOrders>();
|
||||||
|
services.AddTransient<FormReportShopCars>();
|
||||||
|
services.AddTransient<FormReportDateOrders>();
|
||||||
services.AddTransient<FormShop>();
|
services.AddTransient<FormShop>();
|
||||||
services.AddTransient<FormShops>();
|
services.AddTransient<FormShops>();
|
||||||
services.AddTransient<FormShopSupply>();
|
services.AddTransient<FormShopSupply>();
|
||||||
|
424
AutomobilePlant/AutomobilePlantView/ReportOrdersByDate.rdlc
Normal file
424
AutomobilePlant/AutomobilePlantView/ReportOrdersByDate.rdlc
Normal file
@ -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="AutomobilePlantContractsViewModels">
|
||||||
|
<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>AutomobilePlantContractsViewModels</DataSourceName>
|
||||||
|
<CommandText>/* Local Query */</CommandText>
|
||||||
|
</Query>
|
||||||
|
<Fields>
|
||||||
|
<Field Name="DateCreate">
|
||||||
|
<DataField>DateCreate</DataField>
|
||||||
|
<rd:TypeName>System.DateTime</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="CountOrders">
|
||||||
|
<DataField>CountOrders</DataField>
|
||||||
|
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="SumOrders">
|
||||||
|
<DataField>SumOrders</DataField>
|
||||||
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
</Fields>
|
||||||
|
<rd:DataSetInfo>
|
||||||
|
<rd:DataSetName>AutomobilePlantContracts.ViewModels</rd:DataSetName>
|
||||||
|
<rd:TableName>ReportDateOrdersViewModel</rd:TableName>
|
||||||
|
<rd:ObjectDataSourceType>AutomobilePlantContracts.ViewModels.ReportDateOrdersViewModel, AutomobilePlantContracts, 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="Tablix1">
|
||||||
|
<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="Textbox1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Дата</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox3">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Количество</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox2">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Сумма</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
<TablixRow>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<TablixCells>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="DateCreate">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!DateCreate.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<Format>d</Format>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>DateCreate</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="CountOrders">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!CountOrders.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>CountOrders</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="SumOrders">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!SumOrders.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>SumOrders</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
</TablixRows>
|
||||||
|
</TablixBody>
|
||||||
|
<TablixColumnHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixColumnHierarchy>
|
||||||
|
<TablixRowHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember>
|
||||||
|
<KeepWithGroup>After</KeepWithGroup>
|
||||||
|
</TablixMember>
|
||||||
|
<TablixMember>
|
||||||
|
<Group Name="Подробности" />
|
||||||
|
</TablixMember>
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixRowHierarchy>
|
||||||
|
<DataSetName>DataSetOrders</DataSetName>
|
||||||
|
<Top>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="TextboxTotalSum">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Всего:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<Top>4cm</Top>
|
||||||
|
<Left>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="SumTotal">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Sum(Fields!SumOrders.Value, "DataSetOrders")</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<Top>4cm</Top>
|
||||||
|
<Left>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