init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,92 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Iktato.Poszeidon.Factory.Interface;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.GRModul.Logic;
|
||||
using Kreta.Web.Areas.GRModul.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.GRModul.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize("KretaClaimPackages.GazdasagiUgyintezo.ClaimValue")]
|
||||
public class BeszerzesiIgenyController : Controller
|
||||
{
|
||||
private IIktatoRepositoryFactory IktatoRepositoryFactory { get; }
|
||||
private IktatoServiceConfiguration IktatoServiceConfiguration { get; }
|
||||
private readonly IJiraHelper JiraHelper;
|
||||
public BeszerzesiIgenyController(IJiraHelper jiraHelper, IIktatoRepositoryFactory iktatoRepositoryFactory, IktatoServiceConfiguration iktatoServiceConfiguration)
|
||||
{
|
||||
IktatoRepositoryFactory = iktatoRepositoryFactory;
|
||||
IktatoServiceConfiguration = iktatoServiceConfiguration;
|
||||
JiraHelper = jiraHelper;
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
BeszerzesiIgenySearchModel model = new BeszerzesiIgenySearchModel();
|
||||
|
||||
var helper = new BeszerzesiModulHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
model.IsVezeto = helper.IsLeader(ClaimData.FelhasznaloId);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult OpenBeszerzesiIgenyDetailPopUp(int id) => GetBeszerzesiIgenyDetailPopUp(id, false);
|
||||
|
||||
public ActionResult OpenBeszerzesiIgenyModifyPopUp(int id) => GetBeszerzesiIgenyDetailPopUp(id, true);
|
||||
|
||||
public ActionResult GetBeszerzesiIgenyDetailPopUp(int id, bool isModosithato)
|
||||
{
|
||||
var model = new BeszerzesiIgenyLogic(JiraHelper, IktatoRepositoryFactory, IktatoServiceConfiguration).GetBeszerzesiIgenyModel(id);
|
||||
model.IsModosithato = isModosithato;
|
||||
|
||||
var pm = new PopUpModel(model, "BeszerzesiIgeny_Bevitel");
|
||||
pm = pm.AddCancelBtn(pm, "BeszerzesiIgenyHelper.CancelBeszerzesiIgenyWindow");
|
||||
|
||||
if (isModosithato)
|
||||
{
|
||||
if (model.IsVezeto)
|
||||
{
|
||||
if (model.RogzitoId == ClaimData.FelhasznaloId)
|
||||
{
|
||||
pm = pm.AddBtn(pm, "elfogadasBtn", GRModulResource.Elfogadas, "BeszerzesiIgenyHelper.saveBeszerzesiIgenyElfogadas");
|
||||
pm = pm.AddBtn(pm, "elutasitasBtn", GRModulResource.Torles, "BeszerzesiIgenyHelper.saveBeszerzesiIgenyElutasitas");
|
||||
}
|
||||
else
|
||||
{
|
||||
pm = pm.AddBtn(pm, "elfogadasBtn", GRModulResource.Elfogadas, "BeszerzesiIgenyHelper.saveBeszerzesiIgenyElfogadas");
|
||||
pm = pm.AddBtn(pm, "hpBtn", GRModulResource.HPVisszakuldes, "BeszerzesiIgenyHelper.openBeszerzesiIgenyHPWindow");
|
||||
pm = pm.AddBtn(pm, "elutasitasBtn", GRModulResource.Elutasitas, "BeszerzesiIgenyHelper.saveBeszerzesiIgenyElutasitas");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm = pm.AddBtn(pm, "modifyBtn", GRModulResource.Modositas, "BeszerzesiIgenyHelper.saveBeszerzesiIgeny", containerCssClass: "BtnOk");
|
||||
}
|
||||
}
|
||||
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
|
||||
public ActionResult OpenBeszerzesiIgenyNewPopUp()
|
||||
{
|
||||
var model = new BeszerzesiIgenyLogic(JiraHelper, IktatoRepositoryFactory, IktatoServiceConfiguration).GetBeszerzesiIgenyModel(null);
|
||||
model.IsModosithato = true;
|
||||
model.IgenyAdatokModel.IsPalyazat = (int)IgenNemEnum.Nem;
|
||||
|
||||
PopUpModel pm = new PopUpModel(model, "BeszerzesiIgeny_Bevitel");
|
||||
pm = pm.AddCancelBtn(pm, "BeszerzesiIgenyHelper.CancelBeszerzesiIgenyWindow");
|
||||
pm = pm.AddBtn(pm, "saveBtn", GRModulResource.Rogzites, "BeszerzesiIgenyHelper.saveBeszerzesiIgeny", containerCssClass: "BtnOk");
|
||||
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Client.KGR;
|
||||
using Kreta.Core;
|
||||
using Kreta.Web.Areas.GRModul.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Helpers.Modal;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.GRModul.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.KKGazdasagiUgyintezo.ClaimValue)]
|
||||
public class KotelezettsegvallalasController : Controller
|
||||
{
|
||||
|
||||
private readonly IKGRClient _kgrClient;
|
||||
|
||||
public KotelezettsegvallalasController(IKGRClient kgrClient)
|
||||
{
|
||||
_kgrClient = kgrClient ?? throw new ArgumentNullException(nameof(kgrClient));
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
var model = new KotvallSearchModel
|
||||
{
|
||||
Tanev = ClaimData.SelectedTanevID.HasValue ? ClaimData.SelectedTanevID.Value : ClaimData.AktivTanevID.Value,
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult OpenNewModInfoPopUp(int? id, bool? isInfoView)
|
||||
{
|
||||
var model = new KotvallModel();
|
||||
try
|
||||
{
|
||||
if (id.IsEntityId())
|
||||
{
|
||||
var helper = new KotvallKezelesHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
KotvallItemCo co = helper.GetKotvallItem(_kgrClient, ClaimData.IntezmenyGuid ?? throw new ApplicationException("Nincs intézmény egyedi azonosito"), id.Value);
|
||||
model = KotvallModel.ConvertToModel(co);
|
||||
}
|
||||
else
|
||||
{
|
||||
model.BejelentoNeve = ClaimData.FelhasznaloNev;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex.Data["IntezmenyBeszerzesHiba"] != null)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, null) { Json = ex.Data["IntezmenyBeszerzesHiba"], };
|
||||
}
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ex.Message, ex);
|
||||
}
|
||||
|
||||
model.IsInfoView = isInfoView.HasValue && isInfoView.Value;
|
||||
model.Id = id;
|
||||
var pm = new PopUpModel(model, "_Kotvall_NewModInfo");
|
||||
|
||||
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnKotVallCancel", Text = Resources.CommonResource.Megse, EventName = "KotvallHelper.kotvallCancel" });
|
||||
|
||||
if (!isInfoView.HasValue || !isInfoView.Value)
|
||||
{
|
||||
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnKotVallmentesOk", Text = Resources.CommonResource.Mentes, EventName = "KotvallHelper.kotvallSave" });
|
||||
}
|
||||
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
|
||||
public ActionResult OpenKiegeszitoInfoPopUp(int? id)
|
||||
{
|
||||
var model = new KotvallKiegeszitoModel();
|
||||
if (id.IsEntityId())
|
||||
{
|
||||
var helper = new KotvallKezelesHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
KotvallItemCo co = helper.GetKotvallItem(_kgrClient, ClaimData.IntezmenyGuid ?? throw new ApplicationException("Nincs intézmény egyedi azonosito"), id.Value);
|
||||
model = KotvallKiegeszitoModel.ConvertToModel(co);
|
||||
}
|
||||
model.Id = id;
|
||||
var pm = new PopUpModel(model, "_Kotvall_KiegeszitoInfo");
|
||||
|
||||
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnKotVallCancel", Text = Resources.CommonResource.Vissza, EventName = "KotvallHelper.kotvallCancel" });
|
||||
|
||||
return PartialView(Constants.General.PopupView, pm);
|
||||
}
|
||||
}
|
||||
}
|
18
KretaWeb/Areas/GRModul/Controllers/ProjektController.cs
Normal file
18
KretaWeb/Areas/GRModul/Controllers/ProjektController.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Web.Areas.GRModul.Models;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.GRModul.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Naplo.ClaimValue)]
|
||||
public class ProjektController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
var model = new ProjektSearchModel();
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.GRModul.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
|
||||
public class TargyiEszkozokController : Controller
|
||||
{
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
ViewData[GRModulResource.IntezmenyAzonositoKey] = ClaimData.IntezmenyAzonosito;
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.GRModul.Models;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.GRModul.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.GazdasagiUgyintezo.ClaimValue)]
|
||||
public class UzletiTervezesController : Controller
|
||||
{
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
ViewData[GRModulResource.IntezmenyAzonositoKey] = ClaimData.IntezmenyAzonosito;
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult AlkalmazottTenyAdatok(string azonosito, string honap)
|
||||
{
|
||||
ViewData[GRModulResource.IntezmenyAzonositoKey] = ClaimData.IntezmenyAzonosito;
|
||||
|
||||
if (Enum.TryParse(honap, out HonapokEnum selectedHonap))
|
||||
{
|
||||
var vm = new UzletiTervSearchModel
|
||||
{
|
||||
SelectedRovatAzonosito = azonosito,
|
||||
Honap = selectedHonap
|
||||
};
|
||||
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue