@using Kreta.Web.Helpers.Grid; @using Kreta.Web.Areas.Tanulo.Models; @using Kreta.Enums.ManualEnums; @using Kreta.BusinessLogic.Classes @using Kreta.BusinessLogic.Security; @using Kreta.Resources @using Kreta.Enums @using Kreta.Web.Security @model TanuloSearchModel @{ const string TanuloApiController = Constants.ApiControllers.EGYMITanuloApi; const string TanuloController = Constants.Controllers.EGYMITanulo; const string GridName = "TanuloGrid"; const string SearchForm = "searchForm"; } @section AddSearchPanel { @using (Html.SearchPanelSideBar(SearchForm, GridName)) { @Html.KretaComboBoxFor(x => x.FeladatKategoriaId, Model.EGYMIFeladatKategoriaIdItem, htmlAttributes: new Dictionary() { { "class", "disabledItem" } }).AutoBind(true).RenderSearchPanelSideBar() @Html.KretaTextBoxFor(model => model.Nev).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.NemId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetNemList" }), isSingleElementSet: false).AutoBind(true).RenderSearchPanelSideBar() @Html.KretaTextBoxFor(model => model.SzuletesiHely).RenderSearchPanelSideBar() @Html.KretaRangeDatePickerSideBar(m => m.SzuletesiIdoTol, m => m.SzuletesiIdoIg) @Html.KretaComboBoxFor(x => x.OsztalyCsoportId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetEGYMIOsztalyListForCascadeCB" }), useGroup: true, isSingleElementSet: false).AutoBind(true).RenderSearchPanelSideBar() @Html.KretaCheckBoxFor(x => x.Aktiv).RenderSearchPanelSideBar() @Html.KretaCheckBoxFor(model => model.Archivalt).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.EvfolyamId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetEvfolyamComboBoxList" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.FelvetelTanevId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetFelvetelTanevList" }), htmlAttributes: new Dictionary() { { "class", "disabledItem" } }).AutoBind(true).RenderSearchPanelSideBar() @Html.KretaMaskedTextBoxFor(model => model.OktatasiAzonosito, "00000000000").RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.VegzosId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.SNIId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.BTMId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.FeladatEllatasiHelyId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetEGYMIFeladatellatasiHelyek" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.HatranyosHelyzetId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetHatranyosHelyzetList" }), isSingleElementSet: false).RenderSearchPanelSideBar() @Html.HiddenFor(model => model.OsztalybaSoroltTantervNelkul) @Html.HiddenFor(model => model.RosszOktAzon) @Html.HiddenFor(model => model.NincsNem) @Html.HiddenFor(model => model.NincsSzakmaCsoport) @Html.HiddenFor(model => model.NincsAnyanyelv) @Html.HiddenFor(model => model.NincsAllampolgarsag) @Html.HiddenFor(model => model.TanuloBelepesNelkul) if(ClaimData.IsSzakkepzoIntezmeny && ClaimData.IsSelectedTanev21_22OrLater) { @Html.KretaComboBoxFor(x => x.TanterviJellegSearchId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetKepzesListS" }), isSingleElementSet: false).AutoBind(true).RenderSearchPanelSideBar() } } } @section AddCss { @Styles.Render(Constants.General.TanuloErtekelesCSS) } @{ List nestedHozzaferesFunctions = new List { }; List nestedExportFunctions = new List { }; //nestedExportFunctions.Add(new FunctionCommand { Enabled = false, Name = TanuloResource.Exportalas, ClientAction = "TanuloHelper.export" }); nestedExportFunctions.Add(new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "TanuloHelper.getExport" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.ExportalasBesorolashoz, ClientAction = "TanuloHelper.ExportBesorolashoz" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.TanulokElerhetosegei, ClientAction = "TanuloHelper.TanulokElerhetosegeiExport" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.TanulokTanugyiAdatai, ClientAction = "TanuloHelper.TanulokTanugyiAdataiExport" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.TanulokTantargyaiEsPedagogusai, ClientAction = "TanuloHelper.exportTanulokTantargyaiEsPedagogusai" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.GondviselokElerhetosegei, ClientAction = "TanuloHelper.GondviselokElerhetosegeiExport" }); nestedExportFunctions.Add(new FunctionCommand { Enabled = true, Name = TanuloResource.TanuloKirStatExport, ClientAction = "TanuloHelper.TanuloKirStatExport" }); if (ClaimData.IsActivTanev) { nestedExportFunctions.Add(new FunctionCommand { Name = TanuloResource.TanuloKirStatTeljesExport, ClientAction = "TanuloHelper.TanuloKirStatTeljesExport" }); } List functions = new List { new FunctionCommand {Name = TanuloResource.Modositas, ClientAction = "TanuloHelper.openSelectModWindow"} //new FunctionCommand {Name = TanuloResource.BovitettGondviseloiJogosultsagGeneralasa, ClientAction = "TanuloHelper.setGondviseloToBovitettConfirmWindow" } }; functions.Add(new FunctionCommand { Name = TanuloResource.Export.ToUpper(), NestedCommands = nestedExportFunctions }); if (ClaimManager.HasPackage(KretaClaimPackages.Adminisztrator.ClaimValue) && Model.TanuloHozzaferesGeneralasaGombLathato && ClaimData.IsActivTanev && !ClaimData.IsSzirIntezmeny) { nestedHozzaferesFunctions.Add(new FunctionCommand { Enabled = false, Name = TanuloResource.BelepesiAzonositoGeneralasTanulo, ClientAction = "function() { TanuloHelper.AzonositoGeneralasOsszesnekConfirmWindow(true); }" }); nestedHozzaferesFunctions.Add(new FunctionCommand { Name = TanuloResource.BelepesiAzonositoGeneralasKijeloltTanuloknak, ClientAction = "function() { TanuloHelper.AzonositoGeneralasKijelolteknekConfirmWindow(true); }" }); } /*if (ClaimManager.HasPackage(KretaClaimPackages.Adminisztrator.ClaimValue) && Model.TanuloJelszoGeneralasaGombLathato && ClaimData.IsActivTanev) { nestedJelszoFunctions.Add(new FunctionCommand { Enabled = false, Name = TanuloResource.JelszoAlaphelyzetbeAllitasaTanulo, ClientAction = "function() { TanuloHelper.JelszavakAlaphelyzetbeOsszesnekConfirmWindow(true); }" }); //nestedHozzaferesFunctions.Add(new FunctionCommand { Name = TanuloResource.BelepesiAzonositoGeneralasKijeloltTanulokGondviseloinek, ClientAction = "function() { TanuloHelper.AzonositoGeneralasKijelolteknekConfirmWindow(false); }" }); }*/ //if (ClaimManager.HasPackage(KretaClaimPackages.Adminisztrator.ClaimValue) && Model.GondviseloHozzaferesGeneralasaGombLathato && ClaimData.IsActivTanev) //{ // nestedHozzaferesFunctions.Add(new FunctionCommand { Name = TanuloResource.BelepesiAzonositoGeneralasGondviselo, ClientAction = "function() { TanuloHelper.AzonositoGeneralasOsszesnekConfirmWindow(false); }" }); //} //if (ClaimManager.HasPackage(KretaClaimPackages.Adminisztrator.ClaimValue) && Model.GondviseloJelszoGeneralasaGombLathato && ClaimData.IsActivTanev) //{ // nestedJelszoFunctions.Add(new FunctionCommand { Name = TanuloResource.JelszoAlaphelyzetbeAllitasaGondviselo, ClientAction = "function() { TanuloHelper.JelszavakAlaphelyzetbeOsszesnekConfirmWindow(false); }" }); //} if (nestedHozzaferesFunctions.Count > 0) { //if (ClaimManager.HasPackage(KretaClaimPackages.Adminisztrator.ClaimValue) && Model.TanuloJelszoGeneralasaGombLathato && ClaimData.IsActivTanev && !ClaimData.IsSzirIntezmeny) //{ // nestedHozzaferesFunctions.Add(new FunctionCommand { Name = TanuloResource.JelszoAlaphelyzetbeAllitasaTanulo, ClientAction = "function() { TanuloHelper.JelszavakAlaphelyzetbeKivalasztottnakConfirmWindow(true); }" }); //} functions.Add(new FunctionCommand { Enabled = false, Name = TanuloResource.BelepesiAdatokGeneralas.ToUpper(), NestedCommands = nestedHozzaferesFunctions }); } }
@( Html.KretaGrid( GridName, new GridApiUrl(TanuloApiController, "GetTanuloGrid", new Dictionary()), dataParameterFunction: SearchForm, allowScrolling: true, sort: sort => sort.Add(m => m.TanuloNeveElotagNelkul).Ascending() ) .SelectBoxColumn(Html, string.Empty) .LinkButtonColumn(string.Empty, c => c.TanuloNeveElotagNelkul, "TanuloHelper.openModTanuloWindow", GridButtonsEnum.Modositas, customField: "TanuloNeve") .Columns(columns => { columns.Bound(c => c.AnyjaNeve); columns.Bound(c => c.SzuletesiHely); columns.Bound(c => c.SzuletesiIdo).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%"); columns.Bound(c => c.OktatasiAzonosito).Width("10%"); columns.Bound(c => c.IsTankotelezettText).Width("10%"); columns.Bound(c => c.Osztaly); }) .RowFunction(Html, new List { new RowFunction { Name = TanuloResource.Modositas, ClientAction= "TanuloHelper.openModTanuloWindow", IconEnum = GridRowFunctionIconEnum.Modositas }, new RowFunction { Name = TanuloResource.Adatok, ClientAction= "TanuloHelper.openDetailTanuloWindow", IconEnum = GridRowFunctionIconEnum.Adatok }, }) .FunctionCommand(Html, functions) .Sortable(sortable => sortable .AllowUnsort(true) .SortMode(GridSortMode.MultipleColumn)) )
@Html.Partial("_KozossegiSzolgalatokHelper_Partial")