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

52 lines
1.3 KiB
C#
Raw Normal View History

using Microsoft.Extensions.Logging;
using SchoolContracts.BusinessLogicsContracts;
using SchoolContracts.StoragesContracts;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.BusinessLogics
{
public class ReportLogic : IReportLogic
{
private readonly ICircleStorage _circleStorage;
private readonly IExpenseStorage _expenseStorage;
/// <summary>
/// Получение списка кружков с указанием списка затрат по ним
/// </summary>
/// <returns></returns>
public List<ReportViewModel> GetCircles()
{
var expenses = _expenseStorage.GetFullList();
var circles = _circleStorage.GetFullList();
var list = new List<ReportViewModel>();
foreach(var circle in circles)
{
var record = new ReportViewModel
{
CircleNumber = circle.Id,
Expenses = new List<ReportExpensesViewModel>(),
CircleCount = 0
};
foreach (var expense in expenses)
{
}
list.Add(record);
}
return list;
}
/// <summary>
/// Получение списка занятий за определенный период
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
}
}