Merge branch 'main' of http://student.git.athene.tech/shadowik/CourseWork_BankYouBankrupt
This commit is contained in:
commit
17c796bc0f
@ -0,0 +1,99 @@
|
|||||||
|
using BankYouBankruptBusinessLogic.OfficePackage.HelperModels;
|
||||||
|
using BankYouBankruptBusinessLogic.OfficePackage;
|
||||||
|
using BankYouBankruptContracts.BindingModels;
|
||||||
|
using BankYouBankruptContracts.BusinessLogicsContracts;
|
||||||
|
using BankYouBankruptContracts.SearchModels;
|
||||||
|
using BankYouBankruptContracts.StoragesContracts;
|
||||||
|
using BankYouBankruptContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BankYouBankruptBusinessLogic.BusinessLogics
|
||||||
|
{
|
||||||
|
public class ReportClientLogic : IReportClientLogic
|
||||||
|
{
|
||||||
|
private readonly IAccountStorage _accauntStorage;
|
||||||
|
private readonly ICardStorage _cardStorage;
|
||||||
|
private readonly ICashierStorage _cashierStorage;
|
||||||
|
private readonly ICashWithdrawalStorage _cashWithdrawalStorage;
|
||||||
|
private readonly IClientStorage _clientStorage;
|
||||||
|
private readonly ICreditingStorage _creditingStorage;
|
||||||
|
private readonly IDebitingStorage _debitingStorage;
|
||||||
|
private readonly IMoneyTransferStorage _moneyTransferStorage;
|
||||||
|
|
||||||
|
private readonly AbstractSaveToExcelClient _saveToExcel;
|
||||||
|
private readonly AbstractSaveToWordClient _saveToWord;
|
||||||
|
private readonly AbstractSaveToPdfClient _saveToPdf;
|
||||||
|
|
||||||
|
public ReportClientLogic(IAccountStorage accauntStorage, ICardStorage cardStorage, ICashierStorage cashierStorage,
|
||||||
|
ICashWithdrawalStorage cashWithdrawalStorage, IClientStorage clientStorage, ICreditingStorage creditingStorage,
|
||||||
|
IDebitingStorage debitingStorage, IMoneyTransferStorage moneyTransferStorage,
|
||||||
|
AbstractSaveToExcelClient saveToExcel, AbstractSaveToWordClient saveToWord, AbstractSaveToPdfClient saveToPdf)
|
||||||
|
{
|
||||||
|
_accauntStorage = accauntStorage;
|
||||||
|
_cardStorage = cardStorage;
|
||||||
|
_cashierStorage = cashierStorage;
|
||||||
|
_cashWithdrawalStorage = cashWithdrawalStorage;
|
||||||
|
_clientStorage = clientStorage;
|
||||||
|
_creditingStorage = creditingStorage;
|
||||||
|
_debitingStorage = debitingStorage;
|
||||||
|
_moneyTransferStorage = moneyTransferStorage;
|
||||||
|
|
||||||
|
_saveToExcel = saveToExcel;
|
||||||
|
_saveToWord = saveToWord;
|
||||||
|
_saveToPdf = saveToPdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ReportClientViewModel>? GetCrediting(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
return _creditingStorage.GetFilteredList(new CreditingSearchModel
|
||||||
|
{
|
||||||
|
dateFrom = model.DateFrom,
|
||||||
|
dateTo = model.DateTo,
|
||||||
|
}).Select(x => new ReportClientViewModel
|
||||||
|
{
|
||||||
|
CardId = x.CardId,
|
||||||
|
SumOperation = x.Sum,
|
||||||
|
DateComplite = x.Date
|
||||||
|
}).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ReportClientViewModel>? GetDebiting(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveCreditingToExcelFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveCreditingToPdfFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveCreditingToWordFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveDebitingToExcelFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveDebitingToPdfFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveDebitingToWordFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace BankYouBankruptBusinessLogic.OfficePackage
|
namespace BankYouBankruptBusinessLogic.OfficePackage
|
||||||
{
|
{
|
||||||
public abstract class AbstractSaveToPdfCLient
|
public abstract class AbstractSaveToPdfClient
|
||||||
{
|
{
|
||||||
//публичный метод создания документа. Описание методов ниже
|
//публичный метод создания документа. Описание методов ниже
|
||||||
public void CreateDoc(PdfInfo info)
|
public void CreateDoc(PdfInfo info)
|
||||||
|
@ -11,15 +11,19 @@ namespace BankYouBankruptContracts.BusinessLogicsContracts
|
|||||||
{
|
{
|
||||||
public interface IReportClientLogic
|
public interface IReportClientLogic
|
||||||
{
|
{
|
||||||
List<ReportClientViewModel>? GetCards(ReportBindingModel model);
|
List<ReportClientViewModel>? GetCrediting(ReportBindingModel model);
|
||||||
|
|
||||||
|
List<ReportClientViewModel>? GetDebiting(ReportBindingModel model);
|
||||||
|
|
||||||
//Сохранение отчёта по картам в файл-Word
|
//Сохранение отчёта по картам в файл-Word
|
||||||
void SaveCardsToWordFile(ReportBindingModel model);
|
void SaveCreditingToWordFile(ReportBindingModel model);
|
||||||
|
void SaveDebitingToWordFile(ReportBindingModel model);
|
||||||
|
|
||||||
//Сохранение отчёта по картам в файл-Excel
|
//Сохранение отчёта по картам в файл-Excel
|
||||||
void SaveCardsToExcelFile(ReportBindingModel model);
|
void SaveCreditingToExcelFile(ReportBindingModel model);
|
||||||
|
void SaveDebitingToExcelFile(ReportBindingModel model);
|
||||||
//Сохранение отчёта по картам в файл-Pdf
|
//Сохранение отчёта по картам в файл-Pdf
|
||||||
void SaveCardsToPdfFile(ReportBindingModel model);
|
void SaveCreditingToPdfFile(ReportBindingModel model);
|
||||||
|
void SaveDebitingToPdfFile(ReportBindingModel model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ namespace BankYouBankruptContracts.SearchModels
|
|||||||
|
|
||||||
public int? Sum { get; set; }
|
public int? Sum { get; set; }
|
||||||
|
|
||||||
public DateTime? date { get; set; }
|
public DateTime? dateFrom { get; set; }
|
||||||
|
|
||||||
|
public DateTime? dateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ namespace BankYouBankruptContracts.SearchModels
|
|||||||
|
|
||||||
public int? Sum { get; set; }
|
public int? Sum { get; set; }
|
||||||
|
|
||||||
public DateTime? date { get; set; }
|
public DateTime? dateFrom { get; set; }
|
||||||
|
|
||||||
|
public DateTime? dateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,18 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace BankYouBankruptContracts.StoragesContracts
|
namespace BankYouBankruptContracts.StoragesContracts
|
||||||
{
|
{
|
||||||
public interface IDebitingStorage
|
public interface ICreditingStorage
|
||||||
{
|
{
|
||||||
List<DebitingViewModel> GetFullList();
|
List<CreditingViewModel> GetFullList();
|
||||||
|
|
||||||
List<DebitingViewModel> GetFilteredList(DebitingSearchModel model);
|
List<CreditingViewModel> GetFilteredList(CreditingSearchModel model);
|
||||||
|
|
||||||
DebitingViewModel? GetElement(DebitingSearchModel model);
|
CreditingViewModel? GetElement(CreditingSearchModel model);
|
||||||
|
|
||||||
DebitingViewModel? Insert(DebitingBindingModel model);
|
CreditingViewModel? Insert(CreditingBindingModel model);
|
||||||
|
|
||||||
DebitingViewModel? Update(DebitingBindingModel model);
|
CreditingViewModel? Update(CreditingBindingModel model);
|
||||||
|
|
||||||
DebitingViewModel? Delete(DebitingBindingModel model);
|
CreditingViewModel? Delete(CreditingBindingModel model);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,18 +9,18 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace BankYouBankruptContracts.StoragesContracts
|
namespace BankYouBankruptContracts.StoragesContracts
|
||||||
{
|
{
|
||||||
public interface ICreditingStorage
|
public interface IDebitingStorage
|
||||||
{
|
{
|
||||||
List<CreditingViewModel> GetFullList();
|
List<DebitingViewModel> GetFullList();
|
||||||
|
|
||||||
List<CreditingViewModel> GetFilteredList(CreditingSearchModel model);
|
List<DebitingViewModel> GetFilteredList(DebitingSearchModel model);
|
||||||
|
|
||||||
CreditingViewModel? GetElement(CreditingSearchModel model);
|
DebitingViewModel? GetElement(DebitingSearchModel model);
|
||||||
|
|
||||||
CreditingViewModel? Insert(CreditingBindingModel model);
|
DebitingViewModel? Insert(DebitingBindingModel model);
|
||||||
|
|
||||||
CreditingViewModel? Update(CreditingBindingModel model);
|
DebitingViewModel? Update(DebitingBindingModel model);
|
||||||
|
|
||||||
CreditingViewModel? Delete(CreditingBindingModel model);
|
DebitingViewModel? Delete(DebitingBindingModel model);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,8 +10,6 @@ namespace BankYouBankruptContracts.ViewModels
|
|||||||
{
|
{
|
||||||
public int CardId { get; set; }
|
public int CardId { get; set; }
|
||||||
|
|
||||||
public string TypeOperation { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
public double SumOperation { get; set; }
|
public double SumOperation { get; set; }
|
||||||
|
|
||||||
public DateTime DateComplite { get; set; }
|
public DateTime DateComplite { get; set; }
|
||||||
|
Loading…
Reference in New Issue
Block a user