а может даже так

This commit is contained in:
dasha 2023-05-17 15:37:25 +04:00
parent 5a027d33ef
commit 786d2de669
2 changed files with 13 additions and 8 deletions

View File

@ -78,19 +78,24 @@ namespace HardwareShopBusinessLogic.BusinessLogics.Storekeeper
return result; return result;
} }
public void SaveBuildGoodToExcelFile(ReportBindingModel model) public void SaveBuildGoodToExcelFile(ReportBindingModel model, List<GoodViewModel> goods)
{ {
_saveToExcel.CreateGoodBuildReport(new ExcelInfo _saveToExcel.CreateGoodBuildReport(new ExcelInfo
{ {
FileName = model.FileName, FileName = model.FileName,
Title = "Список суши", Title = "Список суши",
BuildGood = GetBuildGood(goods)
}); });
} }
public void SaveBuildGoodToWordFile(ReportBindingModel model) public void SaveBuildGoodToWordFile(ReportBindingModel model, List<GoodViewModel> goods)
{ {
throw new NotImplementedException(); _saveToWord.CreateGoodBuildReport(new WordInfo
{
FileName = model.FileName,
Title = "Список суши",
BuildGood = GetBuildGood(goods)
});
} }
} }
} }

View File

@ -21,15 +21,15 @@ namespace HardwareShopContracts.BusinessLogicsContracts
List<ReportComponentsViewModel> GetComponents(UserBindingModel user, ReportBindingModel model); List<ReportComponentsViewModel> GetComponents(UserBindingModel user, ReportBindingModel model);
/// <summary> /// <summary>
/// Сохранение комплектующих с указаеним товара/сборки в файл-Word /// Сохранение списка сборок по выбранным товарам в файл-Word
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
void SaveBuildGoodToWordFile(ReportBindingModel model); void SaveBuildGoodToWordFile(ReportBindingModel model, List<GoodViewModel> goods);
/// <summary> /// <summary>
/// Сохранение комплектующих с указаеним товара/сборки в файл-Excel /// Сохранение списка сборок по выбранным товарам в файл-Excel
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
void SaveBuildGoodToExcelFile(ReportBindingModel model); void SaveBuildGoodToExcelFile(ReportBindingModel model, List<GoodViewModel> goods);
} }
} }