init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Framework;
|
||||
using Kreta.Web.Areas.Orarend.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Orarend.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Ellenorzo.ClaimValue)]
|
||||
public class InformaciokTanorakController : Controller
|
||||
{
|
||||
// GET: Orarend/InformaciokTanorak
|
||||
public ActionResult Index()
|
||||
{
|
||||
var model = new InformaciokSearchModel();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult OpenTanitasiOraInfoPopUp(int tanitasiOraId, DateTime datum)
|
||||
{
|
||||
try
|
||||
{
|
||||
TanitasiOraInfoModel tanitasiOraInfoModel;
|
||||
var helper = new TanoraHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
TanoraCO tanoraCO = helper.GetTanoraByOrarendiId(tanitasiOraId, datum, true, ClaimData.IsTanuloOrGondviselo);
|
||||
tanitasiOraInfoModel = new TanitasiOraInfoModel
|
||||
{
|
||||
Datum = tanoraCO.Datum.ToShortDateString(),
|
||||
Oraszam = tanoraCO.Oraszam,
|
||||
HetNapja = tanoraCO.HetNapjaNev,
|
||||
Hetirend = tanoraCO.HetirendNev,
|
||||
Foglalkozas = tanoraCO.FoglalkozasNev,
|
||||
OsztalyCsoport = tanoraCO.OsztalyCsoportNev,
|
||||
Tantargy = tanoraCO.TantargyNev,
|
||||
Tanar = tanoraCO.TanarNev,
|
||||
Terem = tanoraCO.TeremNev,
|
||||
Megtartott = tanoraCO.Megtartott.HasValue ? tanoraCO.Megtartott.Value.GetDisplayName() : StringResourcesUtil.GetString(3610)/*Nem naplózott*/,
|
||||
Sorszamozando = tanoraCO.Sorszamozando.GetDisplayName(),
|
||||
OraKezdete = tanoraCO.OraKezd.ToString("HH:mm"),
|
||||
OraVege = tanoraCO.OraVeg.ToString("HH:mm"),
|
||||
Tema = tanoraCO.Tema,
|
||||
Megjegyzes = tanoraCO.Megjegyzes,
|
||||
HaziFeladat = tanoraCO.HaziFeladat
|
||||
};
|
||||
|
||||
var model = new PopUpModel(tanitasiOraInfoModel, "Info_PopUp");
|
||||
|
||||
model.AddCancelBtn(model, "InformaciokTanitasiOraHelper.tanitasiOraInfoCancel");
|
||||
|
||||
return PartialView(Constants.General.PopupView, model);
|
||||
}
|
||||
catch (BlException ex)
|
||||
{
|
||||
throw new StatusError(HttpStatusCode.BadRequest, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue