init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Kendo.Mvc.UI;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class AdminDualisSzerzodesApiController : ApiController
|
||||
{
|
||||
[HttpPost]
|
||||
public DataSourceResult GetAdminDualisSzerzodesGrid([ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] KretaGridDataSourceRequest request)
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(request.data, request);
|
||||
|
||||
return modelList.ToDataSourceResult(gridParameter);
|
||||
}
|
||||
|
||||
public HttpResponseMessage GetExport(string data, DataSourceRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(data, request);
|
||||
|
||||
modelList = modelList.SortingAndPaging(gridParameter.OrderDictionary);
|
||||
|
||||
var simpleExportColumnCos = SimpleExportLogic.GetSimpleExportColumnCos<AdminDualisSzerzodesGridModel>(AdminDualisSzerzodesGridModel.DualisSzerzodesListajaExportAttributeId);
|
||||
|
||||
var memoryStream = SimpleExportLogic.GetExport(TanarResource.DualisSzerzodesekListajaExportSheetName, simpleExportColumnCos, modelList, ClaimData.SelectedTanevID.Value);
|
||||
|
||||
return HttpResponseExtensions.GetFileHttpResponse(memoryStream.ToArray(), TanarResource.DualisSzerzodesekListajaExportFilename);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ErrorResource.HibaTortentAFajlExportalasaKozben) { UnHandledException = ex };
|
||||
}
|
||||
}
|
||||
|
||||
private (GridParameters gridParameter, List<AdminDualisSzerzodesGridModel> modelList) GetGridData(string data, DataSourceRequest request)
|
||||
{
|
||||
var model = JsonConvert.DeserializeObject<AdminDualisSzerzodesSearchModel>(data);
|
||||
|
||||
var gridParameter = Converter.GridParameter(request);
|
||||
|
||||
var coList = new DualisSzerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetDualisSzerzodesekListajaCoList(model.ConvertToCO());
|
||||
|
||||
var modelList = new List<AdminDualisSzerzodesGridModel>();
|
||||
|
||||
foreach (var co in coList)
|
||||
{
|
||||
var gridModel = new AdminDualisSzerzodesGridModel(co);
|
||||
modelList.Add(gridModel);
|
||||
}
|
||||
|
||||
return (gridParameter, modelList);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Kendo.Mvc.UI;
|
||||
using Kreta.BusinessLogic.Exceptions;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Framework.Entities;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class DualisKepzohelyApiController : ApiController
|
||||
{
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public DataSourceResult GetDualisKepzohelyGrid(string data, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] KretaGridDataSourceRequest request)
|
||||
{
|
||||
return GetDualisKepzohelyGrid(data, string.Empty, request);
|
||||
}
|
||||
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public DataSourceResult GetDualisKepzohelyGrid(string data, string parentId, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] KretaGridDataSourceRequest request)
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(data, parentId, string.IsNullOrWhiteSpace(parentId) ? SzervezetAdatokHalmazaEnum.Szervezet : SzervezetAdatokHalmazaEnum.Alszervezetek, request);
|
||||
|
||||
return modelList.ToDataSourceResult(gridParameter);
|
||||
}
|
||||
|
||||
public HttpResponseMessage GetExport(string data, DataSourceRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(data, null, SzervezetAdatokHalmazaEnum.SzervezetEsAlSzervezetek, request);
|
||||
|
||||
modelList = modelList.SortingAndPaging(gridParameter.OrderDictionary);
|
||||
|
||||
var simpleExportColumnCos = SimpleExportLogic.GetSimpleExportColumnCos<DualisKepzohelyGridModel>(DualisKepzohelyGridModel.DualisKepzohelyListajaExportAttributeId);
|
||||
|
||||
var memoryStream = SimpleExportLogic.GetExport(DualisResource.DualisKepzohelyekListajaExportSheetName, simpleExportColumnCos, modelList, ClaimData.SelectedTanevID.Value);
|
||||
|
||||
return HttpResponseExtensions.GetFileHttpResponse(memoryStream.ToArray(), $"{DualisResource.DualisKepzoHelyekExportFilename}_{DateTime.Now:yyyy_MM_dd}.xlsx");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ErrorResource.HibaTortentAFajlExportalasaKozben) { UnHandledException = ex };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage SaveDualisKepzoHely(DualisKepzohelyModel model)
|
||||
{
|
||||
DualisKepzohelyModel.ValidateModel(model, ModelState);
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
var co = DualisKepzohelyModel.ConvertModelToCO(model);
|
||||
helper.InsertOrUpdateDualisKepzohely(co);
|
||||
|
||||
return Request.CreateResponse(HttpStatusCode.OK, new { parentId = model.ParentSzervezetId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.InternalServerError, ErrorResource.NemSikerultAMuvelet)
|
||||
{
|
||||
UnHandledException = ex
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage DeleteDualisKepzoHely(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var h = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
h.DeleteDualisKepzohely(id);
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
catch (CannotBeDeletedException ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ex.Message);
|
||||
}
|
||||
catch (EntityDeleteFailedException ex)
|
||||
{
|
||||
var uzenet = string.Format(ErrorResource.Az0NemTorolhetoMertEgyVagyTobbKapcsolodasaVanKapcsolatok1, DualisResource.DualisKepzohely, ex.ConnectionErrorMessage);
|
||||
throw new StatusError(HttpStatusCode.BadRequest, uzenet);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public IHttpActionResult DeleteSelectedDualisKepzoHely(List<int> idList)
|
||||
{
|
||||
var h = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
string errorMsg = string.Empty, entityName = string.Empty;
|
||||
var counter = 0;
|
||||
|
||||
foreach (var id in idList)
|
||||
{
|
||||
try
|
||||
{
|
||||
h.DeleteDualisKepzohely(id);
|
||||
counter++;
|
||||
}
|
||||
catch (CannotBeDeletedException ex)
|
||||
{
|
||||
errorMsg += $"{ex.Message}{Environment.NewLine}";
|
||||
continue;
|
||||
}
|
||||
catch (EntityDeleteFailedException ex)
|
||||
{
|
||||
var dualisKepzohely = h.GetDualisKepzohelyById(id);
|
||||
var errorMessage = string.Format(ErrorResource.NemTorolhetoKapcsolatMiatt, string.Format("{0} ({1})", dualisKepzohely.KepzohelyNeve, dualisKepzohely.KepzohelyAdoszama), ex.ConnectionErrorMessage);
|
||||
|
||||
errorMsg += $"{errorMessage}{Environment.NewLine}{Environment.NewLine}";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(errorMsg))
|
||||
{
|
||||
return Json(new { Message = string.Format(ErrorResource.NSorTorlesSikeres, counter) });
|
||||
}
|
||||
|
||||
if (counter > 0)
|
||||
{
|
||||
errorMsg += Environment.NewLine + string.Format(ErrorResource.NSorTorlesSikeres, counter);
|
||||
}
|
||||
throw new StatusError(HttpStatusCode.BadRequest, errorMsg);
|
||||
}
|
||||
|
||||
private (GridParameters gridParameter, List<DualisKepzohelyGridModel> modelList) GetGridData(string data, string parentId, SzervezetAdatokHalmazaEnum adatokHalmaza, DataSourceRequest request)
|
||||
{
|
||||
var model = JsonConvert.DeserializeObject<DualisKepzohelySearchModel>(data);
|
||||
|
||||
var gridParameter = Converter.GridParameter(request);
|
||||
|
||||
var pId = string.IsNullOrWhiteSpace(parentId) ? (int?)null : int.Parse(parentId);
|
||||
if (!model.SzervezetId.HasValue)
|
||||
{
|
||||
model.SzervezetId = pId;
|
||||
}
|
||||
|
||||
var szervezetHelper = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
var felhasznaloSzervezetId = szervezetHelper.GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
var coList = szervezetHelper.GetDualisKepzohelyekListajaCoList(model.ConvertToCO(), (int)adatokHalmaza, felhasznaloSzervezetId);
|
||||
|
||||
var modelList = new List<DualisKepzohelyGridModel>();
|
||||
|
||||
foreach (var co in coList)
|
||||
{
|
||||
var gridModel = new DualisKepzohelyGridModel(co);
|
||||
modelList.Add(gridModel);
|
||||
}
|
||||
|
||||
return (gridParameter, modelList);
|
||||
}
|
||||
|
||||
public DataSourceResult GetDualisCsoportGrid(string id, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
var ds = helper.GetDualisKepzohelyCsoportjai(int.Parse(id));
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
|
||||
public DataSourceResult GetDualisHelyszinGrid(string id, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
var ds = helper.GetDualisKepzohelyHelyszinjei(int.Parse(id));
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
|
||||
public DataSourceResult GetDualisOktatoGrid(string id, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
var ds = helper.GetDualisKepzohelyOktatoi(int.Parse(id));
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
|
||||
public DataSourceResult GetDualisTanuloGrid(string id, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
var ds = helper.GetDualisKepzohelyTanuloi(int.Parse(id));
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
|
||||
public DataSourceResult GetDualisTantargyGrid(string id, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new SzervezetHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
var ds = helper.GetDualisKepzohelyTantargyai(int.Parse(id));
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System.Data;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Kendo.Mvc.UI;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue)]
|
||||
public class DualisSzerzodesApiController : ApiController
|
||||
{
|
||||
public DataSourceResult GetDualisSzerzodesGrid([ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var helper = new DualisSzerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
helper.GridParameters = Converter.GridParameter(request);
|
||||
DataSet ds = helper.GetTanarDualisSzerzodesek();
|
||||
return ds.ToDataSourceResult();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using System.Web.Http.Results;
|
||||
using Kendo.Mvc.UI;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.Classes.ComboBox;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Core;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class SzakkepzesiMunkaszerzodesApiController : ApiController
|
||||
{
|
||||
private IKretaAuthorization Authorization { get; }
|
||||
|
||||
public SzakkepzesiMunkaszerzodesApiController(IKretaAuthorization authorization)
|
||||
{
|
||||
Authorization = authorization;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public DataSourceResult GetSzakkepzesiMunkaszerzodesGrid([ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] KretaGridDataSourceRequest request)
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(request.data, request);
|
||||
|
||||
return modelList.ToDataSourceResult(gridParameter);
|
||||
}
|
||||
|
||||
public HttpResponseMessage GetExport(string data, DataSourceRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var (gridParameter, modelList) = GetGridData(data, request);
|
||||
|
||||
modelList = modelList.SortingAndPaging(gridParameter.OrderDictionary);
|
||||
|
||||
var simpleExportColumnCos = SimpleExportLogic.GetSimpleExportColumnCos<SzakkepzesiMunkaszerzodesGridModel>(SzakkepzesiMunkaszerzodesGridModel.SzakkepzesiMunkaszerzodesekListajaExportAttributeId);
|
||||
|
||||
var memoryStream = SimpleExportLogic.GetExport(TanarResource.SzakkepzesiMunkaszerzodesekListajaExportSheetName, simpleExportColumnCos, modelList, ClaimData.SelectedTanevID.Value);
|
||||
|
||||
return HttpResponseExtensions.GetFileHttpResponse(memoryStream.ToArray(), TanarResource.SzakkepzesiMunkaszerzodesekListajaExportFilename);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ErrorResource.HibaTortentAFajlExportalasaKozben) { UnHandledException = ex };
|
||||
}
|
||||
}
|
||||
|
||||
private (GridParameters gridParameter, List<SzakkepzesiMunkaszerzodesGridModel> modelList) GetGridData(string data, DataSourceRequest request)
|
||||
{
|
||||
var gridParameter = Converter.GridParameter(request);
|
||||
|
||||
var model = JsonConvert.DeserializeObject<SzakkepzesiMunkaszerzodesSearchModel>(data);
|
||||
var searchCo = model.ConvertToCo();
|
||||
var coList = new SzakkepzesiMunkaszerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSzakkepzesiMunkaszerzodesListajaCoList(searchCo);
|
||||
|
||||
var modelList = new List<SzakkepzesiMunkaszerzodesGridModel>();
|
||||
foreach (var co in coList)
|
||||
{
|
||||
var gridModel = new SzakkepzesiMunkaszerzodesGridModel(co);
|
||||
modelList.Add(gridModel);
|
||||
}
|
||||
|
||||
return (gridParameter, modelList);
|
||||
}
|
||||
|
||||
public JsonResult<List<ComboBoxListItem>> GetHonapokEnumList([DataSourceRequest] DataSourceRequest request)
|
||||
{
|
||||
var tanevKezdete = new TanevHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetTanevKezdete();
|
||||
|
||||
var orderedHonapokDictionary = new Dictionary<string, string>
|
||||
{
|
||||
{$"{tanevKezdete.Year}0901", $"{tanevKezdete.Year}. {HonapokEnum.Szeptember.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year}1001", $"{tanevKezdete.Year}. {HonapokEnum.Oktober.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year}1101", $"{tanevKezdete.Year}. {HonapokEnum.November.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year}1201", $"{tanevKezdete.Year}. {HonapokEnum.December.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0101", $"{tanevKezdete.Year+1}. {HonapokEnum.Januar.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0201", $"{tanevKezdete.Year+1}. {HonapokEnum.Februar.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0301", $"{tanevKezdete.Year+1}. {HonapokEnum.Marcius.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0401", $"{tanevKezdete.Year+1}. {HonapokEnum.Aprilis.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0501", $"{tanevKezdete.Year+1}. {HonapokEnum.Majus.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0601", $"{tanevKezdete.Year+1}. {HonapokEnum.Junius.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0701", $"{tanevKezdete.Year+1}. {HonapokEnum.Julius.GetDisplayName(ClaimData.SelectedTanevID.Value)}"},
|
||||
{$"{tanevKezdete.Year+1}0801", $"{tanevKezdete.Year+1}. {HonapokEnum.Augusztus.GetDisplayName(ClaimData.SelectedTanevID.Value)}"}
|
||||
};
|
||||
|
||||
return Json(orderedHonapokDictionary.ToComboBoxItemList());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
using System.Net;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Areas.Tantargy.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsDefaultAdminUser.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue, KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue)]
|
||||
[Attributes.KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
|
||||
public class AdminDualisSzerzodesController : BaseDualisSzerzodesController
|
||||
{
|
||||
private bool IsDualisKepzesEnabled => new IntezmenyConfigHelper(ConnectionTypeExtensions.GetSystemConnectionType()).GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.DualisKepzes, IntezmenyConfigTipusEnum.IsEnabled);
|
||||
|
||||
private IKretaAuthorization Authorization { get; }
|
||||
|
||||
public AdminDualisSzerzodesController(IFileServiceHelper fileServiceHelper, IKretaAuthorization authorization) : base(fileServiceHelper)
|
||||
{
|
||||
Authorization = authorization;
|
||||
}
|
||||
|
||||
public ActionResult DualisOktatoCsoporthozRendeles(string filter)
|
||||
{
|
||||
if (!Authorization.IsValidDualisOktatoCsoporthozRendeles())
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.Forbidden, ErrorResource.NincsJogaAzOldalMegtekintesehez);
|
||||
}
|
||||
|
||||
var model = new TantargyFelosztasModel
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
ControllerName = Constants.Controllers.DualisTantargyFelosztas,
|
||||
ApiControllerName = Constants.ApiControllers.DualisTantargyFelosztasApi,
|
||||
};
|
||||
|
||||
(var oraszam, var _) = new FoglalkozasHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetFoglalkozasOsszOraszamok(model.IsFromSzervezet);
|
||||
ViewBag.Oraszam = oraszam;
|
||||
ViewBag.TtfKorrekcioOraszam = 0; // Üzleti döntésre duálisnál 0
|
||||
return View("~/Areas/Tantargy/Views/TantargyFelosztas/Index.cshtml", model);
|
||||
}
|
||||
|
||||
private AdminDualisSzerzodesGridModel ConvertCoToModel(DualisSzerzodesCo co)
|
||||
{
|
||||
return new AdminDualisSzerzodesGridModel()
|
||||
{
|
||||
ID = co.TanuloId.ToString(),
|
||||
SzerzodesFileId = co.SzerzodesFileId,
|
||||
FileId = co.FileId,
|
||||
FileNev = co.FileNev,
|
||||
FeltoltesDatuma = co.FeltoltesDatuma,
|
||||
FeltoltoId = co.FeltoltoId,
|
||||
Statusz = co.Statusz
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.ModelBinder.Mvc;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Controllers
|
||||
{
|
||||
public abstract class BaseDualisSzerzodesController : Controller
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
public BaseDualisSzerzodesController(IFileServiceHelper fileServiceHelper)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View("Index");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult UploadFile([ModelBinder(typeof(AlapdokumentumFileUploadBinder))] IEnumerable<System.Web.HttpPostedFileBase> files, int tanuloId)
|
||||
{
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
var uploadedFiles = files.ToList();
|
||||
var helper = new DualisSzerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType(), _fileServiceHelper);
|
||||
helper.Upload(uploadedFiles[0], ClaimData.IntezmenyGuid.Value, tanuloId);
|
||||
}
|
||||
|
||||
return Content("");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public HttpResponseMessage DeleteFile(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
new DualisSzerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType(), _fileServiceHelper).SetFelhasznaloAltalTorolt(id);
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ErrorResource.HibaATorlesSoran);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult DownloadFile(FormCollection form)
|
||||
{
|
||||
var fileId = form["FileIdHiddenField"];
|
||||
|
||||
var helper = new DualisSzerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType(), _fileServiceHelper);
|
||||
|
||||
var (fajlnev, tartalom) = helper.GetFileData(int.Parse(fileId));
|
||||
var stream = new MemoryStream(tartalom);
|
||||
var result = File(stream, MimeMapping.GetMimeMapping(fajlnev), fajlnev);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
409
KretaWeb/Areas/DualisKepzes/Controllers/DualisAdminController.cs
Normal file
409
KretaWeb/Areas/DualisKepzes/Controllers/DualisAdminController.cs
Normal file
|
@ -0,0 +1,409 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Extensions;
|
||||
using Kreta.BusinessLogic.HelperClasses.OsztalyCsoportbaSorolas;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core.FeatureToggle;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Alkalmazott.Models;
|
||||
using Kreta.Web.Areas.Intezmeny.Models;
|
||||
using Kreta.Web.Areas.Orarend.Models;
|
||||
using Kreta.Web.Areas.OsztalyCsoport.Models;
|
||||
using Kreta.Web.Areas.Tanulo.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsDefaultAdminUser.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Dualis_Admin.ClaimValue, KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue)]
|
||||
[Attributes.KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
|
||||
public class DualisAdminController : BaseDualisSzerzodesController
|
||||
{
|
||||
public bool IsDualisKepzesEnabled => new IntezmenyConfigHelper(ConnectionTypeExtensions.GetSystemConnectionType()).GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.DualisKepzes, IntezmenyConfigTipusEnum.IsEnabled);
|
||||
private readonly IFeatureContext _featureContext;
|
||||
private IKretaAuthorization Authorization { get; }
|
||||
|
||||
public DualisAdminController(IFeatureContext featureContext, IFileServiceHelper fileServiceHelper, IKretaAuthorization authorization) : base(fileServiceHelper)
|
||||
{
|
||||
Authorization = authorization;
|
||||
_featureContext = featureContext;
|
||||
}
|
||||
|
||||
public ActionResult DualisTanulok()
|
||||
{
|
||||
if (!Authorization.IsValidDualisTanulok())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var model = new TanuloSearchModel
|
||||
{
|
||||
FeladatKategoriaId = Constants.MindenErteke.FeladatKategoria,
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
TanuloHozzaferesGeneralasaGombLathato = false
|
||||
};
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
|
||||
return View("~/Areas/Tanulo/Views/Tanulo/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisTanulokBesorolas()
|
||||
{
|
||||
if (!Authorization.IsValidDualisTanuloSorolas())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var helper = new TanevHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
var data = helper.GetTanevInfo();
|
||||
|
||||
var model = new AktTanevCsoportBesorolasModel()
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
FromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetEmptyData" }),
|
||||
FromChangeEvent = "",
|
||||
FromPlaceholder = BesorolasResource.TanulokCsoportbaSorolasaElsoAlkalommal,
|
||||
|
||||
ToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
ToChangeEvent = "AktTanevCsoportBesorolasHelper.changeToCsoport",
|
||||
ToPlaceholder = BesorolasResource.ValasszaKiACelcsoportot,
|
||||
Zaradek = new SorolasZaradek(ConnectionTypeExtensions.GetSessionConnectionType(), false, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetZaradekList" })),
|
||||
|
||||
MinDatum = data.KezdoNap.ToString(),
|
||||
MaxDatum = data.UtolsoNap.ToString(),
|
||||
|
||||
TanevElsoNapja = data.KezdoNap.Date,
|
||||
GetTanulokListFromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevDualisTanulok" }),
|
||||
GetTanulokListToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
SaveUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "AktTanevSorolasApi", action = "CsoportBesorolas" })
|
||||
};
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
return View("~/Areas/OsztalyCsoport/Views/AktTanevSorolas/CsoportBesorolas.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisTanuloAthelyezes()
|
||||
{
|
||||
if (!Authorization.IsValidDualisTanuloSorolas())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var helper = new TanevHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
var data = helper.GetTanevInfo();
|
||||
|
||||
var model = new AktTanevCsoportAtsorolasModel()
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
FromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
FromChangeEvent = "AktTanevCsoportAtsorolasHelper.changeFromCsoport",
|
||||
FromPlaceholder = BesorolasResource.ValasszaKiAForrascsoportot,
|
||||
|
||||
ToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
ToChangeEvent = "AktTanevCsoportAtsorolasHelper.changeToCsoport",
|
||||
ToPlaceholder = BesorolasResource.ValasszaKiACelcsoportot,
|
||||
|
||||
Zaradek = new SorolasZaradek(ConnectionTypeExtensions.GetSessionConnectionType(), true, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetZaradekList" })),
|
||||
|
||||
MinDatum = data.KezdoNap.ToString(),
|
||||
MaxDatum = data.UtolsoNap.ToString(),
|
||||
|
||||
TanevElsoNapja = data.KezdoNap.Date,
|
||||
GetTanulokListFromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
GetTanulokListToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
SaveUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "AktTanevSorolasApi", action = "CsoportAtsorolas" })
|
||||
};
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
model.Zaradek.IsZaradekKotelezo = false;
|
||||
return View("~/Areas/OsztalyCsoport/Views/AktTanevSorolas/CsoportAtsorolas.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisTanuloBesorolasJavitas()
|
||||
{
|
||||
if (!Authorization.IsValidDualisTanuloSorolas())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var model = new AktTanevCsoportTevesBesorolasJavitasModel()
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
FromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
FromChangeEvent = "AktTanevCsoportTevesBesorolasJavitasHelper.changeFromCsoport",
|
||||
FromPlaceholder = BesorolasResource.ValasszaKiAForrascsoportot,
|
||||
|
||||
ToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
ToChangeEvent = "AktTanevCsoportTevesBesorolasJavitasHelper.changeToCsoport",
|
||||
ToPlaceholder = BesorolasResource.ValasszaKiACelcsoportot,
|
||||
|
||||
Zaradek = new SorolasZaradek(ConnectionTypeExtensions.GetSessionConnectionType(), false, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetZaradekList" })),
|
||||
|
||||
GetTanulokListFromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
GetTanulokListToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
SaveUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "AktTanevSorolasApi", action = "CsoportTevesBesorolasJavitas" })
|
||||
};
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
return View("~/Areas/OsztalyCsoport/Views/AktTanevSorolas/CsoportTevesBesorolasJavitas.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisTanuloKileptetes()
|
||||
{
|
||||
if (!Authorization.IsValidDualisTanuloSorolas())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
var helper = new TanevHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
var data = helper.GetTanevInfo();
|
||||
var model = new AktTanevCsoportKisorolasModel()
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
FromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetDualisCsoportokList" }),
|
||||
FromChangeEvent = "AktTanevCsoportKisorolasHelper.changeFromCsoport",
|
||||
FromPlaceholder = BesorolasResource.ValasszaKiAForrascsoportot,
|
||||
|
||||
ToUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetEmptyData" }),
|
||||
ToChangeEvent = "",
|
||||
ToPlaceholder = "",
|
||||
|
||||
Zaradek = new SorolasZaradek(ConnectionTypeExtensions.GetSessionConnectionType(), true, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetZaradekList" })),
|
||||
MinDatum = data.KezdoNap.ToString(),
|
||||
MaxDatum = data.UtolsoNap.ToString(),
|
||||
|
||||
TanevElsoNapja = data.KezdoNap.Date,
|
||||
GetTanulokListFromUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAktivTanevCsoportTanuloi" }),
|
||||
GetTanulokListToUrl = string.Empty,
|
||||
SaveUrl = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "AktTanevSorolasApi", action = "CsoportKisorolas" })
|
||||
};
|
||||
model.Zaradek.IsZaradekKotelezo = false;
|
||||
|
||||
return View("~/Areas/OsztalyCsoport/Views/AktTanevSorolas/CsoportKisorolas.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisAdminTanariOrarend()
|
||||
{
|
||||
if (!Authorization.IsValidDualisAdminOrarend())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
var controllerName = Constants.Controllers.AdminTanariOrarend;
|
||||
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
var model = new AdminTanariOrarendModel
|
||||
{
|
||||
TabList = GetDualisAdminOrarendTabs(controllerName)
|
||||
};
|
||||
model.IsFromSzervezet = IsDualisKepzesEnabled;
|
||||
var orarendHelper = new OrarendHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
model.HetirendJson = orarendHelper.GetHetirendek();
|
||||
model.NaptariHetekHetirendJson = orarendHelper.GetNaptariHetekHetirendek(IsDualisKepzesEnabled);
|
||||
|
||||
model.CalendarMinTime = new TimeSpan(0, 0, 0);
|
||||
model.CalendarMaxTime = new TimeSpan(23, 59, 59);
|
||||
|
||||
model.CsengetesiRendMinTime = new TimeSpan();
|
||||
model.CsengetesiRendMaxTime = new TimeSpan(0, 25, 0);
|
||||
|
||||
ViewBag.napirendStart = model.CalendarMinTime;
|
||||
ViewBag.napirendEnd = model.CalendarMaxTime;
|
||||
|
||||
model.IsOravegeBeallitasOrahosszAlapjan = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Orarendi_Elem_Hossz);
|
||||
|
||||
return View("~/Areas/Orarend/Views/" + controllerName + "/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisAdminOsztalyOrarend()
|
||||
{
|
||||
if (!Authorization.IsValidDualisAdminOrarend())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
var controllerName = Constants.Controllers.AdminOsztalyOrarend;
|
||||
var model = new AdminOsztalyOrarendModel
|
||||
{
|
||||
TabList = GetDualisAdminOrarendTabs(controllerName)
|
||||
};
|
||||
model.IsFromSzervezet = IsDualisKepzesEnabled;
|
||||
var orarendHelper = new OrarendHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
model.HetirendJson = orarendHelper.GetHetirendek();
|
||||
model.NaptariHetekHetirendJson = orarendHelper.GetNaptariHetekHetirendek(IsDualisKepzesEnabled);
|
||||
|
||||
model.CalendarMinTime = new TimeSpan(0, 0, 0);
|
||||
model.CalendarMaxTime = new TimeSpan(23, 59, 59);
|
||||
|
||||
model.CsengetesiRendMinTime = new TimeSpan();
|
||||
model.CsengetesiRendMaxTime = new TimeSpan(0, 25, 0);
|
||||
|
||||
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSystemConnectionType());
|
||||
|
||||
ViewBag.napirendStart = model.CalendarMinTime;
|
||||
ViewBag.napirendEnd = model.CalendarMaxTime;
|
||||
|
||||
model.IsOravegeBeallitasOrahosszAlapjan = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Orarendi_Elem_Hossz);
|
||||
|
||||
return View("~/Areas/Orarend/Views/" + controllerName + "/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisAdminTeremOrarend()
|
||||
{
|
||||
if (!Authorization.IsValidDualisAdminOrarend())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
var controllerName = Constants.Controllers.AdminTeremOrarend;
|
||||
var model = new AdminTeremOrarendModel
|
||||
{
|
||||
TabList = GetDualisAdminOrarendTabs(controllerName)
|
||||
};
|
||||
model.IsFromSzervezet = IsDualisKepzesEnabled;
|
||||
var orarendHelper = new OrarendHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
model.HetirendJson = orarendHelper.GetHetirendek();
|
||||
model.NaptariHetekHetirendJson = orarendHelper.GetNaptariHetekHetirendek(IsDualisKepzesEnabled);
|
||||
|
||||
model.CalendarMinTime = new TimeSpan(0, 0, 0);
|
||||
model.CalendarMaxTime = new TimeSpan(23, 59, 59);
|
||||
|
||||
model.CsengetesiRendMinTime = new TimeSpan();
|
||||
model.CsengetesiRendMaxTime = new TimeSpan(0, 25, 0);
|
||||
|
||||
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSystemConnectionType());
|
||||
|
||||
ViewBag.napirendStart = model.CalendarMinTime;
|
||||
ViewBag.napirendEnd = model.CalendarMaxTime;
|
||||
|
||||
model.IsOravegeBeallitasOrahosszAlapjan = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Orarendi_Elem_Hossz);
|
||||
|
||||
return View("~/Areas/Orarend/Views/" + controllerName + "/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisAlkalmazottak()
|
||||
{
|
||||
if (!Authorization.IsValidDualisAlkalmazottak())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var model = new AlkalmazottSearchModel
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
ControllerName = Constants.Controllers.DualisAdminAlkalmazott,
|
||||
ApiControllerName = Constants.ApiControllers.DualisAdminAlkalmazottApi,
|
||||
};
|
||||
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
model.MunkaugyiAdatokKlebelsbergOrNSZFH =
|
||||
_featureContext.IsEnabled(Core.Constants.FeatureName.MunkaugyiAdatokKlebelsberg)
|
||||
|| _featureContext.IsEnabled(Core.Constants.FeatureName.MunkaugyiAdatokNSZFH);
|
||||
model.FeladatEllatasiHelyId = ClaimData.FelhelySzuro;
|
||||
return View("~/Areas/Alkalmazott/Views/Alkalmazott/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public ActionResult DualisCsoportok(string filter)
|
||||
{
|
||||
if (!Authorization.IsValidDualisCsoportok())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var model = CsoportSearchModel.SetFilterCsoportSearchModel(filter);
|
||||
model.SearchFeladatEllatasiHelyId = ClaimData.FelhelySzuro;
|
||||
|
||||
model.IsFromSzervezet = IsDualisKepzesEnabled;
|
||||
model.ControllerName = Constants.Controllers.DualisAdminCsoport;
|
||||
model.ApiControllerName = Constants.ApiControllers.DualisAdminCsoportApi;
|
||||
model.SearchCsoportTipusId = (int)CsoportTipusEnum.dualis_kepzesi_csoport;
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
|
||||
return View("~/Areas/OsztalyCsoport/Views/Csoport/Index.cshtml", model);
|
||||
}
|
||||
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue)]
|
||||
public ActionResult DualisSzerzodes()
|
||||
{
|
||||
return View("DualisAdminSzerzodes");
|
||||
}
|
||||
|
||||
public ActionResult Helyszinek()
|
||||
{
|
||||
if (!Authorization.IsValidDualisHelyszinek())
|
||||
{
|
||||
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
|
||||
}
|
||||
|
||||
var model = new TeremSearchModel
|
||||
{
|
||||
IsFromSzervezet = IsDualisKepzesEnabled,
|
||||
ControllerName = Constants.Controllers.DualisAdminTerem,
|
||||
ApiControllerName = Constants.ApiControllers.DualisAdminTeremApi,
|
||||
};
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
return View("~/Areas/Intezmeny/Views/Terem/Index.cshtml", model);
|
||||
}
|
||||
|
||||
public List<TabStripItemModel> GetDualisAdminOrarendTabs(string controllerName, CalendarModel calendarModel = null)
|
||||
{
|
||||
var list = new List<TabStripItemModel> {
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "0",
|
||||
ItemName = AdminisztracioResource.Tanorak,
|
||||
Area = "Orarend",
|
||||
Controller = "Dualis" + controllerName,
|
||||
Action = "GetOrarendiOrak",
|
||||
RouteParameters = new Dictionary<string, string>
|
||||
{
|
||||
{ "index", "0" }
|
||||
}
|
||||
},
|
||||
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "1",
|
||||
ItemName = AdminisztracioResource.Napirend,
|
||||
Area = "Orarend",
|
||||
Controller = "Dualis" + controllerName,
|
||||
Action = "GetTanoranKivuliFoglalkozasok",
|
||||
RouteParameters = new Dictionary<string, string>
|
||||
{
|
||||
{ "index", "1" }
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsDefaultAdminUser.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class DualisKepzohelyController : Controller
|
||||
{
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
var model = new DualisKepzohelySearchModel();
|
||||
if (ClaimData.FelhasznaloSzerepkor != Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
|
||||
}
|
||||
return View("Index", model);
|
||||
}
|
||||
|
||||
public ActionResult OpenModifyAddPopup(int? Id, int? parentSzervezetId)
|
||||
{
|
||||
DualisKepzohelyModel model;
|
||||
if (Id.HasValue)
|
||||
{
|
||||
model = GetDualisKepzohely(Id.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
model = new DualisKepzohelyModel();
|
||||
if (!parentSzervezetId.HasValue)
|
||||
{
|
||||
model.HelyszinTipusId = (int)DualisHelyszinTipusEnum.szekhely;
|
||||
}
|
||||
else
|
||||
{
|
||||
var parentDualisKepzohely = GetDualisKepzohely(parentSzervezetId ?? 0); //mivel a paraméter nullable
|
||||
model.HelyszinTipusId = (int)DualisHelyszinTipusEnum.telephely;
|
||||
model.KepzohelyAdoszama = parentDualisKepzohely.KepzohelyAdoszama;
|
||||
}
|
||||
model.ParentSzervezetId = parentSzervezetId;
|
||||
}
|
||||
|
||||
model.IsEditable = true;
|
||||
var tabModel = GetTabModel(model);
|
||||
|
||||
var pm = new PopUpModel(tabModel, "DualisKepzohely_ModifyAdd_Bevitel");
|
||||
pm = pm.AddCancelBtn(pm, "DualisKepzohelyHelper.modifyAddCancel");
|
||||
pm = pm.AddBtn(pm, "saveDualisKepzohely", CommonResource.Mentes, "DualisKepzohelyHelper.modifyAddSave");
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
|
||||
public ActionResult OpenInfoPopup(int? Id)
|
||||
{
|
||||
var model = GetDualisKepzohely(Id.Value);
|
||||
var tabModel = GetTabModel(model);
|
||||
|
||||
var pm = new PopUpModel(tabModel, "DualisKepzohely_ModifyAdd_Bevitel");
|
||||
pm = pm.AddCancelBtn(pm, "DualisKepzohelyHelper.modifyAddCancel");
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
|
||||
public ActionResult GetAlSzervezetek(int id)
|
||||
{
|
||||
return PartialView("DualisKepzohelyDetailGrid", id);
|
||||
}
|
||||
|
||||
private DualisKepzohelyModel GetDualisKepzohely(int pId)
|
||||
{
|
||||
var h = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
var co = h.GetDualisKepzohelyById(pId);
|
||||
var model = new DualisKepzohelyModel()
|
||||
{
|
||||
ID = co.ID,
|
||||
KepzohelyNeve = co.KepzohelyNeve,
|
||||
KepzohelyAdoszama = co.KepzohelyAdoszama,
|
||||
KepzohelyCime = co.KepzohelyCime,
|
||||
HelyszinTipusId = co.HelyszinTipusId,
|
||||
ParentSzervezetId = co.ParentSzervezetId,
|
||||
};
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
private static TabStripModel GetTabModel(DualisKepzohelyModel model)
|
||||
{
|
||||
var tabstripModel = new TabStripModel
|
||||
{
|
||||
TabList = new List<TabStripItemModel>
|
||||
{
|
||||
new TabStripItemModel { ItemId = "1", ItemName = DualisResource.TabAlapadatok, Model = model, PartialViewName = "New_Modify_Alapadatok_Tab", IsActive = true }
|
||||
}
|
||||
};
|
||||
|
||||
if (model.ID.IsEntityId())
|
||||
{
|
||||
tabstripModel.TabList.Add(new TabStripItemModel { ItemId = "2", ItemName = DualisResource.TabTanulok, Model = model, PartialViewName = "Dualis_Tanulok_Tab" });
|
||||
tabstripModel.TabList.Add(new TabStripItemModel { ItemId = "3", ItemName = DualisResource.TabOktatok, Model = model, PartialViewName = "Dualis_Oktatok_Tab" });
|
||||
tabstripModel.TabList.Add(new TabStripItemModel { ItemId = "4", ItemName = DualisResource.TabCsoportok, Model = model, PartialViewName = "Dualis_Csoportok_Tab" });
|
||||
tabstripModel.TabList.Add(new TabStripItemModel { ItemId = "5", ItemName = DualisResource.TabTantargyak, Model = model, PartialViewName = "Dualis_Tantargyak_Tab" });
|
||||
tabstripModel.TabList.Add(new TabStripItemModel { ItemId = "6", ItemName = DualisResource.TabHelyszinek, Model = model, PartialViewName = "Dualis_Helyszinek_Tab" });
|
||||
}
|
||||
return tabstripModel;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Web.Areas.DualisKepzes.Controllers;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.Adminisztrator.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue)]
|
||||
public class DualisSzerzodesController : BaseDualisSzerzodesController
|
||||
{
|
||||
public DualisSzerzodesController(IFileServiceHelper fileServiceHelper) : base(fileServiceHelper) { }
|
||||
|
||||
private DualisSzerzodesGridModel ConvertCoToModel(DualisSzerzodesCo co)
|
||||
{
|
||||
return new DualisSzerzodesGridModel()
|
||||
{
|
||||
ID = co.TanuloId.ToString(),
|
||||
SzerzodesFileId = co.SzerzodesFileId,
|
||||
FileId = co.FileId,
|
||||
FileNev = co.FileNev,
|
||||
FeltoltesDatuma = co.FeltoltesDatuma,
|
||||
FeltoltoId = co.FeltoltoId,
|
||||
Statusz = co.Statusz
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
using System.Net;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsDefaultAdminUser.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.IsSzakiranyuOktatasertFelelos.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class SzakkepzesiMunkaszerzodesController : Controller
|
||||
{
|
||||
private IKretaAuthorization Authorization { get; }
|
||||
|
||||
public SzakkepzesiMunkaszerzodesController(IKretaAuthorization authorization)
|
||||
{
|
||||
Authorization = authorization;
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
if (!Authorization.IsValidSzakkepzesiMunkaszerzodes())
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.Forbidden, ErrorResource.NincsJogaAzOldalMegtekintesehez);
|
||||
}
|
||||
|
||||
return View("Index");
|
||||
}
|
||||
|
||||
public ActionResult OpenInfoSzakkepzesiMunkaszerzodesAdatokPopup(int id)
|
||||
{
|
||||
var co = new SzakkepzesiMunkaszerzodesHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSzakepzesiMunkaszerzodesById(id);
|
||||
var infoModel = new SzakkepzesiMunkaszerzodesInfoModel(co);
|
||||
|
||||
var model = new PopUpModel(infoModel, "Info_PopUp");
|
||||
|
||||
model.AddCancelBtn(model, "SzakkepzesiMunkaszerzodesHelper.infoCancel");
|
||||
|
||||
return PartialView(Constants.General.PopupView, model);
|
||||
}
|
||||
}
|
||||
}
|
24
KretaWeb/Areas/DualisKepzes/DualisKepzesAreaRegistration.cs
Normal file
24
KretaWeb/Areas/DualisKepzes/DualisKepzesAreaRegistration.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Web.Mvc;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes
|
||||
{
|
||||
public class DualisKepzesAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "DualisKepzes";
|
||||
}
|
||||
}
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.MapRoute(
|
||||
"DualisKepzes_default",
|
||||
"DualisKepzes/{controller}/{action}/{id}",
|
||||
new { action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class AdminDualisSzerzodesGridModel : BaseDualisSzerzodesGridModel
|
||||
{
|
||||
|
||||
public AdminDualisSzerzodesGridModel() { }
|
||||
|
||||
public AdminDualisSzerzodesGridModel(DualisSzerzodesCo itemCo)
|
||||
{
|
||||
TanuloNev = itemCo.TanuloNev;
|
||||
AnyaNev = itemCo.AnyaNev;
|
||||
SzuletesiHelye = itemCo.SzuletesiHelye;
|
||||
SzuletesiDatum = itemCo.SzuletesiDatum;
|
||||
OktatasiAzonosito = itemCo.OktatasiAzonosito;
|
||||
FeltoltesDatuma = itemCo.FeltoltesDatuma;
|
||||
SzerzodesFileId = itemCo.SzerzodesFileId;
|
||||
FileId = itemCo.FileId;
|
||||
FileNev = itemCo.FileNev;
|
||||
Statusz = itemCo.Statusz;
|
||||
FeltoltoId = itemCo.FeltoltoId;
|
||||
ID = itemCo.TanuloId.ToString();
|
||||
DualisKepzohelyNev = itemCo.DualisKepzohelyNev;
|
||||
DualisKepzohelyAdoszama = itemCo.DualisKepzohelyAdoszama;
|
||||
TanarNev = itemCo.TanarNev;
|
||||
TanarId = itemCo.TanarId;
|
||||
}
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 05, nameof(AlkalmazottResource.DualisKepzohelyNeve), typeof(AlkalmazottResource))]
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyNeve), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 06, nameof(AlkalmazottResource.DualisKepzohelyAdoszama), typeof(AlkalmazottResource))]
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyAdoszama), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyAdoszama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 07, nameof(TanarResource.OktatoNeve), typeof(TanarResource))]
|
||||
[Display(Name = nameof(TanarResource.OktatoNeve), ResourceType = typeof(TanarResource))]
|
||||
public string TanarNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 08, nameof(TanarResource.Statusz), typeof(TanarResource))]
|
||||
[Display(Name = nameof(TanarResource.Statusz), ResourceType = typeof(TanarResource))]
|
||||
public string StatuszStr => Statusz == FileStatuszEnum.NincsFeltoltve ? CommonResource.NincsFeltoltve : CommonResource.Feltoltve;
|
||||
|
||||
[Display(Name = nameof(TanarResource.Statusz), ResourceType = typeof(TanarResource))]
|
||||
public FileStatuszEnum Statusz { get; set; }
|
||||
|
||||
public string ShortFileNev => string.IsNullOrWhiteSpace(FileNev) || Statusz == FileStatuszEnum.NincsFeltoltve ? string.Empty : FileNev.Length > 32 ? $"{FileNev.Substring(0, 32)}..." : FileNev;
|
||||
|
||||
public int? TanarId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class AdminDualisSzerzodesSearchModel
|
||||
{
|
||||
[Display(Name = nameof(TanarResource.OktatoNeve), ResourceType = typeof(TanarResource))]
|
||||
public int? TanarId { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.TanuloNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string NevSearch { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.AnyjaNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string AnyjaNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiHely), ResourceType = typeof(TanuloResource))]
|
||||
public string SzuletesiHely { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiIdo), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiIdoTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiIdo), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiIdoIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.OktatasiAzonosito), ResourceType = typeof(TanuloResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyNeve), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyNev { get; set; }
|
||||
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyAdoszama), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyAdoszama { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanarResource.FeltoltesDatum), ResourceType = typeof(TanarResource))]
|
||||
public DateTime? FeltoltesDatumTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanarResource.FeltoltesDatum), ResourceType = typeof(TanarResource))]
|
||||
public DateTime? FeltoltesDatumIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanarResource.RendelkezikSzerzodessel), ResourceType = typeof(TanarResource))]
|
||||
public int? RendelkezikSzerzodessel { get; set; }
|
||||
|
||||
public DualisSzerzodesSearchCo ConvertToCO()
|
||||
{
|
||||
return new DualisSzerzodesSearchCo
|
||||
{
|
||||
TanarId = TanarId,
|
||||
NevSearch = NevSearch,
|
||||
AnyjaNeve = AnyjaNeve,
|
||||
SzuletesiHely = SzuletesiHely,
|
||||
SzuletesiIdoTol = SzuletesiIdoTol,
|
||||
SzuletesiIdoIg = SzuletesiIdoIg,
|
||||
OktatasiAzonosito = OktatasiAzonosito,
|
||||
DualisKepzohelyNev = DualisKepzohelyNev,
|
||||
DualisKepzohelyAdoszama = DualisKepzohelyAdoszama,
|
||||
FeltoltesDatumTol = FeltoltesDatumTol,
|
||||
FeltoltesDatumIg = FeltoltesDatumIg,
|
||||
Statusz = RendelkezikSzerzodessel
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class BaseDualisSzerzodesGridModel : IKretaIdentity
|
||||
{
|
||||
public const string DualisSzerzodesListajaExportAttributeId = nameof(DualisSzerzodesListajaExportAttributeId);
|
||||
|
||||
public string ID { get; set; }//TanuloId
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 00, nameof(TanuloResource.TanuloNeve), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.TanuloNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string TanuloNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 01, nameof(TanuloResource.AnyjaNeve), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.AnyjaNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string AnyaNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 02, nameof(TanuloResource.SzuletesiHely), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiHely), ResourceType = typeof(TanuloResource))]
|
||||
public string SzuletesiHelye { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 03, nameof(TanuloResource.SzuletesiDatuma), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiDatuma), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiDatum { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 04, nameof(TanuloResource.OktatasiAzonosito), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.OktatasiAzonosito), ResourceType = typeof(TanuloResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisSzerzodesListajaExportAttributeId, 09, nameof(TanarResource.FeltoltesDatum), typeof(TanarResource))]
|
||||
[Display(Name = nameof(TanarResource.FeltoltesDatum), ResourceType = typeof(TanarResource))]
|
||||
public DateTime? FeltoltesDatuma { get; set; }
|
||||
|
||||
public int? SzerzodesFileId { get; set; }
|
||||
public int? FileId { get; set; }
|
||||
public string FileNev { get; set; }
|
||||
public string FeltoltesDatumaStr => FeltoltesDatuma.HasValue ? FeltoltesDatuma.Value.ToString(Kreta.Core.Constants.ToStringPattern.HungarianDateTimeWithoutSeconds) : string.Empty;
|
||||
public int? FeltoltoId { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class DualisKepzohelyGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisKepzohelyGridModel() { }
|
||||
|
||||
public DualisKepzohelyGridModel(DualisKepzohelyCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
KepzohelyNeve = itemCo.KepzohelyNeve;
|
||||
KepzohelyAdoszama = itemCo.KepzohelyAdoszama;
|
||||
KepzohelyCime = itemCo.KepzohelyCime;
|
||||
TanulokSzama = itemCo.TanulokSzama;
|
||||
OktatokSzama = itemCo.OktatokSzama;
|
||||
CsoportokSzama = itemCo.CsoportokSzama;
|
||||
TantargyakSzama = itemCo.TantargyakSzama;
|
||||
HelyszinekSzama = itemCo.HelyszinekSzama;
|
||||
RogzitoId = itemCo.RogzitoId;
|
||||
ParentSzervezetId = itemCo.ParentSzervezetId;
|
||||
ParentSzervezetName = itemCo.ParentSzervezetNeve;
|
||||
IsSzerkesztheto = itemCo.IsSzerkesztheto;
|
||||
}
|
||||
|
||||
public const string DualisKepzohelyListajaExportAttributeId = nameof(DualisKepzohelyListajaExportAttributeId);
|
||||
|
||||
public string ID { get; set; }//SzervezetId
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 00, nameof(DualisResource.KepzohelyNeve), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.KepzohelyNeve), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyNeve { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 01, nameof(DualisResource.KepzohelyAdoszama), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.KepzohelyAdoszama), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyAdoszama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 02, nameof(DualisResource.KepzohelyCime), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.KepzohelyCime), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyCime { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 03, nameof(DualisResource.DualisTanulo), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.DualisTanulo), ResourceType = typeof(DualisResource))]
|
||||
public int TanulokSzama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 04, nameof(DualisResource.DualisOktato), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.DualisOktato), ResourceType = typeof(DualisResource))]
|
||||
public int OktatokSzama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 05, nameof(DualisResource.DualisCsoport), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.DualisCsoport), ResourceType = typeof(DualisResource))]
|
||||
public int CsoportokSzama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 06, nameof(DualisResource.TantargyNeve), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.TantargyNeve), ResourceType = typeof(DualisResource))]
|
||||
public int TantargyakSzama { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 07, nameof(DualisResource.Helyszin), typeof(DualisResource))]
|
||||
[Display(Name = nameof(DualisResource.Helyszin), ResourceType = typeof(DualisResource))]
|
||||
public int HelyszinekSzama { get; set; }
|
||||
|
||||
public int RogzitoId { get; set; }
|
||||
|
||||
public int? ParentSzervezetId { get; set; }
|
||||
|
||||
[SimpleExportColumn(DualisKepzohelyListajaExportAttributeId, 08, nameof(DualisResource.SzekhelyNeve), typeof(DualisResource))]
|
||||
public string ParentSzervezetName { get; set; }
|
||||
|
||||
public bool IsSzerkesztheto { get; set; }
|
||||
}
|
||||
}
|
215
KretaWeb/Areas/DualisKepzes/Models/DualisKepzohelyModel.cs
Normal file
215
KretaWeb/Areas/DualisKepzes/Models/DualisKepzohelyModel.cs
Normal file
|
@ -0,0 +1,215 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class DualisKepzohelyModel
|
||||
{
|
||||
public DualisKepzohelyModel()
|
||||
{
|
||||
TabList = new List<TabStripItemModel>();
|
||||
}
|
||||
|
||||
public List<TabStripItemModel> TabList { get; set; }
|
||||
|
||||
public int? ID { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.KepzohelyNeve), ResourceType = typeof(DualisResource))]
|
||||
[Required(ErrorMessageResourceName = nameof(DualisResource.KepzohelyNevMegadasaKotelezo), ErrorMessageResourceType = typeof(DualisResource))]
|
||||
[MaxLength(255, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
|
||||
public string KepzohelyNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.KepzohelyAdoszama), ResourceType = typeof(DualisResource))]
|
||||
[Required(ErrorMessageResourceName = nameof(DualisResource.KepzohelyAdoszamaMegadasaKotelezo), ErrorMessageResourceType = typeof(DualisResource))]
|
||||
[AdoszamExtended(ErrorMessageResourceName = nameof(ErrorResource.AdoszamFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
|
||||
[MaxLength(255, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
|
||||
public string KepzohelyAdoszama { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.KepzohelyCime), ResourceType = typeof(DualisResource))]
|
||||
[Required(ErrorMessageResourceName = nameof(DualisResource.KepzohelyCimeMegadasaKotelezo), ErrorMessageResourceType = typeof(DualisResource))]
|
||||
[MaxLength(255, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
|
||||
public string KepzohelyCime { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyszinTipus), ResourceType = typeof(DualisResource))]
|
||||
[Required(ErrorMessageResourceName = nameof(DualisResource.HelyszinTipusMegadasaKotelezo), ErrorMessageResourceType = typeof(DualisResource))]
|
||||
public int? HelyszinTipusId { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyszinTipus), ResourceType = typeof(DualisResource))]
|
||||
public string HelyszinTipusName => HelyszinTipusId.GetDisplayName<DualisHelyszinTipusEnum>(ClaimData.SelectedTanevID.Value);
|
||||
|
||||
public bool IsEditable { get; set; }
|
||||
|
||||
public int? ParentSzervezetId { get; set; }
|
||||
|
||||
public static void ValidateModel(DualisKepzohelyModel model, ModelStateDictionary modelState)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(model.KepzohelyAdoszama.ReplaceMultipleSpacesAndTrim()))
|
||||
{
|
||||
modelState.AddModelError("KepzohelyAdoszama", DualisResource.KepzohelyAdoszamaMegadasaKotelezo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.KepzohelyNeve.ReplaceMultipleSpacesAndTrim()))
|
||||
{
|
||||
modelState.AddModelError("KepzohelyNeve", DualisResource.KepzohelyNevMegadasaKotelezo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.KepzohelyCime.ReplaceMultipleSpacesAndTrim()))
|
||||
{
|
||||
modelState.AddModelError("KepzohelyCime", DualisResource.KepzohelyCimeMegadasaKotelezo);
|
||||
}
|
||||
|
||||
if (!model.HelyszinTipusId.IsEntityId())
|
||||
{
|
||||
modelState.AddModelError("HelyszinTipusId", DualisResource.HelyszinTipusMegadasaKotelezo);
|
||||
}
|
||||
}
|
||||
|
||||
public static DualisKepzohelyCo ConvertModelToCO(DualisKepzohelyModel model)
|
||||
{
|
||||
var co = new DualisKepzohelyCo()
|
||||
{
|
||||
ID = model.ID,
|
||||
KepzohelyNeve = model.KepzohelyNeve.ReplaceMultipleSpacesAndTrim(),
|
||||
KepzohelyAdoszama = model.KepzohelyAdoszama.ReplaceMultipleSpacesAndTrim(),
|
||||
KepzohelyCime = model.KepzohelyCime.ReplaceMultipleSpacesAndTrim(),
|
||||
HelyszinTipusId = model.HelyszinTipusId ?? 0,
|
||||
ParentSzervezetId = model.ParentSzervezetId,
|
||||
};
|
||||
|
||||
return co;
|
||||
}
|
||||
}
|
||||
|
||||
public class DualisCsoportGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisCsoportGridModel() { }
|
||||
|
||||
public DualisCsoportGridModel(DualisCsoportCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
CsoportNeve = itemCo.CsoportNeve;
|
||||
TanulokSzama = itemCo.TanulokSzama;
|
||||
Megjegyzes = itemCo.Megjegyzes;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//CsoportId
|
||||
|
||||
[Display(Name = nameof(DualisResource.CsoportNev), ResourceType = typeof(DualisResource))]
|
||||
public string CsoportNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanulokSzama), ResourceType = typeof(DualisResource))]
|
||||
public int TanulokSzama { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.Megjegyzes), ResourceType = typeof(DualisResource))]
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class DualisTanuloGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisTanuloGridModel() { }
|
||||
|
||||
public DualisTanuloGridModel(DualisTanuloCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
Nev = itemCo.Nev;
|
||||
OktatasiAzonosito = itemCo.OktatasiAzonosito;
|
||||
Adoazonosito = itemCo.Adoazonosito;
|
||||
TajSzam = itemCo.TajSzam;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//TanuloId
|
||||
|
||||
[Display(Name = nameof(DualisResource.Nev), ResourceType = typeof(DualisResource))]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.OktatasiAzonosito), ResourceType = typeof(DualisResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.Adoazonosito), ResourceType = typeof(DualisResource))]
|
||||
public string Adoazonosito { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TajSzam), ResourceType = typeof(DualisResource))]
|
||||
public string TajSzam { get; set; }
|
||||
}
|
||||
|
||||
public class DualisOktatoGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisOktatoGridModel() { }
|
||||
|
||||
public DualisOktatoGridModel(DualisOktatoCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
Nev = itemCo.Nev;
|
||||
OktatasiAzonosito = itemCo.OktatasiAzonosito;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//OktatoId
|
||||
|
||||
[Display(Name = nameof(DualisResource.Nev), ResourceType = typeof(DualisResource))]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.OktatasiAzonosito), ResourceType = typeof(DualisResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class DualisTantargyGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisTantargyGridModel() { }
|
||||
|
||||
public DualisTantargyGridModel(DualisTantargyCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
Nev = itemCo.Nev;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//TantargyId
|
||||
|
||||
[Display(Name = nameof(DualisResource.Nev), ResourceType = typeof(DualisResource))]
|
||||
public string Nev { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class DualisHelyszinGridModel : IKretaIdentity
|
||||
{
|
||||
public DualisHelyszinGridModel() { }
|
||||
|
||||
public DualisHelyszinGridModel(DualisHelyszinCo itemCo)
|
||||
{
|
||||
ID = itemCo.ID.ToString();
|
||||
Nev = itemCo.Nev;
|
||||
HelyisegJelleg = itemCo.HelyisegJelleg;
|
||||
HelyszinTipus = itemCo.HelyszinTipus;
|
||||
Aktiv = itemCo.Aktiv;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//TeremId
|
||||
|
||||
[Display(Name = nameof(DualisResource.Nev), ResourceType = typeof(DualisResource))]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyisegJelleg), ResourceType = typeof(DualisResource))]
|
||||
public string HelyisegJelleg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyszinTipus), ResourceType = typeof(DualisResource))]
|
||||
public string HelyszinTipus { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.Aktiv), ResourceType = typeof(DualisResource))]
|
||||
public string AktivStr { get { return Aktiv ? IgenNemEnum.Igen.GetDisplayName(ClaimData.SelectedTanevID.Value) : IgenNemEnum.Nem.GetDisplayName(ClaimData.SelectedTanevID.Value); } }
|
||||
|
||||
public bool Aktiv { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class DualisKepzohelySearchModel
|
||||
{
|
||||
[Display(Name = nameof(DualisResource.KepzohelyNeve), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.KepzohelyAdoszama), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyAdoszama { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.KepzohelyCime), ResourceType = typeof(DualisResource))]
|
||||
public string KepzohelyCime { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanulokSzamaTol), ResourceType = typeof(DualisResource))]
|
||||
public int? TanulokSzamaTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanulokSzamaIg), ResourceType = typeof(DualisResource))]
|
||||
public int? TanulokSzamaIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.OktatokSzamaTol), ResourceType = typeof(DualisResource))]
|
||||
public int? OktatokSzamaTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.OktatokSzamaIg), ResourceType = typeof(DualisResource))]
|
||||
public int? OktatokSzamaIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.CsoportokSzamaTol), ResourceType = typeof(DualisResource))]
|
||||
public int? CsoportokSzamaTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.CsoportokSzamaIg), ResourceType = typeof(DualisResource))]
|
||||
public int? CsoportokSzamaIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TantargyakSzamaTol), ResourceType = typeof(DualisResource))]
|
||||
public int? TantargyakSzamaTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TantargyakSzamaIg), ResourceType = typeof(DualisResource))]
|
||||
public int? TantargyakSzamaIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyszinSzamaTol), ResourceType = typeof(DualisResource))]
|
||||
public int? HelyszinSzamaTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.HelyszinSzamaIg), ResourceType = typeof(DualisResource))]
|
||||
public int? HelyszinSzamaIg { get; set; }
|
||||
|
||||
public int? SzervezetId { get; set; }
|
||||
|
||||
public DualisKepzohelySearchCo ConvertToCO()
|
||||
{
|
||||
return new DualisKepzohelySearchCo
|
||||
{
|
||||
KepzohelyNeve = KepzohelyNeve,
|
||||
KepzohelyAdoszama = KepzohelyAdoszama,
|
||||
KepzohelyCime = KepzohelyCime,
|
||||
TanulokSzamaTol = TanulokSzamaTol,
|
||||
TanulokSzamaIg = TanulokSzamaIg,
|
||||
OktatokSzamaTol = OktatokSzamaTol,
|
||||
OktatokSzamaIg = OktatokSzamaIg,
|
||||
CsoportokSzamaTol = CsoportokSzamaTol,
|
||||
CsoportokSzamaIg = CsoportokSzamaIg,
|
||||
TantargyakSzamaTol = TantargyakSzamaTol,
|
||||
TantargyakSzamaIg = TantargyakSzamaIg,
|
||||
HelyszinSzamaTol = HelyszinSzamaTol,
|
||||
HelyszinSzamaIg = HelyszinSzamaIg,
|
||||
SzervezetId = SzervezetId
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class DualisSzerzodesGridModel : BaseDualisSzerzodesGridModel
|
||||
{
|
||||
public string ShortFileNev => string.IsNullOrWhiteSpace(FileNev) || Statusz == FileStatuszEnum.NincsFeltoltve ? string.Empty : FileNev.Length > 32 ? $"{FileNev.Substring(0, 32)}..." : FileNev;
|
||||
public FileStatuszEnum Statusz { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class SzakkepzesiMunkaszerzodesGridModel : IKretaIdentity
|
||||
{
|
||||
public const string SzakkepzesiMunkaszerzodesekListajaExportAttributeId = nameof(SzakkepzesiMunkaszerzodesekListajaExportAttributeId);
|
||||
|
||||
public SzakkepzesiMunkaszerzodesGridModel() { }
|
||||
|
||||
public SzakkepzesiMunkaszerzodesGridModel(SzakkepzesiMunkaszerzodesCo itemCo)
|
||||
{
|
||||
TanuloNev = itemCo.TanuloNev;
|
||||
AnyaNev = itemCo.AnyaNev;
|
||||
SzuletesiHelye = itemCo.SzuletesiHelye;
|
||||
SzuletesiDatum = itemCo.SzuletesiDatum;
|
||||
OktatasiAzonosito = itemCo.OktatasiAzonosito;
|
||||
ID = itemCo.TanuloId.ToString();
|
||||
DualisKepzohelyNev = itemCo.DualisKepzohelyNev;
|
||||
DualisKepzohelyAdoszama = itemCo.DualisKepzohelyAdoszama;
|
||||
BevallasKezdete = itemCo.BevallasKezdete?.ToString("yyyy. MMMM") ?? "-";
|
||||
MunkaSzerzodesId = itemCo.MunkaSzerzodesId;
|
||||
}
|
||||
|
||||
public string ID { get; set; }//TanuloId
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 00, nameof(TanuloResource.TanuloNeve), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.TanuloNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string TanuloNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 01, nameof(CommonResource.Honap), typeof(CommonResource))]
|
||||
[Display(Name = nameof(CommonResource.Honap), ResourceType = typeof(CommonResource))]
|
||||
public string BevallasKezdete { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 02, nameof(TanuloResource.AnyjaNeve), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.AnyjaNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string AnyaNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 03, nameof(TanuloResource.SzuletesiHely), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiHely), ResourceType = typeof(TanuloResource))]
|
||||
public string SzuletesiHelye { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 04, nameof(TanuloResource.SzuletesiDatuma), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiDatuma), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiDatum { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 05, nameof(TanuloResource.OktatasiAzonosito), typeof(TanuloResource))]
|
||||
[Display(Name = nameof(TanuloResource.OktatasiAzonosito), ResourceType = typeof(TanuloResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 06, nameof(AlkalmazottResource.DualisKepzohelyNeve), typeof(AlkalmazottResource))]
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyNeve), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyNev { get; set; }
|
||||
|
||||
[SimpleExportColumn(SzakkepzesiMunkaszerzodesekListajaExportAttributeId, 07, nameof(AlkalmazottResource.DualisKepzohelyAdoszama), typeof(AlkalmazottResource))]
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyAdoszama), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyAdoszama { get; set; }
|
||||
|
||||
public int MunkaSzerzodesId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class SzakkepzesiMunkaszerzodesInfoModel
|
||||
{
|
||||
public SzakkepzesiMunkaszerzodesInfoModel(SzakkepzesiMunkaszerzodesInfoCO co)
|
||||
{
|
||||
BevKezd = co.BevKezd?.ToShortDateString();
|
||||
BevVeg = co.BevVeg?.ToShortDateString();
|
||||
BeerkezesDat = co.BeerkezesDat?.ToShortDateString();
|
||||
AdatSzolgCegNeve = co.AdatSzolgCegNeve;
|
||||
AdatSzolgTermCsNev = string.IsNullOrWhiteSpace(co.AdatSzolgTermCsNev) ? string.Empty : co.AdatSzolgTermCsNev;
|
||||
AdatSzolgTermUNev = string.IsNullOrWhiteSpace(co.AdatSzolgTermUNev) ? string.Empty : co.AdatSzolgTermUNev;
|
||||
AdatSzolgTermTeljesNev = $"{AdatSzolgTermCsNev} {AdatSzolgTermUNev}";
|
||||
AdatSzolgSzekhelyOr = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyOr) ? string.Empty : $"{co.AdatSzolgSzekhelyOr}, ";
|
||||
AdatSzolgSzekhelyIr = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyIr) ? string.Empty : co.AdatSzolgSzekhelyIr;
|
||||
AdatSzolgSzekhelyHg = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyHg) ? string.Empty : $"{co.AdatSzolgSzekhelyHg}, ";
|
||||
AdatSzolgSzekhelyKt = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyKt) ? string.Empty : co.AdatSzolgSzekhelyKt;
|
||||
AdatSzolgSzekhelyJel = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyJel) ? string.Empty : co.AdatSzolgSzekhelyJel;
|
||||
AdatSzolgSzekhelySz = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelySz) ? string.Empty : co.AdatSzolgSzekhelySz;
|
||||
AdatSzolgSzekhelyEp = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyEp) ? string.Empty : co.AdatSzolgSzekhelyEp;
|
||||
AdatSzolgSzekhelyLh = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyLh) ? string.Empty : co.AdatSzolgSzekhelyLh;
|
||||
AdatSzolgSzekhelyEm = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyEm) ? string.Empty : co.AdatSzolgSzekhelyEm;
|
||||
AdatSzolgSzekhelyAj = string.IsNullOrWhiteSpace(co.AdatSzolgSzekhelyAj) ? string.Empty : co.AdatSzolgSzekhelyAj;
|
||||
AdatSzolgSzekhely = $"{AdatSzolgSzekhelyOr}{AdatSzolgSzekhelyIr} {AdatSzolgSzekhelyHg}{AdatSzolgSzekhelyKt} {AdatSzolgSzekhelyJel} {AdatSzolgSzekhelySz} {AdatSzolgSzekhelyEp} {AdatSzolgSzekhelyLh} {AdatSzolgSzekhelyEm} {AdatSzolgSzekhelyAj}";
|
||||
AdozoAdoSzam = co.AdozoAdoSzam;
|
||||
TermCsNev = co.TermCsNev;
|
||||
TermUNev = co.TermUNev;
|
||||
TermTeljesNev = $"{TermCsNev} {TermUNev}";
|
||||
TermSzulIdo = co.TermSzulIdo?.ToShortDateString();
|
||||
TermSzulHely = co.TermSzulHely;
|
||||
TAJSzam = co.TAJSzam;
|
||||
TermAzon = co.TermAzon;
|
||||
}
|
||||
|
||||
[Display(Name = nameof(DualisResource.AdozoCegNeve), ResourceType = typeof(DualisResource))]
|
||||
public string AdatSzolgCegNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.DualisPartnerCime), ResourceType = typeof(DualisResource))]
|
||||
public string AdatSzolgSzekhely { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.DualisPartnerEgyeniVallakozoSzemelyneve), ResourceType = typeof(DualisResource))]
|
||||
public string AdatSzolgTermTeljesNev { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.DualisPartnerAdoszama), ResourceType = typeof(DualisResource))]
|
||||
public string AdozoAdoSzam { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.BevallasBeerkezesenekDatuma), ResourceType = typeof(DualisResource))]
|
||||
public string BeerkezesDat { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.BevallasiIdoszakKezdete), ResourceType = typeof(DualisResource))]
|
||||
public string BevKezd { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.BevallasiIdoszakVege), ResourceType = typeof(DualisResource))]
|
||||
public string BevVeg { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanuloTAJSzama), ResourceType = typeof(DualisResource))]
|
||||
public string TAJSzam { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanuloAdoazonositoJele), ResourceType = typeof(DualisResource))]
|
||||
public string TermAzon { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanuloNeve), ResourceType = typeof(DualisResource))]
|
||||
public string TermTeljesNev { get; set; }
|
||||
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanuloSzuletesiHelye), ResourceType = typeof(DualisResource))]
|
||||
public string TermSzulHely { get; set; }
|
||||
|
||||
[Display(Name = nameof(DualisResource.TanuloSzuletesiIdeje), ResourceType = typeof(DualisResource))]
|
||||
public string TermSzulIdo { get; set; }
|
||||
|
||||
private string AdatSzolgSzekhelyAj { get; set; }
|
||||
private string AdatSzolgSzekhelyEm { get; set; }
|
||||
private string AdatSzolgSzekhelyEp { get; set; }
|
||||
private string AdatSzolgSzekhelyHg { get; set; }
|
||||
private string AdatSzolgSzekhelyIr { get; set; }
|
||||
private string AdatSzolgSzekhelyJel { get; set; }
|
||||
private string AdatSzolgSzekhelyKt { get; set; }
|
||||
private string AdatSzolgSzekhelyLh { get; set; }
|
||||
private string AdatSzolgSzekhelyOr { get; set; }
|
||||
private string AdatSzolgSzekhelySz { get; set; }
|
||||
private string AdatSzolgTermCsNev { get; set; }
|
||||
private string AdatSzolgTermUNev { get; set; }
|
||||
private string TermCsNev { get; set; }
|
||||
private string TermUNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.DualisKepzes.Models
|
||||
{
|
||||
public class SzakkepzesiMunkaszerzodesSearchModel
|
||||
{
|
||||
[Display(Name = nameof(CommonResource.Honap), ResourceType = typeof(CommonResource))]
|
||||
public string Honap { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.TanuloNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string NevSearch { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.AnyjaNeve), ResourceType = typeof(TanuloResource))]
|
||||
public string AnyjaNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiHely), ResourceType = typeof(TanuloResource))]
|
||||
public string SzuletesiHely { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiIdo), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiIdoTol { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.SzuletesiIdo), ResourceType = typeof(TanuloResource))]
|
||||
public DateTime? SzuletesiIdoIg { get; set; }
|
||||
|
||||
[Display(Name = nameof(TanuloResource.OktatasiAzonosito), ResourceType = typeof(TanuloResource))]
|
||||
public string OktatasiAzonosito { get; set; }
|
||||
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyNeve), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyNev { get; set; }
|
||||
|
||||
[Display(Name = nameof(AlkalmazottResource.DualisKepzohelyAdoszama), ResourceType = typeof(AlkalmazottResource))]
|
||||
public string DualisKepzohelyAdoszama { get; set; }
|
||||
|
||||
public SzakkepzesiMunkaszerzodesSearchCo ConvertToCo()
|
||||
{
|
||||
return new SzakkepzesiMunkaszerzodesSearchCo
|
||||
{
|
||||
NevSearch = NevSearch,
|
||||
AnyjaNeve = AnyjaNeve,
|
||||
SzuletesiHely = SzuletesiHely,
|
||||
SzuletesiIdoTol = SzuletesiIdoTol,
|
||||
SzuletesiIdoIg = SzuletesiIdoIg,
|
||||
OktatasiAzonosito = OktatasiAzonosito,
|
||||
SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId),
|
||||
DualisKepzohelyNev = DualisKepzohelyNev,
|
||||
DualisKepzohelyAdoszama = DualisKepzohelyAdoszama,
|
||||
Honap = Honap
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
@using Kreta.Web.Helpers;
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@model AdminDualisSzerzodesSearchModel
|
||||
|
||||
@{
|
||||
const string GridName = "AdminDualisSzerzodesGrid";
|
||||
const string SearchForm = "searchForm";
|
||||
}
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar(SearchForm, GridName))
|
||||
{
|
||||
@Html.KretaTextBoxFor(x => x.NevSearch).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.AnyjaNeve).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.SzuletesiHely).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(x => x.SzuletesiIdoTol, x => x.SzuletesiIdoIg)
|
||||
@Html.KretaMaskedTextBoxFor(x => x.OktatasiAzonosito, "00000000000").RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyNev).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyAdoszama).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.TanarId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetSzakOktatasertFelelosListByTanev" })).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.RendelkezikSzerzodessel, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(x => x.FeltoltesDatumTol, x => x.FeltoltesDatumIg)
|
||||
}
|
||||
}
|
||||
|
||||
@{
|
||||
List<FunctionCommand> functions = new List<FunctionCommand> {
|
||||
new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "AdminDualisSzerzodesHelper.getExport" }
|
||||
};
|
||||
}
|
||||
|
||||
<div>
|
||||
|
||||
@(Html.KretaGrid<AdminDualisSzerzodesGridModel>(
|
||||
name: GridName,
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.AdminDualisSzerzodesApi, "GetAdminDualisSzerzodesGrid"),
|
||||
useToolBar: true,
|
||||
dataParameterFunction: SearchForm,
|
||||
allowScrolling: true,
|
||||
sort: sort =>
|
||||
{
|
||||
sort.Add(m => m.Statusz).Ascending();
|
||||
},
|
||||
postRead: true
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.TanuloNev).Width("10%");
|
||||
columns.Bound(c => c.AnyaNev).Width("10%");
|
||||
columns.Bound(c => c.SzuletesiHelye).Width("10%");
|
||||
columns.Bound(c => c.SzuletesiDatum).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("8%");
|
||||
columns.Bound(c => c.OktatasiAzonosito).Width("8%");
|
||||
columns.Bound(c => c.DualisKepzohelyNev).Width("10%");
|
||||
columns.Bound(c => c.DualisKepzohelyAdoszama).Width("10%");
|
||||
columns.Bound(c => c.TanarNev).Width("10%");
|
||||
columns.Bound(c => c.Statusz).Template(@<text></text>).ClientTemplate(@" # if (Statusz == 1) { # <i class='fa fa-check-circle' style='color:green;'></i> # } else { # <i class='fa fa-times' style='color:red;'></i> # } #").Width("5%");
|
||||
columns.Bound(c => c.FeltoltesDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
||||
})
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = CommonResource.Letoltes, ClientAction= "AdminDualisSzerzodesHelper.downloadDokumentum", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Letoltes }
|
||||
}, "AdminDualisSzerzodesHelper.isLetoltheto")
|
||||
.FunctionCommand(Html, functions)
|
||||
.Sortable(sortable =>
|
||||
sortable.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn)
|
||||
)
|
||||
.AutoBind(true)
|
||||
)
|
||||
</div>
|
||||
|
||||
@using (Html.KretaForm("DownloadFile", "AdminDualisSzerzodes", FormMethod.Post, "dokumentumLetolteseForm"))
|
||||
{
|
||||
<div style="float:right;display:none;">
|
||||
@Html.KretaButton("kretaDownloadSubmit", NyomtatvanyokResource.Letoltes, "submit")
|
||||
<div style="float:right;">
|
||||
@Html.Hidden("FileIdHiddenField");
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
var AdminDualisSzerzodesHelper = (function () {
|
||||
var gridName = "@GridName";
|
||||
var searchFormName = "@SearchForm";
|
||||
var adminDualisSzerzodesHelper = function () { };
|
||||
var url = {
|
||||
saveDokumentum: "@Url.Action("UploadFile", "AdminDualisSzerzodes", new { area = "DualisKepzes" })",
|
||||
deleteDokumentum: "@Url.Action("DeleteFile", "AdminDualisSzerzodes", new { area = "DualisKepzes" })",
|
||||
GetExport: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.AdminDualisSzerzodesApi, action = "GetExport" })"
|
||||
};
|
||||
|
||||
adminDualisSzerzodesHelper.getExport = function () {
|
||||
KretaGridHelper.getExportBySearchForm(gridName, url.GetExport, searchFormName);
|
||||
}
|
||||
|
||||
adminDualisSzerzodesHelper.isLetoltheto = function (rowData) {
|
||||
return rowData.Statusz == "@((int)FileStatuszEnum.Feltoltve)";
|
||||
}
|
||||
|
||||
adminDualisSzerzodesHelper.downloadDokumentum = function (rowData) {
|
||||
var fileId = rowData.FileId;
|
||||
$("#FileIdHiddenField").val(fileId);
|
||||
$("#kretaDownloadSubmit").click();
|
||||
}
|
||||
|
||||
return adminDualisSzerzodesHelper;
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,112 @@
|
|||
@using Kreta.Web.Helpers;
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@model AdminDualisSzerzodesSearchModel
|
||||
|
||||
@{
|
||||
const string GridName = "AdminDualisSzerzodesGrid";
|
||||
const string SearchForm = "searchForm";
|
||||
}
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar(SearchForm, GridName))
|
||||
{
|
||||
@Html.KretaTextBoxFor(x => x.NevSearch).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.AnyjaNeve).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.SzuletesiHely).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(x => x.SzuletesiIdoTol, x => x.SzuletesiIdoIg)
|
||||
@Html.KretaMaskedTextBoxFor(x => x.OktatasiAzonosito, "00000000000").RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyNev).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyAdoszama).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.TanarId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetSzakOktatasertFelelosListByTanev" })).RenderSearchPanelSideBar()
|
||||
@Html.KretaComboBoxFor(x => x.RendelkezikSzerzodessel, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(x => x.FeltoltesDatumTol, x => x.FeltoltesDatumIg)
|
||||
}
|
||||
}
|
||||
|
||||
@{
|
||||
List<FunctionCommand> functions = new List<FunctionCommand> {
|
||||
new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "AdminDualisSzerzodesHelper.getExport" }
|
||||
};
|
||||
}
|
||||
|
||||
<div>
|
||||
|
||||
@(Html.KretaGrid<AdminDualisSzerzodesGridModel>(
|
||||
name: GridName,
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.AdminDualisSzerzodesApi, "GetAdminDualisSzerzodesGrid"),
|
||||
useToolBar: true,
|
||||
dataParameterFunction: SearchForm,
|
||||
allowScrolling: true,
|
||||
sort: sort =>
|
||||
{
|
||||
sort.Add(m => m.Statusz).Ascending();
|
||||
},
|
||||
postRead: true
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.TanuloNev).Width("10%");
|
||||
columns.Bound(c => c.AnyaNev).Width("10%");
|
||||
columns.Bound(c => c.SzuletesiHelye).Width("10%");
|
||||
columns.Bound(c => c.SzuletesiDatum).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("8%");
|
||||
columns.Bound(c => c.OktatasiAzonosito).Width("8%");
|
||||
columns.Bound(c => c.DualisKepzohelyNev).Width("10%");
|
||||
columns.Bound(c => c.DualisKepzohelyAdoszama).Width("10%");
|
||||
columns.Bound(c => c.TanarNev).Width("10%");
|
||||
columns.Bound(c => c.Statusz).Template(@<text></text>).ClientTemplate(@" # if (Statusz == 1) { # <i class='fa fa-check-circle' style='color:green;'></i> # } else { # <i class='fa fa-times' style='color:red;'></i> # } #").Width("5%");
|
||||
columns.Bound(c => c.FeltoltesDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
||||
})
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = CommonResource.Letoltes, ClientAction= "AdminDualisSzerzodesHelper.downloadDokumentum", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Letoltes }
|
||||
}, "AdminDualisSzerzodesHelper.isLetoltheto")
|
||||
.FunctionCommand(Html, functions)
|
||||
.Sortable(sortable =>
|
||||
sortable.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn)
|
||||
)
|
||||
.AutoBind(true)
|
||||
)
|
||||
</div>
|
||||
|
||||
@using (Html.KretaForm("DownloadFile", "AdminDualisSzerzodes", FormMethod.Post, "dokumentumLetolteseForm"))
|
||||
{
|
||||
<div style="float:right;display:none;">
|
||||
@Html.KretaButton("kretaDownloadSubmit", NyomtatvanyokResource.Letoltes, "submit")
|
||||
<div style="float:right;">
|
||||
@Html.Hidden("FileIdHiddenField");
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
var AdminDualisSzerzodesHelper = (function () {
|
||||
var gridName = "@GridName";
|
||||
var searchFormName = "@SearchForm";
|
||||
var adminDualisSzerzodesHelper = function () { };
|
||||
var url = {
|
||||
saveDokumentum: "@Url.Action("UploadFile", "AdminDualisSzerzodes", new { area = "DualisKepzes" })",
|
||||
deleteDokumentum: "@Url.Action("DeleteFile", "AdminDualisSzerzodes", new { area = "DualisKepzes" })",
|
||||
GetExport: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.AdminDualisSzerzodesApi, action = "GetExport" })"
|
||||
};
|
||||
|
||||
adminDualisSzerzodesHelper.getExport = function () {
|
||||
KretaGridHelper.getExportBySearchForm(gridName, url.GetExport, searchFormName);
|
||||
}
|
||||
|
||||
adminDualisSzerzodesHelper.isLetoltheto = function (rowData) {
|
||||
return rowData.Statusz == "@((int)FileStatuszEnum.Feltoltve)";
|
||||
}
|
||||
|
||||
adminDualisSzerzodesHelper.downloadDokumentum = function (rowData) {
|
||||
var fileId = rowData.FileId;
|
||||
$("#FileIdHiddenField").val(fileId);
|
||||
$("#kretaDownloadSubmit").click();
|
||||
}
|
||||
|
||||
return adminDualisSzerzodesHelper;
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
Duális csoportok
|
|
@ -0,0 +1,2 @@
|
|||
Dualis tanulók
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Dualis_Tanulok_Tab</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,70 @@
|
|||
@using Kreta.Web.Helpers.Grid;
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
@using Kreta.Enums.ManualEnums;
|
||||
@using Kreta.Resources;
|
||||
@using Kreta.Web.Security;
|
||||
|
||||
@model int
|
||||
|
||||
<div id="partialDetailGrid_@Model.ToString()">
|
||||
@{
|
||||
string gridName = "DualisKepzohelyGrid_" + Model.ToString();
|
||||
}
|
||||
|
||||
@{
|
||||
var rowFunctions = new List<RowFunction> { };
|
||||
var conditionalRowFunctions = new List<RowFunction>();
|
||||
var functionCommands = new List<FunctionCommand> { };
|
||||
|
||||
rowFunctions.Add(new RowFunction { Name = IntezmenyResource.Adatok, ClientAction = "DualisKepzohelyHelper.openInfo", IconEnum = GridRowFunctionIconEnum.Adatok });
|
||||
conditionalRowFunctions.Add(new RowFunction { Name = IntezmenyResource.Modositas, ClientAction = "DualisKepzohelyHelper.openModify", IconEnum = GridRowFunctionIconEnum.Modositas });
|
||||
conditionalRowFunctions.Add(new RowFunction { Name = IntezmenyResource.Torles, ClientAction = "DualisKepzohelyHelper.deleteConfirm", IconEnum = GridRowFunctionIconEnum.Torles });
|
||||
//if (ClaimData.FelhasznaloSzerepkor == Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
//{
|
||||
// functionCommands.Add(new FunctionCommand { Name = IntezmenyResource.Uj, ClientAction = "DualisKepzohelyHelper.openNew" });
|
||||
//}
|
||||
functionCommands.Add(new FunctionCommand { Name = IntezmenyResource.KijeloltekTorlese, ClientAction = "function() { DualisKepzohelyHelper.deleteSelected('" + gridName + "'); }", Classes = "kendo-gridFunctionKommandRed" });
|
||||
|
||||
var gridDetail =
|
||||
Html.KretaGrid<DualisKepzohelyGridModel>
|
||||
(
|
||||
name: gridName,
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisKepzohelyGrid", new Dictionary<string, string> {
|
||||
{ "parentId", Model.ToString() }
|
||||
}),
|
||||
allowScrolling: false,
|
||||
sort: sort => sort.Add(m => m.KepzohelyNeve).Ascending()
|
||||
)
|
||||
.AutoBind(true)
|
||||
.SelectBoxColumn(Html, string.Empty);
|
||||
if (!ClaimData.IsSelectedTanevIsElozo)
|
||||
{
|
||||
gridDetail.LinkButtonColumn(string.Empty, c => c.KepzohelyNeve, "DualisKepzohelyHelper.openModifyOropenInfo", GridButtonsEnum.Modositas, width: "20%");
|
||||
}
|
||||
else
|
||||
{
|
||||
gridDetail.Columns(columns => {columns.Bound(c => c.KepzohelyNeve).Width("20%"); });
|
||||
}
|
||||
gridDetail.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.ID).Hidden();
|
||||
columns.Bound(c => c.KepzohelyAdoszama).Width("20%");
|
||||
columns.Bound(c => c.KepzohelyCime);
|
||||
columns.Bound(c => c.TanulokSzama);
|
||||
columns.Bound(c => c.OktatokSzama);
|
||||
columns.Bound(c => c.CsoportokSzama);
|
||||
columns.Bound(c => c.TantargyakSzama);
|
||||
columns.Bound(c => c.HelyszinekSzama);
|
||||
})
|
||||
.RowFunction(Html, rowFunctions, rowFunctions.Count)
|
||||
.ConditionalRowFunction(Html, conditionalRowFunctions, "DualisKepzohelyHelper.isSzerkesztheto", conditionalRowFunctions.Count)
|
||||
.FunctionCommand(Html, functionCommands)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn));
|
||||
}
|
||||
<div>
|
||||
@(gridDetail)
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Models.EditorTemplates;
|
||||
@model TabStripModel
|
||||
|
||||
@using (Html.KretaForm("DualisKepzohelyForm"))
|
||||
{
|
||||
@Html.KretaValidationSummary()
|
||||
|
||||
<div id="NewDualisKepzohelyTabStrip">@Html.Partial(@"EditorTemplates\TabStrip", Model.TabList)</div>
|
||||
@Html.KretaTabStrip("NewDualisKepzohelyTabStrip").RenderOnModal();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<h4>@DualisResource.TabCsoportok</h4>
|
||||
@(
|
||||
Html.KretaGrid<DualisCsoportGridModel>(
|
||||
name: "DualisCsoportGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisCsoportGrid", new Dictionary<string, string> { { "Id", Model.ID.Value.ToString() } })
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.CsoportNeve);
|
||||
columns.Bound(c => c.TanulokSzama);
|
||||
columns.Bound(c => c.Megjegyzes);
|
||||
})
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
<br />
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<h4>@DualisResource.TabHelyszinek</h4>
|
||||
@(
|
||||
Html.KretaGrid<DualisHelyszinGridModel>(
|
||||
name: "DualisHelyszinGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisHelyszinGrid", new Dictionary<string, string> { { "Id", Model.ID.Value.ToString() } })
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Nev);
|
||||
columns.Bound(c => c.HelyisegJelleg);
|
||||
columns.Bound(c => c.HelyszinTipus);
|
||||
columns.Bound(c => c.AktivStr);
|
||||
})
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
<br />
|
||||
</div>
|
|
@ -0,0 +1,27 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<h4>@DualisResource.TabOktatok</h4>
|
||||
@(
|
||||
Html.KretaGrid<DualisOktatoGridModel>(
|
||||
name: "DualisOktatoGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisOktatoGrid", new Dictionary<string, string> { { "Id", Model.ID.Value.ToString() } })
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Nev);
|
||||
columns.Bound(c => c.OktatasiAzonosito);
|
||||
})
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
<br />
|
||||
</div>
|
|
@ -0,0 +1,26 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<h4>@DualisResource.TabTantargyak</h4>
|
||||
@(
|
||||
Html.KretaGrid<DualisTantargyGridModel>(
|
||||
name: "DualisTantargyGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisTantargyGrid", new Dictionary<string, string> { { "Id", Model.ID.Value.ToString() } })
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Nev);
|
||||
})
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
<br />
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Resources
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<h4>@DualisResource.TabTanulok</h4>
|
||||
@(
|
||||
Html.KretaGrid<DualisTanuloGridModel>(
|
||||
name: "DualisTanuloGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisTanuloGrid", new Dictionary<string, string> { { "Id", Model.ID.Value.ToString() } })
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Nev);
|
||||
columns.Bound(c => c.OktatasiAzonosito);
|
||||
columns.Bound(c => c.Adoazonosito);
|
||||
columns.Bound(c => c.TajSzam);
|
||||
})
|
||||
.AutoBind(true)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
<br />
|
||||
</div>
|
269
KretaWeb/Areas/DualisKepzes/Views/DualisKepzohely/Index.cshtml
Normal file
269
KretaWeb/Areas/DualisKepzes/Views/DualisKepzohely/Index.cshtml
Normal file
|
@ -0,0 +1,269 @@
|
|||
@using Kreta.Web.Helpers.Grid;
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models;
|
||||
@using Kreta.Enums.ManualEnums;
|
||||
@using Kreta.Resources;
|
||||
@using Kreta.Web.Security;
|
||||
|
||||
@model DualisKepzohelySearchModel
|
||||
|
||||
@{
|
||||
const string gridName = "DualisKepzohelyGrid";
|
||||
const string searchFormName = "searchForm";
|
||||
}
|
||||
@section AddSearchPanel {
|
||||
|
||||
@using (Html.SearchPanelSideBar(searchFormName, gridName))
|
||||
{
|
||||
@Html.HiddenFor(x => x.SzervezetId)
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyNeve).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyAdoszama).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyCime).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeNumericSideBar(x => x.TanulokSzamaTol, x => x.TanulokSzamaIg, precision: 0, needTolIgLabels: true, step: 1.0)
|
||||
@Html.KretaRangeNumericSideBar(x => x.OktatokSzamaTol, x => x.OktatokSzamaIg, precision: 0, needTolIgLabels: true, step: 1.0)
|
||||
@Html.KretaRangeNumericSideBar(x => x.CsoportokSzamaTol, x => x.CsoportokSzamaIg, precision: 0, needTolIgLabels: true, step: 1.0)
|
||||
@Html.KretaRangeNumericSideBar(x => x.TantargyakSzamaTol, x => x.TantargyakSzamaIg, precision: 0, needTolIgLabels: true, step: 1.0)
|
||||
@Html.KretaRangeNumericSideBar(x => x.HelyszinSzamaTol, x => x.HelyszinSzamaIg, precision: 0, needTolIgLabels: true, step: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@{
|
||||
var rowFunctions = new List<RowFunction> { };
|
||||
var functionCommands = new List<FunctionCommand> { };
|
||||
var conditionalRowFunctions = new List<RowFunction> { };
|
||||
|
||||
conditionalRowFunctions.Add(new RowFunction { Name = IntezmenyResource.Modositas, ClientAction = "DualisKepzohelyHelper.openModify", IconEnum = GridRowFunctionIconEnum.Modositas });
|
||||
rowFunctions.Add(new RowFunction { Name = IntezmenyResource.Adatok, ClientAction = "DualisKepzohelyHelper.openInfo", IconEnum = GridRowFunctionIconEnum.Adatok });
|
||||
conditionalRowFunctions.Add(new RowFunction { Name = IntezmenyResource.Torles, ClientAction = "DualisKepzohelyHelper.deleteConfirm", IconEnum = GridRowFunctionIconEnum.Torles });
|
||||
if (ClaimData.FelhasznaloSzerepkor == Kreta.Enums.SzerepkorTipusEnum.Adminisztrator)
|
||||
{
|
||||
functionCommands.Add(new FunctionCommand { Name = IntezmenyResource.Uj, ClientAction = "DualisKepzohelyHelper.openNew" });
|
||||
functionCommands.Add(new FunctionCommand { Name = IntezmenyResource.KijeloltekTorlese, ClientAction = "function() { DualisKepzohelyHelper.deleteSelected('" + gridName + "'); }", Classes = "kendo-gridFunctionKommandRed" });
|
||||
}
|
||||
functionCommands.Add(new FunctionCommand
|
||||
{
|
||||
Name = ImportExportCommonResource.Export.ToUpper(),
|
||||
NestedCommands = new List<FunctionCommand>
|
||||
{
|
||||
new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "DualisKepzohelyHelper.getExport" }
|
||||
}
|
||||
});
|
||||
|
||||
var grid =
|
||||
Html.KretaGrid<DualisKepzohelyGridModel>
|
||||
(
|
||||
name: gridName,
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisKepzohelyApi, "GetDualisKepzohelyGrid", new Dictionary<string, string> { { "parentId", "" } }),
|
||||
dataParameterFunction: searchFormName,
|
||||
clientTemplate: "detailGrid-template",
|
||||
clientTemplateUrl: @Url.Action("GetAlSzervezetek", Constants.Controllers.DualisKepzohely, new { area = Constants.Areas.DualisKepzes }),
|
||||
allowScrolling: true,
|
||||
sort: sort => sort.Add(m => m.KepzohelyNeve).Ascending()
|
||||
)
|
||||
.SelectBoxColumn(Html, string.Empty);
|
||||
if (!ClaimData.IsSelectedTanevIsElozo)
|
||||
{
|
||||
grid.LinkButtonColumn(string.Empty, c => c.KepzohelyNeve, "DualisKepzohelyHelper.openModifyOropenInfo", GridButtonsEnum.Modositas, width: "20%");
|
||||
}
|
||||
else
|
||||
{
|
||||
grid.Columns(columns => {columns.Bound(c => c.KepzohelyNeve).Width("20%"); });
|
||||
}
|
||||
grid.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.ID).Hidden();
|
||||
columns.Bound(c => c.KepzohelyAdoszama).Width("20%");
|
||||
columns.Bound(c => c.KepzohelyCime);
|
||||
columns.Bound(c => c.TanulokSzama);
|
||||
columns.Bound(c => c.OktatokSzama);
|
||||
columns.Bound(c => c.CsoportokSzama);
|
||||
columns.Bound(c => c.TantargyakSzama);
|
||||
columns.Bound(c => c.HelyszinekSzama);
|
||||
})
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = IntezmenyResource.Uj, ClientAction = "DualisKepzohelyHelper.openNewSub", IconEnum = GridRowFunctionIconEnum.Uj }
|
||||
}, "DualisKepzohelyHelper.isUjAdhato", 1)
|
||||
.RowFunction(Html, rowFunctions)
|
||||
.FunctionCommand(Html, functionCommands)
|
||||
.ConditionalRowFunction(Html, conditionalRowFunctions, "DualisKepzohelyHelper.isSzerkesztheto", 2)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn));
|
||||
}
|
||||
<div>
|
||||
@(grid)
|
||||
</div>
|
||||
@Html.KretaGridTemplate("detailGrid-template")
|
||||
<script type="text/javascript">
|
||||
var DualisKepzohelyHelper = (function () {
|
||||
var gridName = "@gridName";
|
||||
var formName = "DualisKepzohelyForm";
|
||||
var searchFormName = "@searchFormName";
|
||||
var popupId = "DualisKepzohelyWindow";
|
||||
var dualisKepzohelyHelper = function () { };
|
||||
var isEditable =false;
|
||||
var url = {
|
||||
DeleteDualisKepzoHely: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.DualisKepzohelyApi, action = "DeleteDualisKepzoHely" })",
|
||||
OpenNewModify: "@Url.Action("OpenModifyAddPopup", Constants.Controllers.DualisKepzohely, new { area = Constants.Areas.DualisKepzes })",
|
||||
OpenInfo: "@Url.Action("OpenInfoPopup", Constants.Controllers.DualisKepzohely, new { area = Constants.Areas.DualisKepzes })",
|
||||
DeleteSelected: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = Constants.ApiControllers.DualisKepzohelyApi, action= "DeleteSelectedDualisKepzoHely" })",
|
||||
ValidateSaveModifiedOrNew: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.DualisKepzohelyApi, action = "ValidateSaveModifiedOrNewDualisKepzoHely" })",
|
||||
SaveDualisKepzoHely: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.DualisKepzohelyApi, action = "SaveDualisKepzoHely" })",
|
||||
GetExport: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.DualisKepzohelyApi, action = "GetExport" })"
|
||||
};
|
||||
|
||||
dualisKepzohelyHelper.getExport = function () {
|
||||
KretaGridHelper.getExportBySearchForm(gridName, url.GetExport, searchFormName)
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.openModify = function (rowData) {
|
||||
isEditable = true;
|
||||
AjaxHelper.DoGet(url.OpenNewModify, { Id: rowData.ID, parentSzervezetId: rowData.ParentSzervezetId }, popUpModify);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.openNew = function (data) {
|
||||
AjaxHelper.DoGet(url.OpenNewModify, { Id: null, parentSzervezetId: null }, popUpNew);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.openNewSub = function (data) {
|
||||
AjaxHelper.DoGet(url.OpenNewModify, { Id: null, parentSzervezetId: data.ID }, popUpNew);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.openInfo = function (rowData) {
|
||||
isEditable = false;
|
||||
AjaxHelper.DoGet(url.OpenInfo, { Id: rowData.ID }, popUpModify);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.deleteConfirm = function (rowData) {
|
||||
var postData = { id: rowData.ID };
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.Figyelmeztetes)", "@(CommonResource.BiztosanTorli)", deleteDualisKepzohely, postData);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.deleteSelected = function (currentGridName) {
|
||||
var selectedRows = KretaGridHelper.getSelectedRowsByGridName(currentGridName);
|
||||
if (!selectedRows.every((x) => dualisKepzohelyHelper.isSzerkesztheto(x)))
|
||||
{
|
||||
KretaWindowHelper.warningWindow("@(CommonResource.Figyelmeztetes)", "@(IntezmenyResource.NincsMindenKijeloltElemhezSzerkesztesTorlesJogosultsaga)");
|
||||
return;
|
||||
}
|
||||
if (selectedRows.length > 0) {
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.Figyelmeztetes)", "@(IntezmenyResource.ARendszerCsakAzonSorokatTorliAmelyeknekNincsenekKapcsolataiARendszerbenBiztosanTorliAzAdatokat)", function () { deleteSelected(selectedRows); });
|
||||
}
|
||||
else {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Figyelmeztetes)", "@(IntezmenyResource.AKijeloltElemekTorlesehezJeloljonKiLegalabbEgyElemet)", true, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.modifyAddSave = function () {
|
||||
var formObject = $("#" + formName).toObject();
|
||||
AjaxHelper.DoValidationPost(url.SaveDualisKepzoHely, formName, formObject, modifyAddSaveFeedBackOk);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.openModifyOropenInfo = function (data) {
|
||||
if (!dualisKepzohelyHelper.isSzerkesztheto(data)) {
|
||||
dualisKepzohelyHelper.openInfo(data);
|
||||
}
|
||||
else {
|
||||
dualisKepzohelyHelper.openModify(data);
|
||||
}
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.modifyAddCancel = function () {
|
||||
KretaWindowHelper.destroyWindow(popupId);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.isSzerkesztheto = function (data)
|
||||
{
|
||||
return CommonUtils.parseBool(data.IsSzerkesztheto);
|
||||
}
|
||||
|
||||
dualisKepzohelyHelper.isUjAdhato = function (data)
|
||||
{
|
||||
return data.ParentSzervezetId === null;
|
||||
}
|
||||
|
||||
function modifyAddSaveFeedBackOk(data) {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow);
|
||||
if (data && data.parentId) {
|
||||
KretaGridHelper.refreshGrid("DualisKepzohelyGrid_" + data.parentId);
|
||||
}
|
||||
else {
|
||||
KretaGridHelper.refreshGridSearchPanel(gridName, searchFormName);
|
||||
}
|
||||
}
|
||||
|
||||
function popUpModify(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
if (isEditable) {
|
||||
config.title = "@(DualisResource.KepzohelyModositasa)";
|
||||
}
|
||||
else {
|
||||
config.title = "@(DualisResource.KepzohelyAdatai)";
|
||||
}
|
||||
config.content = data;
|
||||
var modal = KretaWindowHelper.createWindow(popupId, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
|
||||
var title = $("#" +popupId+"_wnd_title").text();
|
||||
var kepzohelyneve = $(".kepzohelyneve").val();
|
||||
var kepzohelyadoszama = $(".kepzohelyadoszama").val();
|
||||
if (CommonUtils.isNullOrUndefined(kepzohelyneve)) {
|
||||
kepzohelyneve = $("[displayfor='KepzohelyNeve']").text();
|
||||
}
|
||||
if (CommonUtils.isNullOrUndefined(kepzohelyadoszama)) {
|
||||
kepzohelyadoszama = $("[displayfor='KepzohelyAdoszama']").text();
|
||||
}
|
||||
if (!CommonUtils.isNullOrUndefined(kepzohelyneve))
|
||||
{
|
||||
title += " [" + kepzohelyneve;
|
||||
if (!CommonUtils.isNullOrUndefined(kepzohelyadoszama))
|
||||
{
|
||||
title += " - " + kepzohelyadoszama;
|
||||
}
|
||||
title += "] ";
|
||||
$("#" + popupId + "_wnd_title").text(title);
|
||||
}
|
||||
}
|
||||
|
||||
function popUpNew(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@(DualisResource.KepzohelyFelvetele)";
|
||||
config.content = data;
|
||||
var modal = KretaWindowHelper.createWindow(popupId, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function deleteDualisKepzohely(postData) {
|
||||
AjaxHelper.DoPostQuery(url.DeleteDualisKepzoHely, null, postData, deleteSuccessCallBack, deleteErrorCallBack);
|
||||
}
|
||||
|
||||
function deleteErrorCallBack(data) {
|
||||
var message = data.responseJSON.Message;
|
||||
KretaWindowHelper.feedbackWindow(Globalization.Hiba /*HIBA*/, message, true, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function deleteSelected(selectedRows) {
|
||||
var parameters = [];
|
||||
$.each(selectedRows, function (index, value) {
|
||||
parameters.push(value.ID);
|
||||
});
|
||||
|
||||
AjaxHelper.DoPost(url.DeleteSelected, parameters, deleteSelectedResponseOk, deleteSelectedResponseError);
|
||||
}
|
||||
|
||||
function deleteSelectedResponseError(data) {
|
||||
KretaGridHelper.refreshGridSearchPanel(gridName, searchFormName);
|
||||
AjaxHelper.ShowError(data);
|
||||
}
|
||||
|
||||
function deleteSelectedResponseOk(data) {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow, data.Message);
|
||||
KretaGridHelper.refreshGridSearchPanel(gridName, searchFormName);
|
||||
}
|
||||
|
||||
function deleteSuccessCallBack() {
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
}
|
||||
|
||||
return dualisKepzohelyHelper;
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,52 @@
|
|||
@using Kreta.Enums
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
|
||||
@model DualisKepzohelyModel
|
||||
|
||||
<div class="container-fluid details">
|
||||
@Html.HiddenFor(x => x.ID)
|
||||
@Html.HiddenFor(x => x.IsEditable)
|
||||
@Html.HiddenFor(x => x.ParentSzervezetId)
|
||||
|
||||
<div class="row">
|
||||
@if (Model.IsEditable)
|
||||
{
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyNeve, new Dictionary<string, object> { { "class", "kepzohelyneve" } }).RenderWithName(3, 3)
|
||||
if (Model.HelyszinTipusId == (int)DualisHelyszinTipusEnum.telephely)
|
||||
{
|
||||
@Html.KretaLabelFor(x => x.KepzohelyAdoszama, 3, 3)
|
||||
@Html.HiddenFor(x => x.KepzohelyAdoszama)
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyAdoszama, new Dictionary<string, object> { { "class", "kepzohelyadoszama" } }).RenderWithName(3, 3)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.KretaLabelFor(x => x.KepzohelyNeve, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.KepzohelyAdoszama, 3, 3)
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (Model.IsEditable)
|
||||
{
|
||||
@Html.KretaTextBoxFor(x => x.KepzohelyCime).RenderWithName(3, 3)
|
||||
if (Model.ParentSzervezetId.HasValue)
|
||||
{
|
||||
@Html.KretaComboBoxFor(x => x.HelyszinTipusId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = Constants.ComboBoxHelperApiActions.GetHelyszinTipusList, parentId = Model.ParentSzervezetId })).AutoBind(true).RenderWithName(3, 3)
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.HiddenFor(x => x.HelyszinTipusId)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.KretaLabelFor(x => x.KepzohelyCime, 3,3)
|
||||
@Html.KretaLabelFor(x => x.HelyszinTipusName, 3, 3)
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
177
KretaWeb/Areas/DualisKepzes/Views/DualisSzerzodes/Index.cshtml
Normal file
177
KretaWeb/Areas/DualisKepzes/Views/DualisSzerzodes/Index.cshtml
Normal file
|
@ -0,0 +1,177 @@
|
|||
@using Kreta.Web.Helpers;
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
|
||||
<div>
|
||||
<div class="container-fluid">
|
||||
<div class="row" style="padding:0px; margin:0px; min-height: auto;">
|
||||
<label>Maximálisan megengedett fájlméret feltöltésenként: 15 MB</label>
|
||||
</div>
|
||||
<div class="row" style="padding:0px; margin:0px; min-height: auto;">
|
||||
<label>Feltölthető fájlformátumok: .pdf, .png, .bmp, .jpeg, .jpg</label>
|
||||
</div>
|
||||
</div>
|
||||
@(
|
||||
Html.KretaGrid<DualisSzerzodesGridModel>(
|
||||
name: "DualisSzerzodesGrid",
|
||||
getUrl: new GridApiUrl(Constants.ApiControllers.DualisSzerzodesApi, "GetDualisSzerzodesGrid", new Dictionary<string, string> { }),
|
||||
sort: sort => sort.Add(c => c.Statusz).Ascending(),
|
||||
allowScrolling: true
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.TanuloNev).Width("20%");
|
||||
columns.Bound(c => c.AnyaNev).Width("20%");
|
||||
columns.Bound(c => c.SzuletesiHelye).Width("15%");
|
||||
columns.Bound(c => c.SzuletesiDatum).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
||||
columns.Bound(c => c.OktatasiAzonosito).Width("10%");
|
||||
columns.Bound(c => c.Statusz).Template(@<text></text>).ClientTemplate(@" # if (Statusz == 1) { # <i class='fa fa-check-circle' style='color:green;'></i> # } else { # <i class='fa fa-times' style='color:red;'></i> # } #").Width("5%");
|
||||
columns.Bound(c => c.FeltoltesDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("10%");
|
||||
})
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = CommonResource.Letoltes, ClientAction= "DualisSzerzodesHelper.downloadDokumentum", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Letoltes }
|
||||
}, "DualisSzerzodesHelper.isLetoltheto")
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = CommonResource.Torles, ClientAction= "DualisSzerzodesHelper.deleteConfirm", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Torles }
|
||||
}, "DualisSzerzodesHelper.isTorolheto")
|
||||
.ConditionalRowFunction(Html, new List<RowFunction> {
|
||||
new RowFunction { Name = CommonResource.Feltoltes, ClientAction= "DualisSzerzodesHelper.maskedClick", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Feltoltes }
|
||||
}, "DualisSzerzodesHelper.isFeltoltheto")
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
.AutoBind(true)
|
||||
)
|
||||
</div>
|
||||
|
||||
@using (Html.KretaForm("DownloadFile", "DualisSzerzodes", FormMethod.Post, "dokumentumLetolteseForm"))
|
||||
{
|
||||
<div style="float:right;display:none;">
|
||||
@Html.KretaButton("kretaDownloadSubmit", NyomtatvanyokResource.Letoltes, "submit")
|
||||
<div style="float:right;">
|
||||
@Html.Hidden("FileIdHiddenField");
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div id="FileInputContainer" class="fileInputContainer" style="display:none;">
|
||||
@Html.KretaAsyncFileUpload("DualisSzerzodesDokumentum",
|
||||
onSelectEvent: "function(e){ DualisSzerzodesHelper.onSelect(e); }",
|
||||
onUploadEvent: "function(e) { DualisSzerzodesHelper.uploadDokumentum(e);}",
|
||||
onErrorEvent: "function(e) { DualisSzerzodesHelper.onError(e); }",
|
||||
onCompleteEvent: "function(e) { DualisSzerzodesHelper.onComplete(e); }",
|
||||
allowMultiple: false,
|
||||
selectText: "Feltöltés",
|
||||
htmlAttributes: new Dictionary<string, object> { { "accept", ".pdf,.png,.bmp,.jpeg,.jpg" } })
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var DualisSzerzodesHelper = (function () {
|
||||
var gridName = "DualisSzerzodesGrid";
|
||||
var dualisSzerzodesHelper = function () { };
|
||||
var url = {
|
||||
saveDokumentum: "@Url.Action("UploadFile", "DualisSzerzodes", new { area = "DualisKepzes" })",
|
||||
deleteDokumentum: "@Url.Action("DeleteFile", "DualisSzerzodes", new { area = "DualisKepzes" })"
|
||||
};
|
||||
|
||||
dualisSzerzodesHelper.isFeltoltheto = function (rowData) {
|
||||
return true;@*rowData.Statusz == "@((int)FileStatuszEnum.NincsFeltoltve)";*@
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.isTorolheto = function (rowData) {
|
||||
return rowData.Statusz == "@((int)FileStatuszEnum.Feltoltve)";
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.isLetoltheto = function (rowData) {
|
||||
return rowData.Statusz == "@((int)FileStatuszEnum.Feltoltve)";
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.onSelect = function (e) {
|
||||
KretaFileUpload.StopAnimation();
|
||||
var allowedFileExtensionArray = [".pdf", ".png", ".bmp", ".jpeg", ".jpg"];
|
||||
const megaByte = 1024 * 1024;
|
||||
var attachmentMaxFileSizeInBytes = 15 * megaByte;
|
||||
var attachments = e.files;
|
||||
for(var i = 0; i<attachments.length;i++){
|
||||
if (attachmentMaxFileSizeInBytes<attachments[i].size){
|
||||
e.preventDefault();
|
||||
var errorMessage = "@ErrorResource.HibaTortentXMBNalNemLehetNagyobbAFajlMerete";
|
||||
errorMessage=errorMessage.replace("{0}",attachmentMaxFileSizeInBytes/(1024*1024));
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", errorMessage, true);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($.inArray(attachments[i].extension.toLowerCase(), allowedFileExtensionArray)===-1){
|
||||
e.preventDefault();
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba","@ErrorResource.AFajlKiterjeszteseVagyTipusaNemMegfelelo", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.uploadDokumentum = function (e) {
|
||||
var tanuloId = $(".fileInputContainer").attr('data-tanuloId');
|
||||
var token = $("input[name='__RequestVerificationToken']").val();
|
||||
e.sender.options.async.saveUrl = url.saveDokumentum;
|
||||
e.data = { TanuloId: tanuloId };
|
||||
var xhr = e.XMLHttpRequest;
|
||||
if (xhr) {
|
||||
xhr.addEventListener("readystatechange", function (e) {
|
||||
if (xhr.readyState == 1 /* OPENED */) {
|
||||
xhr.setRequestHeader("X-Request-Verification-Token", token);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.onComplete = function (e) {
|
||||
$(".fileInputContainer").attr('data-tanuloId','0');
|
||||
successCallBack();
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.onError = function (e) {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@ErrorResource.SikertelenFeltoltesKotelezoDokumentumon", true);
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.downloadDokumentum = function (rowData) {
|
||||
var fileId = rowData.FileId;
|
||||
$("#FileIdHiddenField").val(fileId);
|
||||
$("#kretaDownloadSubmit").click();
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.maskedClick = function (rowData) {
|
||||
if (rowData.Statusz == "@FileStatuszEnum.Feltoltve") {
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.Kerdes)", "@(CommonResource.FeltoltesFigyelmeztetes)", function () { uploadDualisSzerzodes(rowData); });
|
||||
}
|
||||
else {
|
||||
uploadDualisSzerzodes(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
dualisSzerzodesHelper.deleteConfirm = function (rowData) {
|
||||
var postData = { id: rowData.SzerzodesFileId };
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.BiztosanTorli)", "@(CommonResource.FajlTorlesFigyelmeztetes)", deleteDualisSzerzodes, postData);
|
||||
}
|
||||
|
||||
function deleteDualisSzerzodes(postData) {
|
||||
AjaxHelper.DoPostQuery(url.deleteDokumentum, null, postData, successCallBack, deleteErrorCallBack);
|
||||
}
|
||||
|
||||
function uploadDualisSzerzodes(rowData) {
|
||||
var tanuloId = rowData.ID;
|
||||
$(".fileInputContainer").attr('data-tanuloId', tanuloId.toString());
|
||||
$("#DualisSzerzodesDokumentum").click();
|
||||
}
|
||||
|
||||
function deleteErrorCallBack() {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@ErrorResource.SikertelenTorles", true);
|
||||
}
|
||||
|
||||
function successCallBack() {
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
}
|
||||
|
||||
return dualisSzerzodesHelper;
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,105 @@
|
|||
@using Kreta.Web.Helpers;
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
|
||||
@model SzakkepzesiMunkaszerzodesSearchModel
|
||||
|
||||
@{
|
||||
const string GridName = "SzakkepzesiMunkaszerzodesGrid";
|
||||
const string SearchForm = "searchForm";
|
||||
}
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar(SearchForm, GridName))
|
||||
{
|
||||
@Html.KretaComboBoxFor(x => x.Honap, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.SzakkepzesiMunkaszerzodesApi, action = "GetHonapokEnumList" }), useGroup: true, isSingleElementSet: false).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.NevSearch).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.AnyjaNeve).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.SzuletesiHely).RenderSearchPanelSideBar()
|
||||
@Html.KretaRangeDatePickerSideBar(x => x.SzuletesiIdoTol, x => x.SzuletesiIdoIg)
|
||||
@Html.KretaMaskedTextBoxFor(x => x.OktatasiAzonosito, "00000000000").RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyNev).RenderSearchPanelSideBar()
|
||||
@Html.KretaTextBoxFor(x => x.DualisKepzohelyAdoszama).RenderSearchPanelSideBar()
|
||||
}
|
||||
}
|
||||
|
||||
@{ var functions = new List<FunctionCommand>
|
||||
{
|
||||
new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "SzakkepzesiMunkaszerzodesHelper.getExport" }
|
||||
};
|
||||
}
|
||||
|
||||
<div>
|
||||
|
||||
@(Html.KretaGrid<SzakkepzesiMunkaszerzodesGridModel>(
|
||||
GridName,
|
||||
new GridApiUrl(Constants.ApiControllers.SzakkepzesiMunkaszerzodesApi, "GetSzakkepzesiMunkaszerzodesGrid"),
|
||||
useToolBar: true,
|
||||
dataParameterFunction: SearchForm,
|
||||
allowScrolling: true,
|
||||
postRead: true
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.TanuloNev);
|
||||
columns.Bound(c => c.BevallasKezdete);
|
||||
columns.Bound(c => c.AnyaNev);
|
||||
columns.Bound(c => c.SzuletesiHelye);
|
||||
columns.Bound(c => c.SzuletesiDatum).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
columns.Bound(c => c.OktatasiAzonosito);
|
||||
columns.Bound(c => c.DualisKepzohelyNev);
|
||||
columns.Bound(c => c.DualisKepzohelyAdoszama);
|
||||
})
|
||||
.FunctionCommand(Html, functions)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn)
|
||||
)
|
||||
.AutoBind(true)
|
||||
.RowFunction(Html, new List<RowFunction>
|
||||
{
|
||||
new RowFunction { Name = CommonResource.Adatok, ClientAction = "SzakkepzesiMunkaszerzodesHelper.infoSzakkepzesiMunkaszerzodesAdatok", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Adatok }
|
||||
}))
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var SzakkepzesiMunkaszerzodesHelper = (function() {
|
||||
var szakkepzesiMunkaszerzodesHelper = function() {};
|
||||
|
||||
var gridName = "@GridName";
|
||||
var searchFormName = "@SearchForm";
|
||||
var url = {
|
||||
GetExport: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.SzakkepzesiMunkaszerzodesApi, action = "GetExport" })",
|
||||
OpenInfoSzakkepzesiMunkaszerzodesAdatok: "@Url.Action("OpenInfoSzakkepzesiMunkaszerzodesAdatokPopup", Constants.Controllers.SzakkepzesiMunkaszerzodes, new { area = "DualisKepzes" })",
|
||||
};
|
||||
|
||||
szakkepzesiMunkaszerzodesHelper.getExport = function() {
|
||||
KretaGridHelper.getExportBySearchForm(gridName, url.GetExport, searchFormName);
|
||||
};
|
||||
|
||||
szakkepzesiMunkaszerzodesHelper.infoSzakkepzesiMunkaszerzodesAdatok = function(data) {
|
||||
var postData = { Id: data.MunkaSzerzodesId };
|
||||
AjaxHelper.DoPost(url.OpenInfoSzakkepzesiMunkaszerzodesAdatok, postData, popUpInfoTovabbiMunkaugyiAdatokWindow);
|
||||
};
|
||||
|
||||
function popUpInfoTovabbiMunkaugyiAdatokWindow(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@(DualisResource.SzakkepzeiMunkaszerzofesAdatai)";
|
||||
config.maxWidth = "75%";
|
||||
config.height = "75%";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow("infoWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
szakkepzesiMunkaszerzodesHelper.infoCancel = function() {
|
||||
KretaWindowHelper.destroyWindow("infoWindow");
|
||||
};
|
||||
|
||||
return szakkepzesiMunkaszerzodesHelper;
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,30 @@
|
|||
@using Kreta.Web.Areas.DualisKepzes.Models
|
||||
@model SzakkepzesiMunkaszerzodesInfoModel
|
||||
<div class="container-fluid details" style="margin:10px">
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.BevKezd, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.BevVeg, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.BeerkezesDat, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.AdatSzolgCegNeve, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.AdatSzolgTermTeljesNev, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.AdatSzolgSzekhely, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.AdozoAdoSzam, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.TermTeljesNev, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.TermSzulHely, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.TermSzulIdo, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.TAJSzam, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.TermAzon, 3, 3)
|
||||
</div>
|
||||
</div>
|
3
KretaWeb/Areas/DualisKepzes/Views/_ViewStart.cshtml
Normal file
3
KretaWeb/Areas/DualisKepzes/Views/_ViewStart.cshtml
Normal file
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
38
KretaWeb/Areas/DualisKepzes/Views/web.config
Normal file
38
KretaWeb/Areas/DualisKepzes/Views/web.config
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.Optimization" />
|
||||
<add namespace="Kreta.Web" />
|
||||
<add namespace="Kreta.BusinessLogic.Utils" />
|
||||
<add namespace="Kendo.Mvc.UI" />
|
||||
<add namespace="Kreta.Web.Helpers" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue