@using Kreta.BusinessLogic.Classes
@using Kreta.Web.Areas.Adatszolgaltatasok.Models
@using Kreta.Web.Helpers.Grid
@using Kreta.Framework
@using Kreta.Resources
@using Kreta.Web.Helpers
@using Kreta.Web.Security
@model TantargyFelosztasSearchModel
@{
Layout = "~/Views/Shared/_MasterLayout.cshtml";
}
@Html.KretaLabelFor(model => model.StatusTitle, 2, 10, id: "StatusTitle")
@Html.KretaLabelFor(model => model.RegNumber, 2, 10, id: "RegNumber")
@{
List TTFelosztasRowFunctionList = new List { };
List TTFelosztasFunctionCommandList = new List();
bool isKovtanev = ClaimData.SelectedTanevID == ClaimData.KovTanevID ? true : false;
//if (!Model.VeglegesTTF && !isKovtanev || !Model.VeglegesETTF && isKovtanev)
//{
TTFelosztasFunctionCommandList.Add(new FunctionCommand { Classes= "TTFelosztasFunctionButton", Name = "Veglegesites", NameResourceId = 4164/*Véglegesítés*/ });
//}
//else {
// TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "VeglegesitesVisszavonasa", NameResourceId = 4167/*Véglegesítés visszavonása*/ , ClientAction = "TTFHelper.VeglegesitesVisszavonasa" });
//}
//TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "simpleTTFExport", NameResourceId = 4002 /*Export(Egyszerű)*/ , ClientAction = "TTFHelper.SimpleExport" });
//TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "lepedoTTFExport", NameResourceId = 4052/*Export(Kereszttáblás)*/ , ClientAction = "TTFHelper.LepedoExport" });
}
@(
Html.KretaGrid
(
name: "TantargyFelosztasGrid",
getUrl: new GridApiUrl("TTFApi", "GetTantargyFelosztasok"),
dataBoundAdditionalFunction: "TTFHelper.getStatusz();",
allowFilterable: false,
allowPaging: true,
allowScrolling: true,
aggregates: aggregates => aggregates.Add(x => x.Oraszam).Sum()
)
.Columns(columns =>
{
columns.Bound(x => x.TanarElotagNelkul).SetDisplayProperty("Tanar");
columns.Bound(x => x.Tanev).Width("8%");
columns.Bound(x => x.OsztalyCsoport);
columns.Bound(x => x.Tantargy);
columns.Bound(x => x.Oraszam).Width("8%").ClientFooterTemplate(StringResourcesUtil.GetString(3026) + ": #= sum #");
})
.FunctionCommand(Html, TTFelosztasFunctionCommandList).RowFunction(Html, TTFelosztasRowFunctionList)
)