kreta/KretaWeb/Areas/Tantargy/Controllers/TanulasiElemekController.cs
2024-03-13 00:33:46 +01:00

53 lines
1.8 KiB
C#

using System.Web.Mvc;
using Kreta.Web.Areas.Tantargy.Models;
using Kreta.Web.Attributes;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Tantargy.Controllers
{
[KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
public class TanulasiElemekController : BaseTanmenetController
{
public TanulasiElemekController(IKretaAuthorization authorization) : base(authorization)
{
}
public ActionResult Index()
{
if (!Authorization.IsValidTanulasiElemek())
{
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
}
var model = new TanmenetSearchModel
{
ControllerName = Constants.Controllers.TanulasiElemek,
ApiControllerName = Constants.ApiControllers.TanulasiElemekApi,
ImportControllerName = Constants.Controllers.TanulasiElemImportExport,
IsFromSzervezet = true,
};
return View("~/Areas/Tantargy/Views/Tanmenet/Index.cshtml", model);
}
public ActionResult OpenNewTanmenetWindow()
{
var model = new NewTanmenetModel
{
ApiControllerName = Constants.ApiControllers.TanulasiElemekApi,
};
return OpenNewTanmenetWindow(model);
}
public new ActionResult OpenEditTanmenetGridWindow(TanmenetOrakModel model)
{
model.ApiControllerName = Constants.ApiControllers.TanulasiElemekApi;
return base.OpenEditTanmenetGridWindow(model);
}
public new string ExportTanmenet(int tantargyId, int osztalyId)
{
return base.ExportTanmenet(tantargyId, osztalyId);
}
}
}