init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,118 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.Extensions;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Framework;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Orarend.ApiControllers;
|
||||
using Kreta.Web.Areas.Orarend.Logic;
|
||||
using Kreta.Web.Areas.Orarend.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Orarend.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsSzirIntezmeny.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(TanevEnum.AktEsKovTanev, KretaClaimPackages.Adminisztrator.ClaimValue)]
|
||||
public class AdminOsztalyOrarendController : BaseAdminOsztalyOrarendController
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
var model = new AdminOsztalyOrarendModel
|
||||
{
|
||||
TabList = GetAdminOrarendTabs()
|
||||
};
|
||||
var orarendHelper = new OrarendHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
model.HetirendJson = orarendHelper.GetHetirendek();
|
||||
model.NaptariHetekHetirendJson = orarendHelper.GetNaptariHetekHetirendek();
|
||||
|
||||
var co = orarendHelper.GetCalendarMinMax();
|
||||
model.CalendarMinTime = co.CalendarMin.Subtract(new TimeSpan(0, 15, 0)); // "15 perccel legyen előbb"
|
||||
model.CalendarMaxTime = co.CalendarMax.Add(new TimeSpan(0, 15, 0)); // "15 perccel legyen később"
|
||||
|
||||
model.CsengetesiRendMinTime = new TimeSpan();
|
||||
model.CsengetesiRendMaxTime = new TimeSpan(0, 25, 0);
|
||||
|
||||
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSystemConnectionType());
|
||||
|
||||
ViewBag.napirendStart = systemSettingsHelper.GetSystemSettingValue<TimeSpan>(RendszerBeallitasTipusEnum.Az_elektronikus_naplo_megjelenesenek_kezdoidopontja).RoundDownToNearestTargetMinute(15).ToString();
|
||||
ViewBag.napirendEnd = systemSettingsHelper.GetSystemSettingValue<string>(RendszerBeallitasTipusEnum.Az_elektronikus_naplo_megjelenesenek_zaroidopontja);
|
||||
|
||||
model.IsOravegeBeallitasOrahosszAlapjan = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Orarendi_Elem_Hossz);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult GetOrarendiOrak(int index = 0)
|
||||
{
|
||||
return GetOrarendiOrak(index, false);
|
||||
}
|
||||
|
||||
public ActionResult GetTanoranKivuliFoglalkozasok(int index = 1)
|
||||
{
|
||||
return GetTanoranKivuliFoglalkozasok(index, false);
|
||||
}
|
||||
|
||||
public List<TabStripItemModel> GetAdminOrarendTabs()
|
||||
{
|
||||
var list = new List<TabStripItemModel> {
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "0",
|
||||
ItemName = AdminisztracioResource.Tanorak,
|
||||
Area = "Orarend",
|
||||
Controller = "AdminOsztalyOrarend",
|
||||
Action = "GetOrarendiOrak",
|
||||
RouteParameters = new Dictionary<string, string>
|
||||
{
|
||||
{ "index", "0" }
|
||||
}
|
||||
},
|
||||
new TabStripItemModel
|
||||
{
|
||||
ItemId = "1",
|
||||
ItemName = AdminisztracioResource.Napirend,
|
||||
Area = "Orarend",
|
||||
Controller = "AdminOsztalyOrarend",
|
||||
Action = "GetTanoranKivuliFoglalkozasok",
|
||||
RouteParameters = new Dictionary<string, string>
|
||||
{
|
||||
{ "index", "1" }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public ActionResult OpenNewOrarendiOraPopUp(OsztalyOrarendModel model)
|
||||
{
|
||||
return OpenNewOrarendiOraPopUp(model, false);
|
||||
}
|
||||
|
||||
public ActionResult OpenModifyOrarendiOraPopUp(CalendarModel model)
|
||||
{
|
||||
return OpenModifyOrarendiOraPopUp(model, false);
|
||||
}
|
||||
|
||||
public ActionResult OpenNewFoglalkozasokOraPopUp(CalendarModel model)
|
||||
{
|
||||
return OpenNewFoglalkozasokOraPopUp(model, false);
|
||||
}
|
||||
|
||||
public ActionResult OpenModifyFoglalkozasokOraPopUp(CalendarModel model)
|
||||
{
|
||||
return OpenModifyFoglalkozasokOraPopUp(model, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue