init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
154
KretaWeb/Areas/Adatszolgaltatasok/Views/Merohely/Index.cshtml
Normal file
154
KretaWeb/Areas/Adatszolgaltatasok/Views/Merohely/Index.cshtml
Normal file
|
@ -0,0 +1,154 @@
|
|||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.Adatszolgaltatasok.Models
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Resources
|
||||
@model MerohelySearchModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar("merohelySearchForm", "MerohelyGrid"))
|
||||
{
|
||||
@Html.KretaTextBoxFor(model => model.MerohelyNevSearch).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.MerohelyTipusIdSearch, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "MerohelyApi", action = "GetMerohelyTipusList" }), "Text", "Value").RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.MerohelyMukodesiHelyIdSearch, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetMukodesiHelyList" }), "Text", "Value").RenderSearchPanelSideBar()
|
||||
}
|
||||
}
|
||||
|
||||
<div>
|
||||
@(
|
||||
Html.KretaGrid<MerohelyGridModel>
|
||||
(
|
||||
name: "MerohelyGrid",
|
||||
getUrl: new GridApiUrl("MerohelyApi", "GetMerohelyGrid", new Dictionary<string, string> { }),
|
||||
dataParameterFunction: "merohelySearchForm",
|
||||
sort: sort => sort.Add(m => m.Nev).Ascending(),
|
||||
|
||||
clientTemplateUrl: Url.Action("GetMerohelyDetailGrid", "Merohely", new { area = "Adatszolgaltatasok" }),
|
||||
clientTemplate: "detailGrid-template",
|
||||
clientTemplateWholeDataRow: true,
|
||||
allowSorting: false,
|
||||
allowScrolling: false
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.MerooraAzonosito);
|
||||
columns.Bound(c => c.Nev);
|
||||
columns.Bound(c => c.MerohelyId).Hidden();
|
||||
columns.Bound(c => c.MerohelyTipus_DNAME);
|
||||
columns.Bound(c => c.MukodesihelyNev);
|
||||
})
|
||||
)
|
||||
</div>
|
||||
|
||||
@Html.KretaGridTemplate("detailGrid-template")
|
||||
|
||||
<script type="text/javascript">
|
||||
var MerohelyHelper = (function () {
|
||||
var merohelyHelper = function () { };
|
||||
|
||||
var formData = null;
|
||||
var gridName = "MerohelyGrid";
|
||||
|
||||
var newModifyMeroallasPopupName = "meroallasWindow";
|
||||
var meroallasImagePopupName = "meroallasImageWindow";
|
||||
var newModifyMeroallasFormName = "meroallasNewModifyForm";
|
||||
|
||||
var url = {
|
||||
OpenMeroallasPopup: "@Url.Action("OpenMeroallasPopup", "Merohely", new {area = "Adatszolgaltatasok" })",
|
||||
SaveMeroallas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "MerohelyApi", action = "SaveMeroallas"})",
|
||||
DeleteMeroallas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "MerohelyApi", action = "DeleteMeroallas" })",
|
||||
OpenMeroallasImagePopup: "@Url.Action("OpenMeroallasImagePopup", "Merohely", new {area = "Adatszolgaltatasok" })",
|
||||
};
|
||||
|
||||
//Mérőállás
|
||||
merohelyHelper.OpenMeroallasUjPopup = function (data)
|
||||
{
|
||||
var postData = {
|
||||
"id": null,
|
||||
"merohelyId": data
|
||||
};
|
||||
AjaxHelper.DoPost(url.OpenMeroallasPopup, postData, popMeroallaslWindow);
|
||||
};
|
||||
|
||||
merohelyHelper.OpenMeroallasModositasPopup = function (data) {
|
||||
var postData = {
|
||||
"id": data.MeroallasId,
|
||||
"merohelyId": data.MerohelyId
|
||||
};
|
||||
AjaxHelper.DoPost(url.OpenMeroallasPopup, postData, popMeroallaslWindow);
|
||||
};
|
||||
|
||||
merohelyHelper.OpenMeroallasImagePopup = function (data) {
|
||||
var postData = {
|
||||
"id": data.MeroallasId
|
||||
};
|
||||
AjaxHelper.DoPost(url.OpenMeroallasImagePopup, postData, popMeroallaslImage_Window);
|
||||
};
|
||||
|
||||
function popMeroallaslWindow(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "Mérőállás";
|
||||
config.maxWidth = "960px";
|
||||
config.maxHeight = "600px";
|
||||
config.height = "600px";
|
||||
config.minHeight = "400px";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow(newModifyMeroallasPopupName, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
};
|
||||
|
||||
function popMeroallaslImage_Window(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "Mérőállás kép";
|
||||
config.maxWidth = "960px";
|
||||
config.maxHeight = "600px";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow(meroallasImagePopupName, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
};
|
||||
|
||||
merohelyHelper.DeleteMeroallasConfirmWindow = function (rowData) {
|
||||
KretaWindowHelper.confirmWindow("Kérdés" /*Kérdés*/, "Biztosan törli?" /*Biztosan törli?*/, deleteMeroallas, rowData.MeroallasId);
|
||||
}
|
||||
|
||||
function deleteMeroallas(data) {
|
||||
AjaxHelper.DoPost(url.DeleteMeroallas, data, deleteMeroallasResponseOk);
|
||||
}
|
||||
|
||||
function deleteMeroallasResponseOk() {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow);
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
}
|
||||
|
||||
merohelyHelper.MeroallasPopupSave = function () {
|
||||
KretaFileUpload.SendAttachmentsAsBase64EncodedString("FotoInputContainer", SaveMeroallas);
|
||||
}
|
||||
|
||||
function SaveMeroallas(lista) {
|
||||
var formData = $("#" + newModifyMeroallasFormName).toObject();
|
||||
formData.MeroallasKep = lista[0];
|
||||
AjaxHelper.DoValidationPost(url.SaveMeroallas, newModifyMeroallasFormName, formData, saveMeroallasResponseOk);
|
||||
}
|
||||
|
||||
function saveMeroallasResponseOk() {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow);
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
}
|
||||
|
||||
merohelyHelper.MeroallasPopupCancel = function () {
|
||||
KretaWindowHelper.destroyWindow(newModifyMeroallasPopupName);
|
||||
}
|
||||
|
||||
merohelyHelper.MeroallasImage_PopupCancel = function () {
|
||||
KretaWindowHelper.destroyWindow(meroallasImagePopupName);
|
||||
}
|
||||
|
||||
return merohelyHelper;
|
||||
})();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue