init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
112
KretaWeb/Areas/Tanulo/Views/CsoportTanuloi/Index.cshtml
Normal file
112
KretaWeb/Areas/Tanulo/Views/CsoportTanuloi/Index.cshtml
Normal file
|
@ -0,0 +1,112 @@
|
|||
@using Kreta.Web.Areas.Tanulo.Models;
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@model CsoportTanuloiSearchModel
|
||||
|
||||
@{
|
||||
const string TanuloController = Constants.Controllers.Tanulo;
|
||||
}
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar("searchForm", "CsoportTanuloiGrid"))
|
||||
{
|
||||
@Html.KretaComboBoxFor(x => x.OsztalyCsoport, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetCsoportVezList" }), "Text", "Value").AutoBind(true).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(model => model.Nev).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(model => model.AnyjaSzuletesiNev).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(model => model.SzuletesiHely).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(m => m.SzuletesiIdoTol, m => m.SzuletesiIdoIg)
|
||||
@Html.KretaMaskedTextBoxFor(model => model.OktatasiAzonosito, "00000000000").RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.Tankotelezett, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.Tanterv, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTantervList" })).RenderSearchPanelSideBar()
|
||||
}
|
||||
}
|
||||
|
||||
@section AddCss {
|
||||
@Styles.Render(Constants.General.TanuloErtekelesCSS)
|
||||
}
|
||||
|
||||
@{
|
||||
var grid = Html.KretaGrid<TanuloGridModel>
|
||||
(
|
||||
name: "CsoportTanuloiGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.CsoportTanuloiApi, "GetCsoportTanuloiGrid"),
|
||||
dataParameterFunction: "searchForm",
|
||||
allowScrolling: true,
|
||||
sort: sort =>
|
||||
{
|
||||
sort.Add(c => c.TanuloNeveElotagNelkul).Ascending();
|
||||
}
|
||||
);
|
||||
|
||||
var rowFunctions = new List<RowFunction>();
|
||||
if (Model.showDetailView)
|
||||
{
|
||||
rowFunctions.Add(new RowFunction { Name = TanuloResource.Adatok, ClientAction = "TanuloHelper.openDetailTanuloWindow", IconEnum = GridRowFunctionIconEnum.Adatok });
|
||||
rowFunctions.Add(new RowFunction { Name = TanuloResource.Adatok, ClientAction = "TanuloHelper.openDetailErtekelesTanuloWindow", IconEnum = GridRowFunctionIconEnum.Statisztika });
|
||||
|
||||
grid.LinkButtonColumn(string.Empty, c => c.TanuloNeveElotagNelkul, "TanuloHelper.openDetailTanuloWindow", GridButtonsEnum.Kivalasztas, customField: "TanuloNeve");
|
||||
}
|
||||
|
||||
grid.Columns(column =>
|
||||
{
|
||||
if (!Model.showDetailView) { column.Bound(c => c.TanuloNeveElotagNelkul).SetDisplayProperty("TanuloNeve"); }
|
||||
column.Bound(c => c.AnyjaNeve);
|
||||
column.Bound(c => c.SzuletesiHely);
|
||||
column.Bound(c => c.SzuletesiIdo).Width("10%").Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
column.Bound(c => c.OktatasiAzonosito);
|
||||
column.Bound(c => c.IsTankotelezettText);
|
||||
column.Bound(c => c.Tanterv);
|
||||
})
|
||||
.RowFunction(Html, rowFunctions)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn));
|
||||
}
|
||||
|
||||
<div>
|
||||
@(grid)
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var TanuloHelper = (function () {
|
||||
var tanuloHelper = function () { };
|
||||
|
||||
var url = {
|
||||
OpenDetailTanuloPopUp: "@Url.Action("OpenDetailTanuloPopUp", TanuloController, new { area = Constants.Areas.Tanulo })"
|
||||
}
|
||||
|
||||
tanuloHelper.openDetailTanuloWindow = function (data) {
|
||||
var postData = { TanuloID: data.ID, OsztalyCsoportId: data.OsztalyCsoportId, ertekelesTabAktiv: false, tanugyDisabled: true };
|
||||
AjaxHelper.DoPost(url.OpenDetailTanuloPopUp, postData, popUpDetailWindow);
|
||||
}
|
||||
|
||||
tanuloHelper.openDetailErtekelesTanuloWindow = function (data) {
|
||||
var postData = { TanuloID: data.ID, OsztalyCsoportId: data.OsztalyCsoportId, ertekelesTabAktiv: true, tanugyDisabled: true };
|
||||
AjaxHelper.DoPost(url.OpenDetailTanuloPopUp, postData, popUpDetailWindow);
|
||||
}
|
||||
|
||||
tanuloHelper.detailTanuloCancel = function () {
|
||||
KretaWindowHelper.destroyWindow("detailTanuloWindow");
|
||||
}
|
||||
|
||||
function popUpDetailWindow(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@(TanuloResource.TanuloiAdatok)";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow("detailTanuloWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
|
||||
setTimeout(function () {
|
||||
if ($("#detailTanuloWindow_wnd_title").text().indexOf($("#TanuloModalHeader").val()) === -1) {
|
||||
var tanuloDetailWindowHeader = $("#detailTanuloWindow_wnd_title").text() + " " + $("#TanuloModalHeader").val();
|
||||
$("#detailTanuloWindow_wnd_title").text(tanuloDetailWindowHeader);
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
|
||||
return tanuloHelper;
|
||||
})();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue