Case_accounting/CaseAccounting/CaseAccountingBusinessLogics/BusinessLogics/ReportProviderLogic.cs

71 lines
2.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using CaseAccountingContracts.BindingModels;
using CaseAccountingContracts.BusinessLogicContracts;
using CaseAccountingContracts.StoragesContracts;
using CaseAccountingContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CaseAccountingBusinessLogic.BusinessLogics
{
public class ReportProviderLogic : IReportProviderLogic
{
private readonly ICaseStorage _caseStorage;
private readonly ISpecializationStorage _specializationStorage;
private readonly IHearingStorage _hearingStorage;
private readonly ILawyerStorage _lawyerStorage;
public ReportProviderLogic(ICaseStorage caseStorage, ISpecializationStorage specializationStorage, IHearingStorage hearingStorage, ILawyerStorage lawyerStorage)
{
_caseStorage = caseStorage ?? throw new ArgumentNullException(nameof(caseStorage));
_specializationStorage = specializationStorage ?? throw new ArgumentNullException(nameof(specializationStorage));
_hearingStorage = hearingStorage ?? throw new ArgumentNullException(nameof(hearingStorage));
_lawyerStorage = lawyerStorage ?? throw new ArgumentNullException(nameof(lawyerStorage));
}
public List<ReportCaseSpecializationViewModel> GetCaseSpecialization()
{
var сases = _caseStorage.GetFullList();
var list = new List<ReportCaseSpecializationViewModel>();
foreach (var c in сases)
{
var report = new ReportCaseSpecializationViewModel
{
CaseName = c.Name,
Applicant = c.Applicant,
Defendant = c.Defendant,
Date = c.Date,
Specialization = c.Specialization,
};
list.Add(report);
}
return list;
}
public List<ReportHearingLawyerViewModel> GetHearingLawyer(ReportBindingModel model)
{
var hearings = _hearingStorage.GetFullList();
var lawyers = _lawyerStorage.GetFullList();
var list = new List<ReportHearingLawyerViewModel>();
return list;
}
public void SaveCaseSpecializationToExcelFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
public void SaveCaseSpecializationToWordFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
public void SaveHearingLawyerToPdfFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
}
}