2023-06-21 21:38:05 +04:00
|
|
|
|
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)
|
|
|
|
|
{
|
2023-06-22 00:20:17 +04:00
|
|
|
|
Console.BackgroundColor = ConsoleColor.Green;
|
2023-06-21 21:38:05 +04:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|