Промежуточное сохранение.

This commit is contained in:
Programmist73 2023-04-04 23:39:03 +04:00
parent 0ce92e5430
commit 9fc7afc1a7
2 changed files with 10 additions and 32 deletions

View File

@ -46,11 +46,10 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
return _moneyTransferStorage.GetFilteredList(new MoneyTransferSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo}) return _moneyTransferStorage.GetFilteredList(new MoneyTransferSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo})
.Select(x => new ReportCashierViewModel .Select(x => new ReportCashierViewModel
{ {
AccountId = x.Id,
DateComplite = x.DateOperation, DateComplite = x.DateOperation,
ClientName = x.ClientName, AccountPayeeId = x.AccountPayeeId,
SumOperation = x.SumOperation, AccountSenderId = x.AccountSenderId,
TypeOperation = x.TypeOperation SumOperation = x.Sum
}) })
.ToList(); .ToList();
} }
@ -60,11 +59,9 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
return _cashWithdrawalStorage.GetFilteredList(new CashWithdrawalSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo }) return _cashWithdrawalStorage.GetFilteredList(new CashWithdrawalSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo })
.Select(x => new ReportCashierViewModel .Select(x => new ReportCashierViewModel
{ {
AccountId = x.Id, AccountPayeeId = x.Id,
DateComplite = x.DateOperation, DateComplite = x.DateOperation,
ManufactureName = x.ManufactureName, SumOperation = x.Sum
Sum = x.Sum,
OrderStatus = x.Status.ToString()
}) })
.ToList(); .ToList();
} }
@ -72,36 +69,19 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
//Сохранение мороженных в файл-Word //Сохранение мороженных в файл-Word
public void SaveAccountsToWordFile(ReportBindingModel model) public void SaveAccountsToWordFile(ReportBindingModel model)
{ {
_saveToWord.CreateDoc(new WordInfo throw new NotImplementedException();
{
FileName = model.FileName,
Title = "Список изделий",
Accounts = _accountStorage.GetFullList()
});
} }
//Сохранение заготовок с указаеним изделий в файл-Excel //Сохранение заготовок с указаеним изделий в файл-Excel
public void SaveAccountsToExcelFile(ReportBindingModel model) public void SaveAccountsToExcelFile(ReportBindingModel model)
{ {
_saveToExcel.CreateReport(new ExcelInfo throw new NotImplementedException();
{
FileName = model.FileName,
Title = "Список заготовок",
Accounts = _accountStorage.GetFullList()
});
} }
//Сохранение заказов в файл-Pdf //Сохранение заказов в файл-Pdf
public void SaveAccountsToPdfFile(ReportBindingModel model) public void SaveAccountsToPdfFile(ReportBindingModel model)
{ {
_saveToPdf.CreateDoc(new PdfInfo throw new NotImplementedException();
{
FileName = model.FileName,
Title = "Список заказов",
DateFrom = model.DateFrom!.Value,
DateTo = model.DateTo!.Value,
ReportAccounts = GetAccounts(model)
});
} }
} }
} }

View File

@ -8,11 +8,9 @@ namespace BankYouBankruptContracts.ViewModels
{ {
public class ReportCashierViewModel public class ReportCashierViewModel
{ {
public int AccountId { get; set; } public int AccountPayeeId { get; set; }
public string ClientName { get; set; } = string.Empty; public int AccountSenderId { get; set; }
public string TypeOperation { get; set; } = string.Empty;
public double SumOperation { get; set; } public double SumOperation { get; set; }