PIbd-21_Pyatakov_KM_Markov_.../UniversityCustomer/Controllers/ReportCustomerController.cs
2023-06-22 00:20:17 +04:00

41 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Mvc;
using UniversityContracts.BindingModels;
using UniversityContracts.BusinessLogicContracts;
using UniversityContracts.ViewModels;
namespace UniversityRestAPI.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class ReportCustomerController : Controller
{
private readonly IReportCustomerLogic reportLogic;
public ReportCustomerController(IReportCustomerLogic reportLogic)
{
this.reportLogic = reportLogic;
}
[HttpPost]
public byte[] StreamStudentList(StreamStudentBindingModel listModel)
{
byte[] file = reportLogic.SaveListFile(listModel);
return file;
}
[HttpPost]
public List<ReportDisciplineViewModel> GetReportData(ReportBindingModel reportModel)
{
var list = reportLogic.GetDiscipline(reportModel);
return list;
}
[HttpPost]
public void SendByMailStatusReport(ReportBindingModel reportModel)
{
reportLogic.SendByMailStatusReport(reportModel);
}
}
}