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;
}
///
/// получение занятий по кружку
///
public List GetLessonCircles(ReportBindingModel model)
{
return _circleStorage.GetLessonCircles(new() { SelectedCirclesIds = model.SelectedCircles});
}
///
/// получение затрат кружку
///
public List 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();
}
}
}