44 lines
1.8 KiB
C#
44 lines
1.8 KiB
C#
using System.Net.Mime;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using Kreta.BusinessLogic.Helpers;
|
|
using Kreta.Resources;
|
|
using Kreta.Web.Areas.Orarend.Models;
|
|
using Kreta.Web.Helpers;
|
|
|
|
namespace Kreta.Web.Areas.Orarend.Logic
|
|
{
|
|
public class TanoraKeresoLogic
|
|
{
|
|
public static ActionResult ExportHelyettesitettTanorak(TanitasiOraSearchModel model)
|
|
{
|
|
var bytes = new TanoraHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetHelyettesitettTanorakExcelExport(TanitasiOraSearchModel.ConvertModelToCo(model));
|
|
|
|
return new FileContentResult(bytes, MediaTypeNames.Application.Octet)
|
|
{
|
|
FileDownloadName = HttpUtility.UrlEncode(OrarendResource.HelyettesitettTanorakExportFileName, Encoding.UTF8),
|
|
};
|
|
}
|
|
|
|
public static ActionResult ExportElmaradtTanorak(TanitasiOraSearchModel model)
|
|
{
|
|
var bytes = new TanoraHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetElmaradtTanorakExcelExport(TanitasiOraSearchModel.ConvertModelToCo(model));
|
|
|
|
return new FileContentResult(bytes, MediaTypeNames.Application.Octet)
|
|
{
|
|
FileDownloadName = HttpUtility.UrlEncode(OrarendResource.ElmaradtTanorakExportFileName, Encoding.UTF8),
|
|
};
|
|
}
|
|
|
|
public static ActionResult ExportMegtartottTanorak(TanitasiOraSearchModel model)
|
|
{
|
|
var bytes = new TanoraHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetMegtartottTanorakExcelExport(TanitasiOraSearchModel.ConvertModelToCo(model));
|
|
|
|
return new FileContentResult(bytes, MediaTypeNames.Application.Octet)
|
|
{
|
|
FileDownloadName = HttpUtility.UrlEncode(OrarendResource.MegtartottTanorakExportFileName, Encoding.UTF8),
|
|
};
|
|
}
|
|
}
|
|
}
|