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

51 lines
1.6 KiB
C#

using System.Web.Mvc;
using Kreta.Web.Areas.Tantargy.Models;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Tantargy.Controllers
{
public class TanmenetController : BaseTanmenetController
{
public TanmenetController(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.Tanmenet,
ApiControllerName = Constants.ApiControllers.TanmenetApi,
ImportControllerName = Constants.Controllers.TanmenetImportExport,
IsFromSzervezet = false,
};
return View(model);
}
public ActionResult OpenNewTanmenetWindow()
{
var model = new NewTanmenetModel
{
ApiControllerName = Constants.ApiControllers.TanmenetApi,
};
return OpenNewTanmenetWindow(model);
}
public new ActionResult OpenEditTanmenetGridWindow(TanmenetOrakModel model)
{
model.ApiControllerName = Constants.ApiControllers.TanmenetApi;
return base.OpenEditTanmenetGridWindow(model);
}
public new string ExportTanmenet(int tantargyId, int osztalyId)
{
return base.ExportTanmenet(tantargyId, osztalyId);
}
}
}