init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
42
KretaWeb/Areas/Hianyzas/Controllers/HianyzasokController.cs
Normal file
42
KretaWeb/Areas/Hianyzas/Controllers/HianyzasokController.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Hianyzas.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Hianyzas.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Ellenorzo.ClaimValue)]
|
||||
public class HianyzasokController : Controller
|
||||
{
|
||||
// GET: Hianyzas/Hianyzasok
|
||||
public ActionResult Index(int? id)
|
||||
{
|
||||
var hianyzasokSearchModel = new HianyzasokSearchModel
|
||||
{
|
||||
MulaszatasId = id,
|
||||
};
|
||||
|
||||
return View(hianyzasokSearchModel);
|
||||
}
|
||||
|
||||
public ActionResult Export([FromUri] HianyzasokSearchModel searchModel)
|
||||
{
|
||||
var mulasztasHelper = new MulasztasHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
var stream = mulasztasHelper.ExportTanuloKesesekHianyzasok(searchModel.ConvertToMulasztasokCo());
|
||||
|
||||
var fileName = string.Format(HianyzasResource.TanuloKesesekHianyzasokExportFileName, DateTime.Now.ToString(Constants.General.ExportFileNameDateFormat));
|
||||
var result = new FileStreamResult(stream, Core.Constants.ContentTypes.Xlsx)
|
||||
{
|
||||
FileDownloadName = fileName
|
||||
};
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue