init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,137 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Feljegyzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
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 BaseElektronikusUzenetekController : AbstractFeljegyzesekController
|
||||
{
|
||||
#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";
|
||||
|
||||
protected IKretaAuthorization Authorization { get; set; }
|
||||
#endregion Properties
|
||||
|
||||
public BaseElektronikusUzenetekController(IKretaAuthorization authorization)
|
||||
{
|
||||
Authorization = authorization ?? throw new ArgumentNullException(nameof(authorization));
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public ActionResult GetNaploNezetTab(string controllerName, string apiControllerName)
|
||||
{
|
||||
var feljegyzesHelperCo = new FeljegyzesHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetFeljegyzesHelperCo();
|
||||
var model = new ElektronikusUzenetSearchModel
|
||||
{
|
||||
IsFaliujsagMegjelenes = true,
|
||||
IsMindenkinek = true,
|
||||
EsemenyDatuma = feljegyzesHelperCo.DefaultEsemenyDatuma,
|
||||
MinimumErvenyessegKezdete = feljegyzesHelperCo.MinimumErvenyessegKezdete,
|
||||
MaximumErvenyessegKezdete = feljegyzesHelperCo.MaximumErvenyessegKezdete,
|
||||
MinimumErvenyessegVege = feljegyzesHelperCo.MinimumErvenyessegVege,
|
||||
MaximumErvenyessegVege = feljegyzesHelperCo.MaximumErvenyessegVege,
|
||||
ApiControllerName = apiControllerName,
|
||||
ControllerName = controllerName,
|
||||
};
|
||||
return PartialView("~/Areas/Feljegyzes/Views/ElektronikusUzenetek/NaploNezet_Tab.cshtml", model);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public ActionResult GetListaNezetTab(FeljegyzesekModel model)
|
||||
{
|
||||
return PartialView("~/Areas/Feljegyzes/Views/ElektronikusUzenetek/ListaNezet_Tab.cshtml", model);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public ActionResult NaploNezetReszletekGrid(ElektronikusUzenetekNaploNezetGridModel model)
|
||||
{
|
||||
return PartialView("~/Areas/Feljegyzes/Views/ElektronikusUzenetek/DetailGrid.cshtml", model);
|
||||
}
|
||||
|
||||
protected List<TabStripItemModel> GetTabs(string controllerName)
|
||||
{
|
||||
var list = new List<TabStripItemModel>
|
||||
{
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "0",
|
||||
ItemName = FeljegyzesekResource.NaploNezet,
|
||||
Area = "Feljegyzes",
|
||||
Controller = controllerName,
|
||||
Action = "GetNaploNezetTab"
|
||||
},
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "1",
|
||||
ItemName = FeljegyzesekResource.ListaNezet,
|
||||
Area = "Feljegyzes",
|
||||
Controller = controllerName,
|
||||
Action = "GetListaNezetTab"
|
||||
}
|
||||
};
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
#region Popup actions
|
||||
|
||||
[NonAction]
|
||||
public ActionResult OpenModifyPopup(int? id, int ocsID, string apiControllerName)
|
||||
{
|
||||
var helper = new FeljegyzesHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
var co = helper.GetFeljegyzesById(id.Value);
|
||||
var feljegyzesHelperCo = helper.GetFeljegyzesHelperCo();
|
||||
var model = new ElektronikusUzenetPopupModel(co, ocsID)
|
||||
{
|
||||
MinimumErvenyessegKezdetePopup = feljegyzesHelperCo.MinimumErvenyessegKezdete,
|
||||
MaximumErvenyessegKezdetePopup = feljegyzesHelperCo.MaximumErvenyessegKezdete,
|
||||
MinimumErvenyessegVegePopup = feljegyzesHelperCo.MinimumErvenyessegVege,
|
||||
MaximumErvenyessegVegePopup = feljegyzesHelperCo.MaximumErvenyessegVege,
|
||||
ApiControllerName = apiControllerName,
|
||||
};
|
||||
|
||||
var popupModel = new PopUpModel(model, $"~/Areas/Feljegyzes/Views/ElektronikusUzenetek/{ModifyPopupName}.cshtml");
|
||||
popupModel.AddCancelBtn(popupModel, "ElektronikusUzenetekHelper.modifyPopupCancel");
|
||||
popupModel.AddOkBtn(popupModel, "ModifyPopupHelper.saveElektronikusUzenetPopup");
|
||||
popupModel.AddDeleteBtn(popupModel, "ElektronikusUzenetekHelper.modifyPopupDelete");
|
||||
|
||||
return PartialView(Constants.General.PopupView, popupModel);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public ActionResult OpenStartPopup(bool isFromSzervezet)
|
||||
{
|
||||
var model = GetFeljegyzesekModel();
|
||||
model.IsDualisKepzohelyiCsoport = isFromSzervezet;
|
||||
return PartialView($"~/Areas/Feljegyzes/Views/ElektronikusUzenetek/Start_Popup.cshtml", model);
|
||||
}
|
||||
#endregion Popup actions
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue