init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
146
KretaWeb/Areas/GRModul/Views/BeszerzesiIgeny/Index.cshtml
Normal file
146
KretaWeb/Areas/GRModul/Views/BeszerzesiIgeny/Index.cshtml
Normal file
|
@ -0,0 +1,146 @@
|
|||
@using Kreta.Resources;
|
||||
@using Kreta.Web.Helpers.Grid;
|
||||
@using Kreta.Enums.ManualEnums;
|
||||
@using Kreta.BusinessLogic.Classes;
|
||||
@using Kreta.Web.Areas.GRModul.Models;
|
||||
@model BeszerzesiIgenySearchModel
|
||||
@{ Layout = "~/Views/Shared/_MasterLayout.cshtml"; }
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar("searchForm", "BeszerzesiIgenyGrid"))
|
||||
{
|
||||
@Html.KretaDatePickerFor(x => x.SrcIgenylesKezdete).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.SrcAnyag).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.SrcStatusz, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperEnumApi", action = "GetBeszerzesiIgenyStatuszList" }), "Text", "Value").RenderSearchPanelSideBar()
|
||||
}
|
||||
}
|
||||
|
||||
@{
|
||||
var grid = Html.KretaGrid<BeszerzesiIgenyGridModel>
|
||||
(
|
||||
name: "BeszerzesiIgenyGrid",
|
||||
getUrl: new GridApiUrl("BeszerzesiIgenyApi", "GetBeszerzesiIgenyGrid", new Dictionary<string, string> { }),
|
||||
dataParameterFunction: "searchForm",
|
||||
allowScrolling: true
|
||||
)
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn));
|
||||
|
||||
grid.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.IgenylesKezdete).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
columns.Bound(c => c.Anyag);
|
||||
columns.Bound(c => c.StatuszId_DNAME);
|
||||
});
|
||||
|
||||
var rowFunctions = new List<RowFunction>
|
||||
{
|
||||
new RowFunction {Name = CommonResource.Adatok, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyModifyPopUp", IconEnum = GridRowFunctionIconEnum.Modositas},
|
||||
new RowFunction {Name = CommonResource.Adatok, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyDetailWindow", IconEnum = GridRowFunctionIconEnum.Adatok}
|
||||
};
|
||||
|
||||
var functionCommands = new List<FunctionCommand> { new FunctionCommand { Name = GRModulResource.UjBeszerzesiIgenyRogzites, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyNewWindow" } };
|
||||
|
||||
grid.RowFunction(Html, rowFunctions);
|
||||
grid.FunctionCommand(Html, functionCommands);
|
||||
|
||||
if (Model.IsVezeto)
|
||||
{
|
||||
grid.Columns(column =>
|
||||
{
|
||||
column.Template(@<text></text>).Width(140).ClientTemplate(
|
||||
@"
|
||||
#if(StatuszId == 105228) { #
|
||||
<button title='" + HRModulResource.Engedelyezem + @"' id='jovahagyas_#: ID #' type='button' data-role='button' class='btn btn-success' role='button' aria-disabled='false' tabindex='0' onclick='BeszerzesiIgenyHelper.saveBeszerzesiIgenyElfogadas(#: ID #)'><i class='fa fa-check'></i></button>
|
||||
<button title='" + HRModulResource.Hianypotlas + @"' id='hianypotlas_#: ID #' type='button' data-role='button' class='btn btn-warning' role='button' aria-disabled='false' tabindex='0' onclick='BeszerzesiIgenyHelper.openBeszerzesiIgenyHPWindow(#: ID #)'><i class='fa fa-file'></i></button>
|
||||
<button title='" + HRModulResource.Elutasitom + @"' id='elutasitas_#: ID #' type='button' data-role='button' class='btn btn-danger' role='button' aria-disabled='false' tabindex='0' onclick='BeszerzesiIgenyHelper.saveBeszerzesiIgenyElutasitas(#: ID #)'><i class='fa fa-times'></i></button>
|
||||
#}#
|
||||
");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
<div>@( grid )</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var BeszerzesiIgenyHelper = (function () {
|
||||
var beszerzesiIgenyHelper = function () { };
|
||||
|
||||
var searchFormName = "searchForm";
|
||||
var gridName = "BeszerzesiIgenyGrid";
|
||||
var formName = "BeszerzesiIgenyForm";
|
||||
var url = {
|
||||
OpenBeszerzesiIgenyDetailWindow: "@Url.Action("OpenBeszerzesiIgenyDetailPopUp", Constants.Controllers.BeszerzesiIgeny, new { area = Constants.Areas.GRModul })",
|
||||
OpenBeszerzesiIgenyModifyPopUp: "@Url.Action("OpenBeszerzesiIgenyModifyPopUp", Constants.Controllers.BeszerzesiIgeny, new { area = Constants.Areas.GRModul })",
|
||||
OpenBeszerzesiIgenyNewWindow: "@Url.Action("OpenBeszerzesiIgenyNewPopUp", Constants.Controllers.BeszerzesiIgeny, new { area = Constants.Areas.GRModul })",
|
||||
SaveBeszerzesiIgeny: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.BeszerzesiIgenyApi, action = "SaveBeszerzesiIgeny" })",
|
||||
SaveBeszerzesiIgenyElfogadas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.BeszerzesiIgenyApi, action = "SaveBeszerzesiIgenyElfogadas" })",
|
||||
SaveBeszerzesiIgenyElutasitas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.BeszerzesiIgenyApi, action = "SaveBeszerzesiIgenyElutasitas" })",
|
||||
SaveBeszerzesiIgenyHPWindow: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.BeszerzesiIgenyApi, action = "SaveBeszerzesiIgenyHianyPotlas" })",
|
||||
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.openBeszerzesiIgenyDetailWindow = function (data) {
|
||||
AjaxHelper.DoPost(url.OpenBeszerzesiIgenyDetailWindow, { Id: data.ID }, popUpBeszerzesiIgenyWindow);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.openBeszerzesiIgenyModifyPopUp = function (data) {
|
||||
AjaxHelper.DoPost(url.OpenBeszerzesiIgenyModifyPopUp, { Id: data.ID }, popUpBeszerzesiIgenyWindow);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.openBeszerzesiIgenyNewWindow = function () {
|
||||
AjaxHelper.DoPost(url.OpenBeszerzesiIgenyNewWindow, null, popUpBeszerzesiIgenyWindow);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.CancelBeszerzesiIgenyWindow = function () {
|
||||
KretaWindowHelper.destroyWindow("BeszerzesiIgenyWindow");
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.GetFilesToPost = function () {
|
||||
//TODO
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.saveBeszerzesiIgenyElfogadas = function (id) {
|
||||
//TODO
|
||||
AjaxHelper.DoPostElement(url.SaveBeszerzesiIgenyElfogadas, formName, successResponseOk);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.openBeszerzesiIgenyHPWindow = function (id) {
|
||||
//TODO
|
||||
AjaxHelper.DoPostElement(url.SaveBeszerzesiIgenyElutasitas, formName, successResponseOk);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.saveBeszerzesiIgenyElutasitas = function (id) {
|
||||
//TODO
|
||||
AjaxHelper.DoPostElement(url.SaveBeszerzesiIgenyHPWindow, formName, successResponseOk);
|
||||
}
|
||||
|
||||
function newBeszerzesiIgenySave() {
|
||||
AjaxHelper.DoPostElement(url.SaveBeszerzesiIgeny, formName, successResponseOk);
|
||||
}
|
||||
|
||||
function popUpBeszerzesiIgenyWindow(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@GRModulResource.BeszerzesiIgenyAdatok";
|
||||
config.width = "80%";
|
||||
config.height = "80%";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow("BeszerzesiIgenyWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function successResponseOk() {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow);
|
||||
KretaGridHelper.refreshGridSearchPanel(gridName, searchFormName);
|
||||
}
|
||||
|
||||
beszerzesiIgenyHelper.saveBeszerzesiIgeny = function () {
|
||||
newBeszerzesiIgenySave();
|
||||
}
|
||||
|
||||
return beszerzesiIgenyHelper;
|
||||
})();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue