@using Kreta.Web.Helpers.Grid @using Kreta.Web.Areas.LEPModul.Models @using Kreta.Resources @using Kreta.Enums.ManualEnums @using Kreta.Web.Security @model EloadasokDetailModel
@{ List JelenletList = new List(); JelenletList.Add(new SelectListItem() { Text = "Megjelent", Value = "T" }); JelenletList.Add(new SelectListItem() { Text = "Nem jelent meg", Value = "F" }); var grid = Html.KretaGrid ( name: "EloadasokDetailGrid_" + Model.ID.ToString(), getUrl: new GridApiUrl("EloadasokKezeleseApi", "GetEloadasokDetailGrid", new Dictionary()), useToolBar: false, allowSorting: false, readDataFunction: "function(){ return { data: '" + Model.ToJson(true) + "' }; }" ) .Columns(columns => { columns.Bound(c => c.TanuloNev); columns.Bound(c => c.OsztalyCsoportNev); columns.Bound(c => c.GondviseloElfogadas).ClientTemplate(@" #if (GondviseloElfogadas == 'T') { # Igen # } # #if (GondviseloElfogadas == 'F') { # Nem # } # #if (GondviseloElfogadas == null || GondviseloElfogadas == ' ') { # Függőben # } # "); columns.Bound(c => c.TanuloOktAzon).Hidden(); columns.Bound(c => c.IntezmenyNev).Hidden(); columns.Bound(c => c.IntezmenyAzon).Hidden(); }) .AutoBind(true) .Excel(excel => excel .FileName("JelenletiIv.xlsx") .AllPages(true) ); if (Model.Datum > DateTime.Now.Date) { if (ClaimData.JustLEPOrganization) { grid.FunctionCommand(Html, new List() { new FunctionCommand() { Name = EloadasokResource.DokumentumLetoltes, ClientAction = "LEPDetailHelper.DokumentumLetoltes" }, new FunctionCommand() { Name = "Jelenléti Ív", ClientAction = "LEPHelper.JelenletiIv" }, new FunctionCommand() { Name = "Export", ClientAction = "LEPHelper.Export" } }); } else { grid.FunctionCommand(Html, new List() { new FunctionCommand() { Name = "Jelenléti Ív", ClientAction = "LEPHelper.JelenletiIv" }, new FunctionCommand() { Name = "Export", ClientAction = "LEPHelper.Export" } }); } grid.ConditionalRowFunction(Html, new List { new RowFunction { NameResourceId = 117 /*Törlés*/, ClientAction = "LEPHelper.DeleteTanulokForEloadas", IconEnum = GridRowFunctionIconEnum.Torles } }, "LEPHelper.setRowDeleting"); } else { grid.Columns(c => c.Template(t => t.ToString()).HeaderHtmlAttributes(new { @class = "mulasztasGridColumnHeaderTh" }) .Title(@"
" + "Megjelent" + @"
" + "Nem jelent meg" + @"
") .ClientTemplate(@" #if (isErasable == 'T') { # " + grid.SelectForColumnTemplate(Html.For(), x => x.Megjelent, JelenletList) + @"# } #" ) ); if (ClaimData.JustLEPOrganization) { grid.FunctionCommand(Html, new List() { new FunctionCommand() { Name = "Engedélykérő dokumenutumok letöltése", ClientAction = "LEPDetailHelper.DokumentumLetoltes" }, new FunctionCommand() { Name = "Jelenléti Ív", ClientAction = "LEPHelper.JelenletiIv" }, new FunctionCommand() { Name = "Jelenlét mentés", ClientAction = "LEPHelper.JelenletMentes" }, new FunctionCommand() { Name = "Export", ClientAction = "LEPHelper.Export" } }); } else { grid.FunctionCommand(Html, new List() { new FunctionCommand() { Name = "Jelenléti Ív", ClientAction = "LEPHelper.JelenletiIv" }, new FunctionCommand() { Name = "Jelenlét mentés", ClientAction = "LEPHelper.JelenletMentes" }, new FunctionCommand() { Name = "Export", ClientAction = "LEPHelper.Export" } }); } } } @if (Model.IsToroltJelentkezes) {
}
@Html.KretaComboBox("PartialEvfolyamComboSelect_" + Model.ID.ToString(), null, "Text", "Value", null, null)
@Html.KretaComboBox("PartialComboSelect_" + Model.ID.ToString(), null, "Text", "Value", null, null)
@Html.KretaMultiSelect("PartialMultiSelect_" + Model.ID.ToString(), null, "Text", "Value", null, null)
@Html.KretaNumeric("Kisero_" + Model.ID.ToString()).Min(0).Max(100).Step(1).Format("").Decimals(0).Value(Model.KiseroSzam)
@if (Model.Datum >= DateTime.Now.Date) {
@Html.KretaComboBox("PartialComboDeleteSelect_" + Model.ID.ToString(), null, "Text", "Value", null, null)
}
@(grid) @*} else { @(grid)
@Html.KretaNumeric("Kisero_" + Model.ID.ToString()).Min(0).Max(100).Step(1).Format("").Decimals(0).Value(Model.KiseroSzam).Enable(false)
}*@