init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
62
KretaWeb/Areas/Kerdoiv/Controllers/NatKerdoivController.cs
Normal file
62
KretaWeb/Areas/Kerdoiv/Controllers/NatKerdoivController.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Kerdoiv.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue, KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
||||
public class NatKerdoivController : Controller
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public static string FormName => "NatKerdoivForm";
|
||||
|
||||
public static string PopupName => "NatKerdoiv_Popup";
|
||||
|
||||
#endregion Properties
|
||||
|
||||
[HttpGet]
|
||||
public ActionResult Index()
|
||||
{
|
||||
|
||||
NatKerdoivCo co = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetNatKerdoivCo();
|
||||
var model = new NatKerdoivModel(co)
|
||||
{
|
||||
EgyToOtWithNemTudomSelectList = GetEgyToOtWithNemTudomList()
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[MvcValidateAjaxAntiForgeryToken]
|
||||
public ActionResult OpenNatKerdoivPopup()
|
||||
{
|
||||
PopUpModel popUpModel = new PopUpModel(null, PopupName);
|
||||
popUpModel.AddBtn(popUpModel, "NemToltomKiButton", KerdoivResource.MostNemToltomKi, "NatKerdoivPopupHelper.nemToltomKi", "BtnDelete");
|
||||
popUpModel.AddBtn(popUpModel, "KitioltomButton", KerdoivResource.Kitoltom, "NatKerdoivPopupHelper.kitoltom", "BtnOk");
|
||||
return PartialView(Constants.General.PopupView, popUpModel);
|
||||
}
|
||||
|
||||
private List<SelectListItem> GetEgyToOtWithNemTudomList()
|
||||
{
|
||||
var result = FrameworkEnumExtensions.EnumToListManual<EgyToOtWithNemTudomEnum>().ToSelectListItemList();
|
||||
//NOTE: A "Nem tudom" elemet a végére tesszük az elejéről a listának.
|
||||
var nemTudomItem = result.First();
|
||||
result.Remove(nemTudomItem);
|
||||
result.Add(nemTudomItem);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue