fix 5h
This commit is contained in:
parent
6a8eb870c9
commit
78a6283a1a
@ -262,8 +262,8 @@ namespace PrecastConcretePlantView
|
||||
|
||||
private void загруженностьМагазиновToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopTravels));
|
||||
if (service is FormReportShopTravels form)
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopReinforceds));
|
||||
if (service is FormReportShopReinforceds form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Reporting.WinForms;
|
||||
using PrecastConcretePlantContracts.BindingModels;
|
||||
using PrecastConcretePlantContracts.BusinessLogicsContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
@ -1,4 +1,6 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PrecastConcretePlantContracts.BindingModels;
|
||||
using PrecastConcretePlantContracts.BusinessLogicsContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
@ -13,15 +13,17 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
private readonly IComponentStorage _componentStorage;
|
||||
private readonly IReinforcedStorage _reinforcedStorage;
|
||||
private readonly IOrderStorage _orderStorage;
|
||||
private readonly IShopStorage _shopStorage;
|
||||
private readonly AbstractSaveToExcel _saveToExcel;
|
||||
private readonly AbstractSaveToWord _saveToWord;
|
||||
private readonly AbstractSaveToPdf _saveToPdf;
|
||||
public ReportLogic(IReinforcedStorage reinforcedStorage, IComponentStorage componentStorage, IOrderStorage orderStorage,
|
||||
AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||
IShopStorage shopStorage, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||
{
|
||||
_reinforcedStorage = reinforcedStorage;
|
||||
_componentStorage = componentStorage;
|
||||
_orderStorage = orderStorage;
|
||||
_shopStorage = shopStorage;
|
||||
_saveToExcel = saveToExcel;
|
||||
_saveToWord = saveToWord;
|
||||
_saveToPdf = saveToPdf;
|
||||
@ -161,11 +163,11 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
||||
}
|
||||
public void SaveShopReinforcedToExcelFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToExcel.CreateShopReport(new ExcelInfo
|
||||
_saveToExcel.CreateShopReport(new ExcelInfoShop
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список магазинов",
|
||||
ShopTravels = GetShopReinforced()
|
||||
ShopReinforceds = GetShopReinforced()
|
||||
});
|
||||
}
|
||||
public void SaveOrdersByDateToPdfFile(ReportBindingModel model)
|
||||
|
@ -78,7 +78,7 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
||||
}
|
||||
SaveExcel(info);
|
||||
}
|
||||
public void CreateShopReport(ExcelInfo info)
|
||||
public void CreateShopReport(ExcelInfoShop info)
|
||||
{
|
||||
CreateExcel(new ExcelInfo() { FileName = info.FileName });
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
@ -111,14 +111,14 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = reinforced.Item1,
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
InsertCellInWorksheet(new ExcelCellParameters
|
||||
{
|
||||
ColumnName = "C",
|
||||
RowIndex = rowIndex,
|
||||
Text = reinforced.Item2.ToString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
rowIndex++;
|
||||
}
|
||||
|
@ -12,6 +12,6 @@ namespace PrecastConcretePlantContracts.ViewModels
|
||||
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
public List<(string Travel, int Count)> Travels { get; set; } = new();
|
||||
public List<(string Reinforced, int Count)> Reinforceds { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user