137 lines
No EOL
7.3 KiB
Text
137 lines
No EOL
7.3 KiB
Text
@using Kreta.Resources
|
|
@using Kreta.Web.Areas.Tanulo.Models
|
|
@using Kreta.Web.Helpers.Grid;
|
|
|
|
@model OsztalyTanuloiGondviselokSearchModel
|
|
|
|
@section AddSearchPanel {
|
|
@using (Html.SearchPanelSideBar("searchForm", "OsztalyTanuloiGondviselokGrid"))
|
|
{
|
|
@Html.KretaComboBoxFor(x => x.EllatottKoznevelesiFeladatTipusIdSearch, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetFeladatKategoriaSzuro" }), "Text", "Value").AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaCascadeComboBoxFor(x => x.OsztalyIdSearch, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTanitottOsztalyokList" }), "FeladatKategoriaId").AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaTextBoxFor(model => model.TanuloNevSearch).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.IsTelefonszam, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.IsEmail, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.IsTorvenyesKepviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaComboBoxFor(x => x.IsBovitettJogosultsagu, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).AutoBind(true).RenderSearchPanelSideBar()
|
|
}
|
|
}
|
|
|
|
<div>
|
|
@(
|
|
Html.KretaGrid<OsztalyokTanuloiGondviselokGridModel>
|
|
(
|
|
name: "OsztalyTanuloiGondviselokGrid",
|
|
getUrl: new GridApiUrl("OsztalyTanuloiGondviselokApi", "GetOsztalyTanuloiGondviselokGrid", new Dictionary<string, string> { }),
|
|
allowScrolling: true,
|
|
dataParameterFunction: "searchForm"
|
|
)
|
|
.SelectBoxColumn(Html, 0)
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(c => c.TanuloNeve);
|
|
columns.Bound(c => c.TanuloOsztalya);
|
|
columns.Bound(c => c.GondviseloNeve);
|
|
columns.Bound(c => c.GondviseloBejelentkezesiNev);
|
|
columns.Bound(c => c.RokonsagiFoka);
|
|
columns.Bound(c => c.Telefonszam);
|
|
columns.Bound(c => c.Email);
|
|
columns.Bound(c => c.TorvenyesKepviselo);
|
|
columns.Bound(c => c.BovitettJogosultsag);
|
|
})
|
|
.FunctionCommand(Html, new List<FunctionCommand> {
|
|
new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "OsztalyTanuloiGondviselokHelper.ExportOsztalyTanulokGondviseloi" },
|
|
new FunctionCommand { Name = TanuloResource.BovitettJogosultsag, ClientAction="OsztalyTanuloiGondviselokHelper.BovitettJogosultsagConfirm" }
|
|
})
|
|
.RowFunction(Html, new List<RowFunction>
|
|
{
|
|
new RowFunction { Name = CommonResource.Adatok, ClientAction = "OsztalyTanuloiGondviselokHelper.openGondviseloInfoWindow", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Adatok },
|
|
})
|
|
.Sortable(sortable => sortable
|
|
.AllowUnsort(true)
|
|
.SortMode(GridSortMode.MultipleColumn))
|
|
)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var OsztalyTanuloiGondviselokHelper = (function () {
|
|
var osztalyTanuloiGondviselokHelper = function () { };
|
|
|
|
var gridName = "OsztalyTanuloiGondviselokGrid";
|
|
|
|
var url = {
|
|
BovitettJogosultsagGeneralas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "FelhasznalokApi", action= "BovitettJogosultsagGeneralas" })",
|
|
OpenGondviseloInfoPopUp: "@Url.Action("OpenGondviseloInfoPopUp", "OsztalyTanuloiGondviselok", new { area = Constants.Areas.Tanulo })",
|
|
ExportOsztalyTanulokGondviseloi: "@Url.Action("ExportOsztalyTanulokGondviseloi", "OsztalyTanuloiGondviselok", new { area = Constants.Areas.Tanulo })",
|
|
}
|
|
|
|
osztalyTanuloiGondviselokHelper.BovitettJogosultsagConfirm = function () {
|
|
var selectedRows = KretaGridHelper.getSelectedRowsByGridName(gridName);
|
|
if (selectedRows.length == 0) {
|
|
KretaWindowHelper.warningWindow("@(CommonResource.Kivalasztas)", "@(FelhasznalokResource.LegyenLegalabbEgyFelhasznalo)");
|
|
}
|
|
else {
|
|
var gondviseloParameters = [];
|
|
var gondviseloBovitettJogosultsagParameters = [];
|
|
$.each(selectedRows, function (i, v) {
|
|
if (v.BovitettJogosultsag == "Igen") {
|
|
gondviseloBovitettJogosultsagParameters.push(v.ID);
|
|
} else {
|
|
gondviseloParameters.push(v.ID);
|
|
}
|
|
});
|
|
|
|
errorMsg = "";
|
|
|
|
if (gondviseloBovitettJogosultsagParameters.length != 0 ) {
|
|
errorMsg += '@AdminisztracioResource.KijeloltFelhasznalokKozott';
|
|
|
|
if (gondviseloBovitettJogosultsagParameters.length != 0) {
|
|
errorMsg += gondviseloBovitettJogosultsagParameters.length + "@AdminisztracioResource.GondviseloBovitettJogosultsaggal";
|
|
}
|
|
|
|
errorMsg += "@AdminisztracioResource.Szerepel";
|
|
}
|
|
|
|
if (errorMsg.length != 0) {
|
|
KretaWindowHelper.warningWindow("@(CommonResource.Hiba)", errorMsg);
|
|
}
|
|
else {
|
|
AjaxHelper.DoPost(url.BovitettJogosultsagGeneralas, gondviseloParameters, OsztalyTanuloiGondviselokHelper.bovitettJogosultsagGeneralasSuccess);
|
|
}
|
|
}
|
|
}
|
|
|
|
osztalyTanuloiGondviselokHelper.bovitettJogosultsagGeneralasSuccess = function () {
|
|
KretaWindowHelper.feedbackWindow(
|
|
"@CommonResource.Ertesites",
|
|
"@FelhasznalokResource.ModositasSikeresenVegbement");
|
|
KretaGridHelper.refreshGrid(gridName);
|
|
}
|
|
|
|
osztalyTanuloiGondviselokHelper.openGondviseloInfoWindow = function (rowData) {
|
|
var postData = { GondviseloId: rowData.ID };
|
|
AjaxHelper.DoPost(url.OpenGondviseloInfoPopUp, postData, popUpInfoWindow);
|
|
}
|
|
|
|
osztalyTanuloiGondviselokHelper.gondviseloInfoCancel = function () {
|
|
KretaWindowHelper.destroyWindow("gondviseloInfoWindow");
|
|
}
|
|
|
|
function popUpInfoWindow(data) {
|
|
var config = KretaWindowHelper.getWindowConfigContainer();
|
|
config.title = "@TanuloResource.GondviseloAdatai";
|
|
config.maxWidth = "650px";
|
|
config.height = "620px";
|
|
config.content = data;
|
|
|
|
var modal = KretaWindowHelper.createWindow("gondviseloInfoWindow", config);
|
|
KretaWindowHelper.openWindow(modal, true);
|
|
}
|
|
|
|
osztalyTanuloiGondviselokHelper.ExportOsztalyTanulokGondviseloi = function () {
|
|
window.location = url.ExportOsztalyTanulokGondviseloi + "?" + $.param(KretaGridHelper.getSearchParametersWithoutInputNames("searchForm"));
|
|
}
|
|
return osztalyTanuloiGondviselokHelper;
|
|
})();
|
|
</script> |