init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,40 @@
|
|||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Web.Areas.Tanulo.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Tanulo.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.CsoportVezeto.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
||||
public class CsoportTanuloiController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
var model = new CsoportTanuloiSearchModel
|
||||
{
|
||||
showDetailView = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Csoportvezeto_Tanulo_Adat_Modositas),
|
||||
showTanoraCeluCsoport = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Csoportvezeto_Tanora_Celu_Csoportok)
|
||||
};
|
||||
|
||||
var helper = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
var firstCsoportId = helper.GetCsoportListByCsoportVezeto(model.showTanoraCeluCsoport, (int)CsoportTipusEnum.iskolai_csoport_tanorai_celu_, ClaimData.IsSzuperOsztalyfonok).Select(x => x.Value).FirstOrDefault();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(firstCsoportId))
|
||||
{
|
||||
int.TryParse(firstCsoportId, out int result);
|
||||
model.OsztalyCsoport = result;
|
||||
}
|
||||
|
||||
return View("Index", model);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue