init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
34
KretaWeb/Areas/KirImportExport/Controllers/BaseController.cs
Normal file
34
KretaWeb/Areas/KirImportExport/Controllers/BaseController.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.KIR.Domain.Model;
|
||||
using Kreta.Web.Areas.KirImportExport.Models.KirImport;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.KirImportExport.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
|
||||
public abstract class BaseController : Controller
|
||||
{
|
||||
public ActionResult IndexImport()
|
||||
{
|
||||
if (!(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirLogin") is AuthHeaderModel))
|
||||
{
|
||||
return View("~/Areas/KirImportExport/Views/Shared/_KirLogin.cshtml", new KirLoginModel { Url = HttpContext.Request.Url.AbsoluteUri });
|
||||
}
|
||||
|
||||
return View("IndexImport", new KirSearchModel());
|
||||
}
|
||||
|
||||
public ActionResult IndexExport()
|
||||
{
|
||||
if (!(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirLogin") is AuthHeaderModel) && string.IsNullOrWhiteSpace(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirToken") as string))
|
||||
{
|
||||
return View("~/Areas/KirImportExport/Views/Shared/_KirLogin.cshtml", new KirLoginModel { Url = HttpContext.Request.Url.AbsoluteUri });
|
||||
}
|
||||
|
||||
return View("IndexExport", new KirSearchModel());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.Web.Areas.KirImportExport.Logic;
|
||||
using Kreta.Web.Areas.KirImportExport.Models.KirImport;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
|
||||
namespace Kreta.Web.Areas.KirImportExport.Controllers
|
||||
{
|
||||
public class KirAlkalmazottController : BaseController
|
||||
{
|
||||
public ActionResult OpenAlkalmazottComparePopupp(int alkalmazottId)
|
||||
{
|
||||
var popUpModel = new PopUpModel(
|
||||
new CompareModel
|
||||
{
|
||||
|
||||
FelhasznaloId = alkalmazottId,
|
||||
IsImportFromKir = System.Web.HttpContext.Current.Request.UrlReferrer.AbsoluteUri.Contains("IndexImport")
|
||||
}, "Alkalmazott_AddModify");
|
||||
|
||||
popUpModel = popUpModel.AddCancelBtn(popUpModel, "KirAlkalmazottImportHelper.propertiesCancel");
|
||||
popUpModel = popUpModel.AddOkBtn(popUpModel, "KirAlkalmazottImportHelper.modifyAddSave");
|
||||
|
||||
return PartialView(Constants.General.PopupView, popUpModel);
|
||||
}
|
||||
|
||||
public ActionResult OpenAlkalmazottInfoPopUp(string alkalmazottId)
|
||||
{
|
||||
var model = new PopUpModel(new TabStripModel()
|
||||
{
|
||||
TabList = KirImportLogic.GetAlkalmazottInfoTabs(alkalmazottId)
|
||||
}, "~/Areas/Alkalmazott/Views/Alkalmazott/Info_PopUp.cshtml");
|
||||
|
||||
model.AddCancelBtn(model, "KirAlkalmazottImportHelper.alkalmazottInfoCancel");
|
||||
|
||||
return PartialView(Constants.General.PopupView, model);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.Web.Areas.KirImportExport.Logic;
|
||||
using Kreta.Web.Areas.KirImportExport.Models.KirImport;
|
||||
using Kreta.Web.Areas.Tanulo.Models;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
|
||||
namespace Kreta.Web.Areas.KirImportExport.Controllers
|
||||
{
|
||||
public class KirTanuloController : BaseController
|
||||
{
|
||||
public ActionResult OpenTanuloComparePopup(int tanuloId)
|
||||
{
|
||||
var popUpModel = new PopUpModel(
|
||||
new CompareModel
|
||||
{
|
||||
FelhasznaloId = tanuloId,
|
||||
IsImportFromKir = System.Web.HttpContext.Current.Request.UrlReferrer.AbsoluteUri.Contains("IndexImport"),
|
||||
TanugyiAdatokTabIsVisible = KirImportLogic.HasOsztalyBasorolas(tanuloId)
|
||||
}, "Tanulo_AddModify");
|
||||
|
||||
popUpModel = popUpModel.AddCancelBtn(popUpModel, "KirTanuloImportHelper.propertiesCancel");
|
||||
popUpModel = popUpModel.AddOkBtn(popUpModel, "KirTanuloImportHelper.modifyAddSave");
|
||||
|
||||
return PartialView(Constants.General.PopupView, popUpModel);
|
||||
}
|
||||
|
||||
public ActionResult OpenTanuloInfoPopUp(string tanuloId)
|
||||
{
|
||||
var model = new PopUpModel(new TanuloSearchModel()
|
||||
{
|
||||
TabList = KirImportLogic.GetTanuloInfoTabs(tanuloId)
|
||||
}, "~/Areas/Tanulo/Views/Tanulo/Tanulo_Info.cshtml");
|
||||
|
||||
model.AddCancelBtn(model, "KirTanuloImportHelper.tanuloInfoCancel");
|
||||
|
||||
return PartialView(Constants.General.PopupView, model);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue