@using Kreta.Web.Areas.Adminisztracio.Models @using Kreta.Enums.ManualEnums @using Kreta.BusinessLogic.Classes @using Kreta.Web.Helpers.Grid; @using Kreta.Resources @model AktivTanevValtasaModel @section AddCss { @Styles.Render("~/Content/RendszerHibaErtesitesek") } @{ var itemModel = new AktivTanevValtasaItemModel(); var kellTTFWarning = true; string uzenetFormat = "
{0}
", partialViewName = "TanevvaltasElem"; } @if (Model.LejartLicence) { itemModel.Name = AdminisztracioResource.LejartLicenceTitle; itemModel.Content = string.Format(uzenetFormat, AdminisztracioResource.LejartLicenceAdat); itemModel.Type = AdminDashboardTipusEnum.Error; Html.RenderPartial(partialViewName, itemModel); } @if (Model.KiNemSoroltTanulokOsztaly > 0) { itemModel.Name = AdminisztracioResource.OsztalybaJaroTanulok; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.OsztalybaJaroTanulokLeiras, Model.KiNemSoroltTanulokOsztaly)); itemModel.Type = AdminDashboardTipusEnum.Error; Html.RenderPartial(partialViewName, itemModel); } @if (Model.BeNemSoroltNebulok > 0) { itemModel.Name = AdminisztracioResource.BeNemSoroltNebulok; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.BeNemSoroltNebulokLeiras, Model.BeNemSoroltNebulok)); itemModel.Type = AdminDashboardTipusEnum.Warning; Html.RenderPartial(partialViewName, itemModel); } @if (Model.KiNemSoroltTanulokCsoport > 0) { itemModel.Name = AdminisztracioResource.CsoportbaJaroTanulok; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.CsoportbaJaroTanulokLeiras, Model.KiNemSoroltTanulokCsoport)); itemModel.Type = AdminDashboardTipusEnum.Warning; Html.RenderPartial(partialViewName, itemModel); } @if (Model.NemErtekeltOsszefuggoSzakmaiGyakorlatosTanulok > 0) { itemModel.Name = FeljegyzesekResource.OsszefuggoSzakmaiGyakorlat; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.MegXtanuloOsszefuggoSzakmaiGyakorlataNincsErtekelve, Model.NemErtekeltOsszefuggoSzakmaiGyakorlatosTanulok)); itemModel.Type = AdminDashboardTipusEnum.Warning; Html.RenderPartial(partialViewName, itemModel); } @if (kellTTFWarning) { itemModel.Name = AdminisztracioResource.ElozetesTantargyfelosztas; itemModel.Content = string.Format(uzenetFormat, AdminisztracioResource.ElozetesTantargyfelosztasLeiras); itemModel.Type = AdminDashboardTipusEnum.Warning; Html.RenderPartial(partialViewName, itemModel); } @if (Model.AlkalmazottakAlapertekekkel.Any()) { itemModel.Name = AdminisztracioResource.VanAlkalmazottakAlapertekekkel; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.AlkalmazottAlapertekekkelLeiras, string.Join(", ",Model.AlkalmazottakAlapertekekkel))); itemModel.Type = AdminDashboardTipusEnum.Error; Html.RenderPartial(partialViewName, itemModel); } @if (Model.VanTorlendoAlkalmazott > 0) { itemModel.Name = AdminisztracioResource.MegszunoMunkaviszonyuAlkalmazottak; itemModel.Content = string.Format(uzenetFormat, string.Format(AdminisztracioResource.MegszunoMunkaviszonyuAlkalmazottakLeiras, Model.VanTorlendoAlkalmazott)); itemModel.Type = AdminDashboardTipusEnum.Warning; Html.RenderPartial(partialViewName, itemModel); @( Html.KretaGrid ( name: "AlkalmazottTorlesGrid", getUrl: new GridApiUrl("AktivTanevValtasaApi", "GetAlkalmazottTorlesGrid", new Dictionary { }), allowScrolling: true, sort: sort => sort.Add(m => m.AlkalmazottNev).Ascending() ) .SelectBoxColumn(Html, 0, true) /* */ .Columns(columns => { columns.Bound(c => c.AlkalmazottNev); columns.Bound(c => c.OktatasiAzonosito).Width("20%"); columns.Bound(c => c.AlkalmazasKezdete).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%"); columns.Bound(c => c.AlkalmazasVege).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%"); }) ) }
@Html.KretaButton("ButtonTanevvaltas", AdminisztracioResource.AktivTanevValtasa, clickEventName: "AktivTanevValtasaHelper.aktivTanevValtasaConfirmWindow").Enable(!(Model.KiNemSoroltTanulokOsztaly > 0) && !(Model.AlkalmazottakAlapertekekkel.Any()) && !Model.LejartLicence)