94 lines
3.3 KiB
C#
94 lines
3.3 KiB
C#
using System.Web.Mvc;
|
|
using Kreta.BusinessLogic.Security;
|
|
using Kreta.Web.Areas.Feljegyzes.Models;
|
|
using Kreta.Web.Security;
|
|
|
|
namespace Kreta.Web.Areas.Feljegyzes.Controllers
|
|
{
|
|
[MvcRoleClaimsAuthorize(true)]
|
|
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
|
[MvcRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue, KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
|
public class ElektronikusUzenetekController : BaseElektronikusUzenetekController
|
|
{
|
|
#region Properties
|
|
|
|
public static string TabStripId => "ElektronikusUzenetekTabStrip";
|
|
|
|
public static string StartPopupFormName => "ElektronikusUzenetekStartPopupForm";
|
|
public static string StartPopupId => "ElektronikusUzenetekStartWindow";
|
|
|
|
public static string GridNameNaploNezet => "ElektronikusUzenetNaploNezetGrid";
|
|
public static string GridNameListaNezet => "ElektronikusUzenetListaNezetGrid";
|
|
|
|
public static string NewFormName => "ElektronikusUzenetNewForm";
|
|
|
|
public static string ModifyPopupName => "Modify_Popup";
|
|
public static string ModifyFormName => "ElektronikusUzenetModifyForm";
|
|
public static string ModifyPopupGridName => "ElektronikusUzenetModifyPopupGrid";
|
|
|
|
#endregion Properties
|
|
|
|
public ElektronikusUzenetekController(IKretaAuthorization authorization) : base(authorization)
|
|
{
|
|
|
|
}
|
|
|
|
public ActionResult Index()
|
|
{
|
|
if (Authorization.IsValidDualisElektronikusUzenetek())
|
|
{
|
|
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new
|
|
{
|
|
area = string.Empty
|
|
}));
|
|
}
|
|
|
|
var model = new FeljegyzesekModel
|
|
{
|
|
TabList = GetTabs(Constants.Controllers.ElektronikusUzenetek),
|
|
ControllerName = Constants.Controllers.ElektronikusUzenetek,
|
|
ApiControllerName = Constants.ApiControllers.ElektronikusUzenetekApi,
|
|
IsDualisKepzohelyiCsoport = false,
|
|
};
|
|
return View("Index", model);
|
|
}
|
|
|
|
public ActionResult GetNaploNezetTab()
|
|
{
|
|
return GetNaploNezetTab(Constants.Controllers.ElektronikusUzenetek, Constants.ApiControllers.ElektronikusUzenetekApi);
|
|
}
|
|
|
|
public ActionResult GetListaNezetTab()
|
|
{
|
|
var model = new FeljegyzesekModel
|
|
{
|
|
ApiControllerName = Constants.ApiControllers.ElektronikusUzenetekApi,
|
|
};
|
|
return GetListaNezetTab(model);
|
|
}
|
|
|
|
public new ActionResult NaploNezetReszletekGrid(ElektronikusUzenetekNaploNezetGridModel model)
|
|
{
|
|
model.ApiControllerName = Constants.ApiControllers.ElektronikusUzenetekApi;
|
|
return base.NaploNezetReszletekGrid(model);
|
|
}
|
|
|
|
#region Popup actions
|
|
|
|
[HttpPost]
|
|
[MvcValidateAjaxAntiForgeryToken]
|
|
public ActionResult OpenStartPopup()
|
|
{
|
|
return OpenStartPopup(false);
|
|
}
|
|
|
|
[HttpPost]
|
|
[MvcValidateAjaxAntiForgeryToken]
|
|
public ActionResult OpenModifyPopup(int? id, int ocsID)
|
|
{
|
|
return OpenModifyPopup(id, ocsID, Constants.ApiControllers.ElektronikusUzenetekApi);
|
|
}
|
|
|
|
#endregion Popup actions
|
|
}
|
|
}
|