init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,99 @@
|
|||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
|
||||
@model TanarokFeltolteseModel
|
||||
|
||||
@{
|
||||
var formName = "TanarokFeltolteseForm";
|
||||
var gridName = "TanarImportGrid";
|
||||
}
|
||||
|
||||
@using (Html.KretaForm(formName))
|
||||
{
|
||||
@Html.KretaValidationSummary()
|
||||
|
||||
<div class="container-fluid">
|
||||
@if (Model.Errors.Count > 0)
|
||||
{
|
||||
<div class="row">
|
||||
@Html.Label("Hibák", new Dictionary<string, object> { { "class", "windowInputLabel labelError" } })
|
||||
<br />
|
||||
@Html.KretaTextArea("tanarhibak", Model.Errors, (Model.Errors.Count < 15) ? Model.Errors.Count + 1 : 15, new Dictionary<string, object>() { { "style", "color: red;" }, { "readonly", "readonly" } })
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@(
|
||||
Html.KretaGrid<KIRTanarImportGridModel>(
|
||||
gridName,
|
||||
new GridApiUrl("TanarImport", "GetPreLoadedTeachers", Constants.RouteKey.Default),
|
||||
dataBoundAdditionalFunction: "KIRTanarFeltoltesHelper.dataBound();",
|
||||
allowFilterable: false,
|
||||
allowSorting: false,
|
||||
allowPaging: false,
|
||||
showSorszam: false
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.ID);
|
||||
columns.Bound(c => c.OktatasiAzonosito).Sortable(true);
|
||||
columns.Bound(c => c.OktatoNeve);
|
||||
columns.Bound(c => c.AnyjaNeve);
|
||||
columns.Bound(c => c.SzuletesiHely).Sortable(true);
|
||||
columns.Bound(c => c.SzuletesiIdo).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDateAndTime]);
|
||||
|
||||
})
|
||||
.AutoBind(true)
|
||||
)
|
||||
}
|
||||
|
||||
<script>
|
||||
var KIRTanarFeltoltesHelper = (function () {
|
||||
var helper = function () { };
|
||||
|
||||
var gridName = "@gridName";
|
||||
var url = {
|
||||
SaveTanarok: "@Url.Action("SaveTanarok", "TanarImport")"
|
||||
};
|
||||
|
||||
helper.RefreshGrid = function () {
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
};
|
||||
|
||||
helper.dataBound = function () {
|
||||
dataBound();
|
||||
}
|
||||
|
||||
helper.Save = function () {
|
||||
AjaxHelper.DoPost(url.SaveTanarok, { tanevId: @Model.TanevId, feladatellatasiHelyId: @Model.FeladatellatasiHelyId }, successSave, failedSave);
|
||||
};
|
||||
|
||||
function successSave(data) {
|
||||
KretaWindowHelper.feedbackWindowWithLink(
|
||||
"@CommonResource.Siker",
|
||||
"@AdminisztracioResource.AlkalmazottakImportalasaSikeresenMegtortent",
|
||||
"@AdminisztracioResource.TovabbAzAlkalmazottakhoz",
|
||||
data.tovabbUrl,
|
||||
false,
|
||||
function () {
|
||||
KretaWindowHelper.destroyAllWindow();
|
||||
});
|
||||
};
|
||||
|
||||
function failedSave() {
|
||||
KretaWindowHelper.feedbackWindow("Hiba", "Hiba történt az alkalmazottak mentése során", true);
|
||||
};
|
||||
|
||||
function dataBound() {
|
||||
if ($('#' + gridName).data("kendoGrid").dataSource.view().length == 0) {
|
||||
$('#BtnOk').hide();
|
||||
}
|
||||
else {
|
||||
$('#BtnOk').show();
|
||||
}
|
||||
};
|
||||
|
||||
return helper;
|
||||
})();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue