init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,166 @@
|
|||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Web.Areas.Adatszolgaltatasok.Models
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Framework
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Security
|
||||
|
||||
@model TantargyFelosztasSearchModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(model => model.StatusTitle, 2, 10, id: "StatusTitle")
|
||||
</div>
|
||||
<div class="row RegNumberRow">
|
||||
@Html.KretaLabelFor(model => model.RegNumber, 2, 10, id: "RegNumber")
|
||||
</div>
|
||||
|
||||
@{
|
||||
List<RowFunction> TTFelosztasRowFunctionList = new List<RowFunction> { };
|
||||
List<FunctionCommand> TTFelosztasFunctionCommandList = new List<FunctionCommand>();
|
||||
bool isKovtanev = ClaimData.SelectedTanevID == ClaimData.KovTanevID ? true : false;
|
||||
|
||||
//if (!Model.VeglegesTTF && !isKovtanev || !Model.VeglegesETTF && isKovtanev)
|
||||
//{
|
||||
TTFelosztasFunctionCommandList.Add(new FunctionCommand { Classes= "TTFelosztasFunctionButton", Name = "Veglegesites", NameResourceId = 4164/*Véglegesítés*/ });
|
||||
//}
|
||||
//else {
|
||||
// TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "VeglegesitesVisszavonasa", NameResourceId = 4167/*Véglegesítés visszavonása*/ , ClientAction = "TTFHelper.VeglegesitesVisszavonasa" });
|
||||
//}
|
||||
|
||||
//TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "simpleTTFExport", NameResourceId = 4002 /*Export(Egyszerű)*/ , ClientAction = "TTFHelper.SimpleExport" });
|
||||
//TTFelosztasFunctionCommandList.Add(new FunctionCommand { Name = "lepedoTTFExport", NameResourceId = 4052/*Export(Kereszttáblás)*/ , ClientAction = "TTFHelper.LepedoExport" });
|
||||
}
|
||||
|
||||
@(
|
||||
Html.KretaGrid<TTFGridModel>
|
||||
(
|
||||
name: "TantargyFelosztasGrid",
|
||||
getUrl: new GridApiUrl("TTFApi", "GetTantargyFelosztasok"),
|
||||
dataBoundAdditionalFunction: "TTFHelper.getStatusz();",
|
||||
allowFilterable: false,
|
||||
allowPaging: true,
|
||||
allowScrolling: true,
|
||||
aggregates: aggregates => aggregates.Add(x => x.Oraszam).Sum()
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(x => x.TanarElotagNelkul).SetDisplayProperty("Tanar");
|
||||
columns.Bound(x => x.Tanev).Width("8%");
|
||||
columns.Bound(x => x.OsztalyCsoport);
|
||||
columns.Bound(x => x.Tantargy);
|
||||
columns.Bound(x => x.Oraszam).Width("8%").ClientFooterTemplate(StringResourcesUtil.GetString(3026) + ": #= sum #");
|
||||
})
|
||||
.FunctionCommand(Html, TTFelosztasFunctionCommandList).RowFunction(Html, TTFelosztasRowFunctionList)
|
||||
)
|
||||
|
||||
<script>
|
||||
var TTFHelper = (function () {
|
||||
$('.TTFelosztasFunctionButton').click(function () {
|
||||
if ('@ApplicationData.OnTTFPrompt' !='False') {
|
||||
ttfHelper.BiztonsagiKerdes();
|
||||
}
|
||||
else {
|
||||
ttfHelper.Veglegesites();
|
||||
}
|
||||
//ttfHelper.getStatusz();
|
||||
});
|
||||
var url = {
|
||||
SimpleExport: "@Url.Action("ExportEgyszeruTantargyfelosztas", "ElozetesTantargyfelosztas", new { area = "Adatszolgaltatasok" })",
|
||||
|
||||
Veglegesites: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "TTFApi", action = "Veglegesites" })",
|
||||
GetStatusUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "TTFApi", action = "GetStatus" })",
|
||||
StoreSelectedTanar: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "TTFApi", action = "StoreSelectedTanar" })"
|
||||
}
|
||||
|
||||
var ttfHelper = function () { };
|
||||
|
||||
ttfHelper.CloseWindow = function () {
|
||||
closeAllWindow();
|
||||
}
|
||||
|
||||
ttfHelper.SimpleExport = function () {
|
||||
AjaxHelper.ShowIndicator();
|
||||
setTimeout(AjaxHelper.DoPost("@Url.Action("ExportEgyszeruTantargyfelosztas", "TantargyFelosztas", new { area = "Tantargy" })", null, savefile), 1000);
|
||||
}
|
||||
|
||||
ttfHelper.LepedoExport = function () {
|
||||
AjaxHelper.ShowIndicator();
|
||||
setTimeout(AjaxHelper.DoPost("@Url.Action("ExportLepedoTantargyfelosztas", "TantargyFelosztas", new { area = "Tantargy" })", null, savefile), 1000);
|
||||
}
|
||||
|
||||
function savefile(e) {
|
||||
var dataURI = "data:text/plain;base64," + e;
|
||||
|
||||
kendo.saveAs({
|
||||
dataURI: dataURI,
|
||||
fileName: "TTF" + new Date().toLocaleDateString().replace(".", "_") + ".xlsx",
|
||||
});
|
||||
setTimeout(AjaxHelper.HideIndicator(), 2000);
|
||||
}
|
||||
|
||||
ttfHelper.BiztonsagiKerdes = function () {
|
||||
KretaWindowHelper.confirmWindow("@AdatszolgaltatasokResource.BiztonsagiKerdes", "@AdatszolgaltatasokResource.TTFBiztonsagiKerdes", ttfHelper.Veglegesites, undefined, undefined, "@CommonResource.Folytatas", "@CommonResource.Vissza");
|
||||
}
|
||||
|
||||
ttfHelper.getStatusz = function () {
|
||||
getStatus();
|
||||
}
|
||||
|
||||
ttfHelper.Veglegesites = function () {
|
||||
AjaxHelper.DoPost(url.Veglegesites, null, function (data) { sikeresVeglegesites(data) });
|
||||
};
|
||||
|
||||
function simpleExport() {
|
||||
AjaxHelper.DoPost(url.SimpleExport, null);
|
||||
}
|
||||
|
||||
function closeAllWindow() {
|
||||
KretaWindowHelper.destroyAllWindow();
|
||||
};
|
||||
|
||||
function refreshGrid() {
|
||||
KretaGridHelper.refreshGrid("TantargyFelosztasGrid");
|
||||
};
|
||||
|
||||
function sikeresVeglegesites(data) {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(AdatszolgaltatasokResource.SikeresElfogadasraKuldes)", false, function () { location.reload(true) }, "@CommonResource.Ok");
|
||||
setStatus(data);
|
||||
};
|
||||
|
||||
function getStatus() {
|
||||
AjaxHelper.DoGet(url.GetStatusUrl, {}, function (data) { setStatus(data) });
|
||||
};
|
||||
|
||||
function setStatus(data) {
|
||||
$('#StatusTitle').html(data.StatusTitle);
|
||||
if (CommonUtils.isNullOrEmpty(data.RegNumber) == false) {
|
||||
$('.RegNumberRow').show();
|
||||
$('#RegNumber').html(data.RegNumber);
|
||||
}
|
||||
else {
|
||||
$('.RegNumberRow').hide();
|
||||
}
|
||||
$('.TTFelosztasFunctionButton').prop("disabled", data.Islocked == true);
|
||||
}
|
||||
|
||||
ttfHelper.onTanarChange = function () {
|
||||
AjaxHelper.DoPost(url.StoreSelectedTanar, $('#TanarID').val());
|
||||
}
|
||||
|
||||
return ttfHelper;
|
||||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
|
||||
.k-grid-content {
|
||||
max-height: 58vh !important
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue