95 lines
4.3 KiB
Text
95 lines
4.3 KiB
Text
@using Kreta.BusinessLogic.Classes
|
|
@using Kreta.Web.Areas.Feljegyzes.Controllers
|
|
@using Kreta.Web.Areas.Feljegyzes.Models
|
|
@using Kreta.Web.Helpers.Grid
|
|
@using Kreta.Resources
|
|
|
|
@section AddCss {
|
|
@Styles.Render(Constants.General.FeljegyzesekCSS)
|
|
}
|
|
|
|
@{
|
|
string gridName = KozossegiSzolgalatokController.GridName;
|
|
}
|
|
|
|
@model AdminKozossegiSzolgalatokSearchModel
|
|
|
|
@section AddSearchPanel {
|
|
@using (Html.SearchPanelSideBar("searchForm", gridName))
|
|
{
|
|
@Html.KretaRangeDatePickerSideBar(x => x.IntervallumKezdete, x => x.IntervallumVege)
|
|
@Html.KretaTextBoxFor(x => x.TanuloNev).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.OsztalyNev, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetOsztalyListForCascadeCB", isOsztalyNevValue = true })).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaTextBoxFor(x => x.TeljesitesiHelye).RenderSearchPanelSideBar()
|
|
@Html.KretaNumericFor(x => x.Oraszam).Min(1).Max(50).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.KozossegiSzolgalatTipusa, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetKozossegiSzolgalatTipusList" })).RenderSearchPanelSideBar()
|
|
}
|
|
}
|
|
|
|
@{
|
|
List<FunctionCommand> nestedExportFunctions = new List<FunctionCommand>
|
|
{
|
|
new FunctionCommand {Name = FeljegyzesekResource.TanulokKozossegiSzolgalataiExport, ClientAction = "KozossegiSzolgalatHelper.exportKzossegiSzolgalat"},
|
|
};
|
|
List<FunctionCommand> functions = new List<FunctionCommand>
|
|
{
|
|
new FunctionCommand { Name = FeljegyzesekResource.Export.ToUpper(), NestedCommands = nestedExportFunctions }
|
|
};
|
|
}
|
|
|
|
<div>
|
|
@(
|
|
Html.KretaGrid<KozossegiSzolgalatokReszletekGridModel>(
|
|
gridName,
|
|
new GridApiUrl("AdminTanuloKozossegiSzolgalataiApi", "GetTanuloKozossegiSzolgalataiGrid"),
|
|
useToolBar: true,
|
|
dataParameterFunction: "searchForm",
|
|
dataBoundAdditionalFunction: "KozossegiSzolgalatHelper.setAthuzas(this)",
|
|
sort: sort => sort.Add(s => s.IntervallumKezdete).Descending(),
|
|
allowSorting: true,
|
|
allowScrolling: true,
|
|
allowPaging: true
|
|
)
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(c => c.ID).Hidden();
|
|
columns.Bound(c => c.TanuloId).Hidden();
|
|
columns.Bound(c => c.TanuloNev).Width("10%");
|
|
columns.Bound(c => c.OsztalyNev).Width("8%");
|
|
columns.Bound(c => c.IntervallumKezdete).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
|
columns.Bound(c => c.IntervallumVege).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
|
columns.Bound(c => c.TeljesitesiHelye).Width("15%").SetDisplayPropertyWithToolip("TeljesitesiHelye").Width("10%");
|
|
columns.Bound(c => c.Oraszam).Width("5%");
|
|
columns.Bound(c => c.KozossegiSzolgalatTipusa_DNAME).Width("20%").SetDisplayPropertyWithToolip("KozossegiSzolgalatTipusa_DNAME");
|
|
columns.Bound(c => c.Megjegyzes).Width("30").SetDisplayPropertyWithToolip("Megjegyzes");
|
|
columns.Bound(c => c.RogzitesDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
|
})
|
|
.FunctionCommand(Html, functions)
|
|
)
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var KozossegiSzolgalatHelper = (function () {
|
|
var kozossegiSzolgalatHelper = function () { };
|
|
var searchFormName = "searchForm";
|
|
|
|
var url = {
|
|
ExportKzossegiSzolgalat: "@Url.Action("ExportKozossegiSzolgalat", "AdminTanuloKozossegiSzolgalatai", new {area = "Feljegyzes" })"
|
|
}
|
|
|
|
kozossegiSzolgalatHelper.exportKzossegiSzolgalat = function () {
|
|
window.location = url.ExportKzossegiSzolgalat + "?" + $.param(KretaGridHelper.getSearchParametersWithoutInputNames(searchFormName));
|
|
}
|
|
|
|
kozossegiSzolgalatHelper.setAthuzas = function (sender) {
|
|
var toroltUids = sender.dataSource.data().filter(function (e) { return e.Torolt_BOOL }).map(function (e) { return e.uid });
|
|
$.each(sender.items(), function () {
|
|
if (($.inArray(($(this).attr("data-uid")), toroltUids)) !== -1) $(this).addClass("kretaStrikedGridRow disabledItem");
|
|
})
|
|
}
|
|
|
|
return kozossegiSzolgalatHelper;
|
|
})();
|
|
|
|
</script>
|