ISEbd-21_Tukaeva_A_A_School/School/SchoolBusinessLogic/BusinessLogics/ReportLogic.cs

55 lines
1.7 KiB
C#
Raw Normal View History

using Microsoft.Extensions.Logging;
using Microsoft.Identity.Client;
using SchoolContracts.BusinessLogicsContracts;
using SchoolContracts.StoragesContracts;
using SchoolContracts.ViewModels;
using SchoolDatabaseImplement.Models;
using SchoolDataModels.Models;
using SchoolContracts.BindingModel;
namespace SchoolContracts.BusinessLogics
{
public class ReportLogic : IReportLogic
{
private readonly ICircleStorage _circleStorage;
private readonly ILogger _logger;
private readonly ICircleExpenseStorage _circleExpenseStorage;
public ReportLogic(ILogger logger, ICircleStorage circleStorage,
ICircleExpenseStorage circleExpenseStorage)
{
_logger = logger;
_circleStorage = circleStorage;
_circleExpenseStorage = circleExpenseStorage;
}
/// <summary>
/// получение занятий по кружку
/// </summary>
public List<ReportCircleLessonsViewModel> GetLessonCircles(ReportBindingModel model)
{
return _circleStorage.GetLessonCircles(new() { SelectedCirclesIds = model.SelectedCircles});
}
/// <summary>
/// получение затрат кружку
/// </summary>
public List<ReportExpensesInCirclesViewModel> GetExpenses (ReportBindingModel model)
{
return _circleExpenseStorage.GetExpensesInCircles(new() { DateFrom = model.DateFrom, DateTo = model.DateTo });
}
public void SaveComponentsToWordFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
public void SaveManufactureComponentToExcelFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
public void SaveOrdersToPdfFile(ReportBindingModel model)
{
throw new NotImplementedException();
}
}
}