4 усложненная лабораторная
This commit is contained in:
parent
bb8a1b0fd1
commit
2f97ead4e6
@ -15,6 +15,7 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
private readonly IWorkStorage _workStorage;
|
||||
|
||||
private readonly IOrderStorage _orderStorage;
|
||||
private readonly IShopStorage _shopStorage;
|
||||
|
||||
private readonly AbstractSaveToExcel _saveToExcel;
|
||||
|
||||
@ -22,12 +23,13 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
|
||||
private readonly AbstractSaveToPdf _saveToPdf;
|
||||
|
||||
public ReportLogic(IWorkStorage workStorage, IComponentStorage componentStorage, IOrderStorage orderStorage,
|
||||
public ReportLogic(IWorkStorage workStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, IShopStorage shopStorage,
|
||||
AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||
{
|
||||
_workStorage = workStorage;
|
||||
_componentStorage = componentStorage;
|
||||
_orderStorage = orderStorage;
|
||||
_shopStorage = shopStorage;
|
||||
|
||||
_saveToExcel = saveToExcel;
|
||||
_saveToWord = saveToWord;
|
||||
@ -65,6 +67,33 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ReportShopWorkViewModel> GetShopWork()
|
||||
{
|
||||
|
||||
var shops = _shopStorage.GetFullList();
|
||||
|
||||
var list = new List<ReportShopWorkViewModel>();
|
||||
|
||||
foreach (var shop in shops)
|
||||
{
|
||||
var record = new ReportShopWorkViewModel
|
||||
{
|
||||
ShopName = shop.ShopName,
|
||||
Works = new List<(string Work, int count)>(),
|
||||
TotalCount = 0
|
||||
};
|
||||
foreach (var work in shop.ShopWorks)
|
||||
{
|
||||
record.Works.Add(new(work.Value.Item1.WorkName, work.Value.Item2));
|
||||
record.TotalCount += work.Value.Item2;
|
||||
}
|
||||
|
||||
list.Add(record);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение списка заказов за определенный период
|
||||
/// </summary>
|
||||
@ -84,6 +113,19 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<ReportOrderByDateViewModel> GetOrdersByDate()
|
||||
{
|
||||
return _orderStorage.GetFullList()
|
||||
.GroupBy(x => x.DateCreate.Date)
|
||||
.Select(x => new ReportOrderByDateViewModel
|
||||
{
|
||||
DateCreate = x.Key,
|
||||
Count = x.Count(),
|
||||
Sum = x.Sum(x=> x.Sum)
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение компонент в файл-Word
|
||||
/// </summary>
|
||||
@ -97,6 +139,15 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
Works = _workStorage.GetFullList()
|
||||
});
|
||||
}
|
||||
public void SaveShopsToWordFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToWord.CreateDocShopTable(new WordInfoShopTable
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список магазинов",
|
||||
Shops = _shopStorage.GetFullList()
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение компонент с указаеним продуктов в файл-Excel
|
||||
@ -111,6 +162,15 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
WorkComponents = GetWorkComponent()
|
||||
});
|
||||
}
|
||||
public void SaveShopWorkToExcelFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToExcel.CreateReportShop(new ExcelInfoShop
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список магазинов",
|
||||
ShopWorks = GetShopWork()
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение заказов в файл-Pdf
|
||||
@ -127,5 +187,14 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
Orders = GetOrders(model)
|
||||
});
|
||||
}
|
||||
public void SaveOrdersByDateToPdfFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToPdf.CreateDocOrdersByDate(new PdfInfoOrdersByDate
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список заказов",
|
||||
Orders = GetOrdersByDate()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -80,11 +80,85 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
|
||||
SaveExcel(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Создание excel-файла
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
protected abstract void CreateExcel(ExcelInfo info);
|
||||
/// <summary>
|
||||
/// Создание отчета по магазинам
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
public void CreateReportShop(ExcelInfoShop info)
|
||||
{
|
||||
CreateExcel(new ExcelInfo() { FileName = info.FileName});
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
RowIndex = 1,
|
||||
Text = info.Title,
|
||||
StyleInfo = ExcelStyleInfoType.Title
|
||||
});
|
||||
|
||||
MergeCells(new ExcelMergeParameters
|
||||
{
|
||||
CellFromName = "A1",
|
||||
CellToName = "C1"
|
||||
});
|
||||
|
||||
uint rowIndex = 2;
|
||||
foreach (var pc in info.ShopWorks)
|
||||
{
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
RowIndex = rowIndex,
|
||||
Text = pc.ShopName,
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
rowIndex++;
|
||||
|
||||
foreach (var (Work, Count) in pc.Works)
|
||||
{
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = Work,
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = Count.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "A",
|
||||
RowIndex = rowIndex,
|
||||
Text = "Итого",
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = pc.TotalCount.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.Text
|
||||
});
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
SaveExcel(new ExcelInfo() { FileName = info.FileName });
|
||||
}
|
||||
/// <summary>
|
||||
/// Создание excel-файла
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
protected abstract void CreateExcel(ExcelInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Добавляем новую ячейку в лист
|
||||
|
@ -33,6 +33,34 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
|
||||
|
||||
SavePdf(info);
|
||||
}
|
||||
public void CreateDocOrdersByDate(PdfInfoOrdersByDate info)
|
||||
{
|
||||
CreatePdf(new PdfInfo() { FileName = info.FileName});
|
||||
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
|
||||
|
||||
CreateTable(new List<string> { "3cm", "3cm", "3cm"});
|
||||
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Дата", "Количество", "Сумма"},
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
|
||||
foreach (var order in info.Orders)
|
||||
{
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { order.DateCreate.ToShortDateString(), order.Count.ToString(), order.Sum.ToString()},
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
}
|
||||
|
||||
CreateParagraph(new PdfParagraph { Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Right });
|
||||
|
||||
SavePdf(new PdfInfo() { FileName = info.FileName});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Создание doc-файла
|
||||
|
@ -34,7 +34,36 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
|
||||
|
||||
SaveWord(info);
|
||||
}
|
||||
public void CreateDocShopTable(WordInfoShopTable info)
|
||||
{
|
||||
CreateWord(new WordInfo() { FileName = info.FileName});
|
||||
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
CreateTable(new WordTable
|
||||
{
|
||||
Columns = new() { ("Название",3000),("Адрес",3000),("Дата открытия",3000)},
|
||||
Rows = info.Shops.Select(x => new List<string>
|
||||
{
|
||||
x.ShopName,
|
||||
x.Address,
|
||||
Convert.ToString(x.DateOpening),
|
||||
})
|
||||
.ToList()
|
||||
});;
|
||||
|
||||
|
||||
SaveWord(new WordInfo() { FileName = info.FileName});
|
||||
}
|
||||
/// <summary>
|
||||
/// Создание doc-файла
|
||||
/// </summary>
|
||||
@ -47,6 +76,7 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
|
||||
/// <param name="paragraph"></param>
|
||||
/// <returns></returns>
|
||||
protected abstract void CreateParagraph(WordParagraph paragraph);
|
||||
protected abstract void CreateTable(WordTable table);
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение файла
|
||||
|
@ -0,0 +1,13 @@
|
||||
using PlumbingRepairContracts.ViewModels;
|
||||
|
||||
namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class ExcelInfoShop
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public List<ReportShopWorkViewModel> ShopWorks { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using PlumbingRepairContracts.ViewModels;
|
||||
|
||||
namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class PdfInfoOrdersByDate
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public List<ReportOrderByDateViewModel> Orders { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using PlumbingRepairContracts.ViewModels;
|
||||
|
||||
namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class WordInfoShopTable
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public List<ShopViewModel> Shops { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace PlumbingRepairBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class WordTable
|
||||
{
|
||||
public List<(string, int)> Columns { get; set; } = new();
|
||||
public List<List<string>> Rows { get; set; } = new();
|
||||
}
|
||||
}
|
@ -119,6 +119,40 @@ namespace PlumbingRepairBusinessLogic.OfficePackage.Implements
|
||||
_docBody.AppendChild(docParagraph);
|
||||
}
|
||||
|
||||
private static TableCell CreateTableCell(string text, int? cellWidth = null)
|
||||
{
|
||||
TableCell tableCell = new(new Paragraph(new Run(new Text(text))));
|
||||
tableCell.Append(new TableCellProperties()
|
||||
{
|
||||
TableCellWidth = new() { Width = cellWidth.ToString() }
|
||||
});
|
||||
return tableCell;
|
||||
}
|
||||
protected override void CreateTable(WordTable table)
|
||||
{
|
||||
if (_docBody == null || table == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var docTable = new Table();
|
||||
|
||||
TableProperties tableProperties = new(
|
||||
new TableBorders(
|
||||
new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||
new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||
new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||
new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||
new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||
new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 }
|
||||
)
|
||||
);
|
||||
docTable.AppendChild(tableProperties);
|
||||
|
||||
docTable.Append(new TableRow(table.Columns.Select(x => CreateTableCell(x.Item1, x.Item2))));
|
||||
docTable.Append(table.Rows.Select(x => new TableRow(x.Select(y => CreateTableCell(y)))));
|
||||
|
||||
_docBody.AppendChild(docTable);
|
||||
}
|
||||
protected override void SaveWord(WordInfo info)
|
||||
{
|
||||
if (_docBody == null || _wordDocument == null)
|
||||
|
@ -10,6 +10,7 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<ReportWorkComponentViewModel> GetWorkComponent();
|
||||
List<ReportShopWorkViewModel> GetShopWork();
|
||||
|
||||
/// <summary>
|
||||
/// Получение списка заказов за определенный период
|
||||
@ -17,6 +18,8 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
|
||||
List<ReportOrderByDateViewModel> GetOrdersByDate();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение компонент в файл-Word
|
||||
@ -35,5 +38,9 @@ namespace PlumbingRepairContracts.BusinessLogicsContracts
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||
|
||||
void SaveShopsToWordFile(ReportBindingModel model);
|
||||
void SaveShopWorkToExcelFile(ReportBindingModel model);
|
||||
public void SaveOrdersByDateToPdfFile(ReportBindingModel model);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
namespace PlumbingRepairContracts.ViewModels
|
||||
{
|
||||
public class ReportOrderByDateViewModel
|
||||
{
|
||||
public DateTime DateCreate { get; set; }
|
||||
|
||||
public int Count { get; set; }
|
||||
public double Sum{ get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace PlumbingRepairContracts.ViewModels
|
||||
{
|
||||
public class ReportShopWorkViewModel
|
||||
{
|
||||
public string ShopName { get; set; } = string.Empty;
|
||||
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
public List<(string Work, int Count)> Works { get; set; } = new();
|
||||
}
|
||||
}
|
@ -38,16 +38,20 @@
|
||||
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.РаботыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
<<<<<<< HEAD
|
||||
this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.пToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.продажаРаботToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
=======
|
||||
this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.компонентыПоРаботамToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокЗаказовToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокМагазиновToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.работыПоМагазинамToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокПоВсемToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокИзделийToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.работыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.списокЗаказовToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
>>>>>>> laba_4
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -137,7 +141,7 @@
|
||||
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.справочникиToolStripMenuItem,
|
||||
this.списокИзделийToolStripMenuItem});
|
||||
this.отчетыToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1377, 33);
|
||||
@ -170,7 +174,6 @@
|
||||
this.РаботыToolStripMenuItem.Text = "Работы";
|
||||
this.РаботыToolStripMenuItem.Click += new System.EventHandler(this.РаботыToolStripMenuItem_Click);
|
||||
//
|
||||
<<<<<<< HEAD
|
||||
// магазиныToolStripMenuItem
|
||||
//
|
||||
this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||
@ -191,7 +194,62 @@
|
||||
this.продажаРаботToolStripMenuItem.Size = new System.Drawing.Size(296, 34);
|
||||
this.продажаРаботToolStripMenuItem.Text = "Продажа работ";
|
||||
this.продажаРаботToolStripMenuItem.Click += new System.EventHandler(this.продажаРаботToolStripMenuItem_Click);
|
||||
=======
|
||||
//
|
||||
// отчетыToolStripMenuItem
|
||||
//
|
||||
this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.списокКомпонентовToolStripMenuItem,
|
||||
this.компонентыПоРаботамToolStripMenuItem,
|
||||
this.списокЗаказовToolStripMenuItem2,
|
||||
this.списокМагазиновToolStripMenuItem,
|
||||
this.работыПоМагазинамToolStripMenuItem,
|
||||
this.списокПоВсемToolStripMenuItem});
|
||||
this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(88, 29);
|
||||
this.отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// списокКомпонентовToolStripMenuItem
|
||||
//
|
||||
this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
|
||||
this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(319, 34);
|
||||
this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
|
||||
this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click);
|
||||
//
|
||||
// компонентыПоРаботамToolStripMenuItem
|
||||
//
|
||||
this.компонентыПоРаботамToolStripMenuItem.Name = "компонентыПоРаботамToolStripMenuItem";
|
||||
this.компонентыПоРаботамToolStripMenuItem.Size = new System.Drawing.Size(319, 34);
|
||||
this.компонентыПоРаботамToolStripMenuItem.Text = "Компоненты по работам";
|
||||
this.компонентыПоРаботамToolStripMenuItem.Click += new System.EventHandler(this.ComponentProductsToolStripMenuItem_Click);
|
||||
//
|
||||
// списокЗаказовToolStripMenuItem2
|
||||
//
|
||||
this.списокЗаказовToolStripMenuItem2.Name = "списокЗаказовToolStripMenuItem2";
|
||||
this.списокЗаказовToolStripMenuItem2.Size = new System.Drawing.Size(319, 34);
|
||||
this.списокЗаказовToolStripMenuItem2.Text = "Список заказов";
|
||||
this.списокЗаказовToolStripMenuItem2.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click);
|
||||
//
|
||||
// списокМагазиновToolStripMenuItem
|
||||
//
|
||||
this.списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem";
|
||||
this.списокМагазиновToolStripMenuItem.Size = new System.Drawing.Size(319, 34);
|
||||
this.списокМагазиновToolStripMenuItem.Text = "Список магазинов";
|
||||
this.списокМагазиновToolStripMenuItem.Click += new System.EventHandler(this.ShopsToolStripMenuItem_Click);
|
||||
//
|
||||
// работыПоМагазинамToolStripMenuItem
|
||||
//
|
||||
this.работыПоМагазинамToolStripMenuItem.Name = "работыПоМагазинамToolStripMenuItem";
|
||||
this.работыПоМагазинамToolStripMenuItem.Size = new System.Drawing.Size(319, 34);
|
||||
this.работыПоМагазинамToolStripMenuItem.Text = "Работы по магазинам";
|
||||
this.работыПоМагазинамToolStripMenuItem.Click += new System.EventHandler(this.ShopWorksToolStripMenuItem_Click);
|
||||
//
|
||||
// списокПоВсемToolStripMenuItem
|
||||
//
|
||||
this.списокПоВсемToolStripMenuItem.Name = "списокПоВсемToolStripMenuItem";
|
||||
this.списокПоВсемToolStripMenuItem.Size = new System.Drawing.Size(319, 34);
|
||||
this.списокПоВсемToolStripMenuItem.Text = "Список всех заказов";
|
||||
this.списокПоВсемToolStripMenuItem.Click += new System.EventHandler(this.OrdersByDateToolStripMenuItem_Click);
|
||||
//
|
||||
// списокИзделийToolStripMenuItem
|
||||
//
|
||||
this.списокИзделийToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -201,7 +259,7 @@
|
||||
this.списокИзделийToolStripMenuItem.Name = "списокИзделийToolStripMenuItem";
|
||||
this.списокИзделийToolStripMenuItem.Size = new System.Drawing.Size(88, 29);
|
||||
this.списокИзделийToolStripMenuItem.Text = "Отчеты";
|
||||
this.списокИзделийToolStripMenuItem.Click += new System.EventHandler(this.списокИзделийToolStripMenuItem_Click);
|
||||
this.списокИзделийToolStripMenuItem.Click += new System.EventHandler(this.ComponentProductsToolStripMenuItem_Click);
|
||||
//
|
||||
// работыПоИзделиямToolStripMenuItem
|
||||
//
|
||||
@ -223,7 +281,6 @@
|
||||
this.списокЗаказовToolStripMenuItem1.Size = new System.Drawing.Size(283, 34);
|
||||
this.списокЗаказовToolStripMenuItem1.Text = "Список заказов";
|
||||
this.списокЗаказовToolStripMenuItem1.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click);
|
||||
>>>>>>> laba_4
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
@ -261,15 +318,19 @@
|
||||
private ToolStripMenuItem справочникиToolStripMenuItem;
|
||||
private ToolStripMenuItem компонентыToolStripMenuItem;
|
||||
private ToolStripMenuItem РаботыToolStripMenuItem;
|
||||
<<<<<<< HEAD
|
||||
private ToolStripMenuItem магазиныToolStripMenuItem;
|
||||
private ToolStripMenuItem пToolStripMenuItem;
|
||||
private ToolStripMenuItem продажаРаботToolStripMenuItem;
|
||||
=======
|
||||
private ToolStripMenuItem списокИзделийToolStripMenuItem;
|
||||
private ToolStripMenuItem работыПоИзделиямToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem1;
|
||||
>>>>>>> laba_4
|
||||
private ToolStripMenuItem отчетыToolStripMenuItem;
|
||||
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
||||
private ToolStripMenuItem компонентыПоРаботамToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem2;
|
||||
private ToolStripMenuItem списокМагазиновToolStripMenuItem;
|
||||
private ToolStripMenuItem работыПоМагазинамToolStripMenuItem;
|
||||
private ToolStripMenuItem списокПоВсемToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using AbstractShopView;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PlumbingRepairBusinessLogic.BusinessLogics;
|
||||
using PlumbingRepairContracts.BindingModels;
|
||||
using PlumbingRepairContracts.BusinessLogicsContracts;
|
||||
@ -35,7 +34,7 @@ namespace PlumbingRepairView
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["WorkId"].Visible= false;
|
||||
dataGridView.Columns["WorkId"].Visible = false;
|
||||
}
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
}
|
||||
@ -194,7 +193,6 @@ namespace PlumbingRepairView
|
||||
LoadData();
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
private void продажаРаботToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormSellWorks));
|
||||
@ -202,11 +200,50 @@ namespace PlumbingRepairView
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
=======
|
||||
private void списокИзделийToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
>>>>>>> laba_4
|
||||
private void ComponentWorksToolStripMenuItem_Click(object sender,
|
||||
EventArgs e)
|
||||
{
|
||||
var service =
|
||||
Program.ServiceProvider?.GetService(typeof(FormReportWorkComponents));
|
||||
if (service is FormReportWorkComponents form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ShopsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveShopsToWordFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
private void ShopWorksToolStripMenuItem_Click(object sender,
|
||||
EventArgs e)
|
||||
{
|
||||
var service =
|
||||
Program.ServiceProvider?.GetService(typeof(FormReportShopWorks));
|
||||
if (service is FormReportShopWorks form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void OrdersByDateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service =
|
||||
Program.ServiceProvider?.GetService(typeof(FormReportOrdersByDate));
|
||||
if (service is FormReportOrdersByDate form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
90
PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.Designer.cs
generated
Normal file
90
PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.Designer.cs
generated
Normal file
@ -0,0 +1,90 @@
|
||||
namespace PlumbingRepairView
|
||||
{
|
||||
partial class FormReportOrdersByDate
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.buttonToPdf = new System.Windows.Forms.Button();
|
||||
this.panel = new System.Windows.Forms.Panel();
|
||||
this.panel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Location = new System.Drawing.Point(422, 14);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(199, 45);
|
||||
this.button1.TabIndex = 6;
|
||||
this.button1.Text = "В Pdf";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.ButtonToPdf_Click);
|
||||
//
|
||||
// buttonToPdf
|
||||
//
|
||||
this.buttonToPdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonToPdf.Location = new System.Drawing.Point(1955, 13);
|
||||
this.buttonToPdf.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.buttonToPdf.Name = "buttonToPdf";
|
||||
this.buttonToPdf.Size = new System.Drawing.Size(199, 45);
|
||||
this.buttonToPdf.TabIndex = 5;
|
||||
this.buttonToPdf.Text = "В Pdf";
|
||||
this.buttonToPdf.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panel
|
||||
//
|
||||
this.panel.Controls.Add(this.button1);
|
||||
this.panel.Controls.Add(this.buttonToPdf);
|
||||
this.panel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.panel.Name = "panel";
|
||||
this.panel.Size = new System.Drawing.Size(901, 67);
|
||||
this.panel.TabIndex = 1;
|
||||
//
|
||||
// FormReportOrdersByDate
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(901, 450);
|
||||
this.Controls.Add(this.panel);
|
||||
this.Name = "FormReportOrdersByDate";
|
||||
this.Text = "Заказы за весь период";
|
||||
this.Load += new System.EventHandler(this.FormReportOrdersByDate_Load);
|
||||
this.panel.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Button button1;
|
||||
private Button buttonToPdf;
|
||||
private Panel panel;
|
||||
}
|
||||
}
|
74
PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.cs
Normal file
74
PlumbingRepair/PlumbingRepairView/FormReportOrdersByDate.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Reporting.WinForms;
|
||||
using PlumbingRepairContracts.BindingModels;
|
||||
using PlumbingRepairContracts.BusinessLogicsContracts;
|
||||
|
||||
namespace PlumbingRepairView
|
||||
{
|
||||
public partial class FormReportOrdersByDate : Form
|
||||
{
|
||||
private readonly ReportViewer reportViewer;
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IReportLogic _logic;
|
||||
public FormReportOrdersByDate(ILogger<FormReportOrders> logger, IReportLogic logic)
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_logic = logic;
|
||||
reportViewer = new ReportViewer
|
||||
{
|
||||
|
||||
Dock = DockStyle.Fill
|
||||
};
|
||||
reportViewer.LocalReport.LoadReportDefinition(new FileStream("../../../ReportOrdersByDate.rdlc", FileMode.Open));
|
||||
Controls.Clear();
|
||||
Controls.Add(reportViewer);
|
||||
Controls.Add(panel);
|
||||
}
|
||||
|
||||
|
||||
private void FormReportOrdersByDate_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var dataSource = _logic.GetOrdersByDate();
|
||||
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||
reportViewer.LocalReport.DataSources.Clear();
|
||||
reportViewer.LocalReport.DataSources.Add(source);
|
||||
|
||||
reportViewer.RefreshReport();
|
||||
_logger.LogInformation("Загрузка списка заказов за весь период ");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки списка заказов за весь период");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonToPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
_logic.SaveOrdersByDateToPdfFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName,
|
||||
});
|
||||
_logger.LogInformation("Загрузка списка заказов за весь период ");
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка сохранения списка заказов за весь период");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
121
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.Designer.cs
generated
Normal file
121
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.Designer.cs
generated
Normal file
@ -0,0 +1,121 @@
|
||||
namespace PlumbingRepairView
|
||||
{
|
||||
partial class FormReportShopWorks
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.buttonSaveToExcel = new System.Windows.Forms.Button();
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.Shop = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Work = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonSaveToExcel
|
||||
//
|
||||
this.buttonSaveToExcel.Location = new System.Drawing.Point(14, 15);
|
||||
this.buttonSaveToExcel.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
|
||||
this.buttonSaveToExcel.Name = "buttonSaveToExcel";
|
||||
this.buttonSaveToExcel.Size = new System.Drawing.Size(265, 44);
|
||||
this.buttonSaveToExcel.TabIndex = 2;
|
||||
this.buttonSaveToExcel.Text = "Сохранить в Excel";
|
||||
this.buttonSaveToExcel.UseVisualStyleBackColor = true;
|
||||
this.buttonSaveToExcel.Click += new System.EventHandler(this.ButtonSaveToExcel_Click);
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
this.dataGridView.AllowUserToAddRows = false;
|
||||
this.dataGridView.AllowUserToDeleteRows = false;
|
||||
this.dataGridView.AllowUserToOrderColumns = true;
|
||||
this.dataGridView.AllowUserToResizeColumns = false;
|
||||
this.dataGridView.AllowUserToResizeRows = false;
|
||||
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.Shop,
|
||||
this.Work,
|
||||
this.Count});
|
||||
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.dataGridView.Location = new System.Drawing.Point(0, 68);
|
||||
this.dataGridView.MultiSelect = false;
|
||||
this.dataGridView.Name = "dataGridView";
|
||||
this.dataGridView.ReadOnly = true;
|
||||
this.dataGridView.RowHeadersVisible = false;
|
||||
this.dataGridView.RowHeadersWidth = 62;
|
||||
this.dataGridView.RowTemplate.Height = 33;
|
||||
this.dataGridView.Size = new System.Drawing.Size(455, 423);
|
||||
this.dataGridView.TabIndex = 3;
|
||||
//
|
||||
// Shop
|
||||
//
|
||||
this.Shop.HeaderText = "Магазин";
|
||||
this.Shop.MinimumWidth = 8;
|
||||
this.Shop.Name = "Shop";
|
||||
this.Shop.ReadOnly = true;
|
||||
this.Shop.Width = 150;
|
||||
//
|
||||
// Work
|
||||
//
|
||||
this.Work.HeaderText = "Работа";
|
||||
this.Work.MinimumWidth = 8;
|
||||
this.Work.Name = "Work";
|
||||
this.Work.ReadOnly = true;
|
||||
this.Work.Width = 150;
|
||||
//
|
||||
// Count
|
||||
//
|
||||
this.Count.HeaderText = "Количество";
|
||||
this.Count.MinimumWidth = 8;
|
||||
this.Count.Name = "Count";
|
||||
this.Count.ReadOnly = true;
|
||||
this.Count.Width = 150;
|
||||
//
|
||||
// FormReportShopWorks
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(455, 491);
|
||||
this.Controls.Add(this.dataGridView);
|
||||
this.Controls.Add(this.buttonSaveToExcel);
|
||||
this.Name = "FormReportShopWorks";
|
||||
this.Text = "Работы по магазинам";
|
||||
this.Load += new System.EventHandler(this.FormReportShopWorks_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button buttonSaveToExcel;
|
||||
private DataGridView dataGridView;
|
||||
private DataGridViewTextBoxColumn Shop;
|
||||
private DataGridViewTextBoxColumn Work;
|
||||
private DataGridViewTextBoxColumn Count;
|
||||
}
|
||||
}
|
70
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.cs
Normal file
70
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.cs
Normal file
@ -0,0 +1,70 @@
|
||||
using AbstractShopView;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PlumbingRepairContracts.BindingModels;
|
||||
using PlumbingRepairContracts.BusinessLogicsContracts;
|
||||
|
||||
|
||||
namespace PlumbingRepairView
|
||||
{
|
||||
public partial class FormReportShopWorks : Form
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IReportLogic _logic;
|
||||
public FormReportShopWorks(ILogger<FormReportWorkComponents> logger, IReportLogic logic)
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_logic = logic;
|
||||
}
|
||||
private void FormReportShopWorks_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dict = _logic.GetShopWork();
|
||||
if (dict != null)
|
||||
{
|
||||
dataGridView.Rows.Clear();
|
||||
foreach (var elem in dict)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" });
|
||||
foreach (var listElem in elem.Works)
|
||||
{
|
||||
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
||||
}
|
||||
dataGridView.Rows.Add(new object[] { "Итого", "", elem.TotalCount });
|
||||
dataGridView.Rows.Add(Array.Empty<object>());
|
||||
}
|
||||
}
|
||||
_logger.LogInformation("Загрузка списка работ по магазинам");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки списка работ по магазинам");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonSaveToExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "xlsx|*.xlsx" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
_logic.SaveShopWorkToExcelFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
_logger.LogInformation("Сохранение списка работ по магазинам");
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка сохранения списка работ по магазинам");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
78
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.resx
Normal file
78
PlumbingRepair/PlumbingRepairView/FormReportShopWorks.resx
Normal file
@ -0,0 +1,78 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Shop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Work.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>
|
||||
<metadata name="Shop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Work.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>
|
@ -2,7 +2,7 @@
|
||||
using PlumbingRepairContracts.BusinessLogicsContracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace AbstractShopView
|
||||
namespace PlumbingRepairView
|
||||
{
|
||||
public partial class FormReportWorkComponents : Form
|
||||
{
|
||||
|
@ -41,24 +41,17 @@ namespace PlumbingRepairView
|
||||
services.AddTransient<IComponentStorage, ComponentStorage>();
|
||||
services.AddTransient<IOrderStorage, OrderStorage>();
|
||||
services.AddTransient<IWorkStorage, WorkStorage>();
|
||||
<<<<<<< HEAD
|
||||
services.AddTransient<IShopStorage, ShopStorage>();
|
||||
=======
|
||||
|
||||
>>>>>>> laba_4
|
||||
|
||||
services.AddTransient<IComponentLogic, ComponentLogic>();
|
||||
services.AddTransient<IOrderLogic, OrderLogic>();
|
||||
services.AddTransient<IWorkLogic, WorkLogic>();
|
||||
<<<<<<< HEAD
|
||||
services.AddTransient<IShopLogic, ShopLogic>();
|
||||
=======
|
||||
services.AddTransient<IReportLogic, ReportLogic>();
|
||||
|
||||
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
||||
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
||||
>>>>>>> laba_4
|
||||
|
||||
services.AddTransient<FormMain>();
|
||||
services.AddTransient<FormComponent>();
|
||||
@ -69,13 +62,12 @@ namespace PlumbingRepairView
|
||||
services.AddTransient<FormShop>();
|
||||
services.AddTransient<FormShops>();
|
||||
services.AddTransient<FormWorkComponent>();
|
||||
<<<<<<< HEAD
|
||||
services.AddTransient<FormStoreReplenishment>();
|
||||
services.AddTransient<FormSellWorks>();
|
||||
=======
|
||||
services.AddTransient<FormReportOrders>();
|
||||
services.AddTransient<FormReportOrdersByDate>();
|
||||
services.AddTransient<FormReportWorkComponents>();
|
||||
>>>>>>> laba_4
|
||||
services.AddTransient<FormReportShopWorks>();
|
||||
}
|
||||
}
|
||||
}
|
404
PlumbingRepair/PlumbingRepairView/ReportOrdersByDate.rdlc
Normal file
404
PlumbingRepair/PlumbingRepairView/ReportOrdersByDate.rdlc
Normal file
@ -0,0 +1,404 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox1">
|
||||
<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>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Height>0.89986cm</Height>
|
||||
<Width>11.67694cm</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>3.81116cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.5551cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.72296cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<TablixCells>
|
||||
<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>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Количество</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</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="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Сумма</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</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="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.07625cm</Top>
|
||||
<Left>0.30551cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>11.08922cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox12">
|
||||
<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>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>2.73389cm</Top>
|
||||
<Left>5.43634cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.23542cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Middle</VerticalAlign>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox11">
|
||||
<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>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Top>2.73389cm</Top>
|
||||
<Left>7.67176cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>3.72296cm</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>1.55556in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>4.59722in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="PlumbingRepairContractsViewModels">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>238af19e-9b0c-4e28-adb3-e1d783e7fdff</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DataSetOrders">
|
||||
<Query>
|
||||
<DataSourceName>PlumbingRepairContractsViewModels</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="DateCreate">
|
||||
<DataField>DateCreate</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>PlumbingRepairContracts.ViewModels</rd:DataSetName>
|
||||
<rd:TableName>ReportOrdersViewModel</rd:TableName>
|
||||
<rd:ObjectDataSourceType>PlumbingRepairContracts.ViewModels.ReportOrdersByDateViewModel, PlumbingRepairContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>eea72620-f270-4155-a203-6e9706fa3bf1</rd:ReportID>
|
||||
</Report>
|
Loading…
Reference in New Issue
Block a user