This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,17 @@
namespace Kreta.Web.Models
{
public class AlkalmazottBankszamlaModel : TanuloBankszamlaModel
{
public AlkalmazottBankszamlaModel()
{
}
public AlkalmazottBankszamlaModel(string javascriptAjaxSaveMethod) : base(javascriptAjaxSaveMethod)
{
}
public bool IsApaczaiMentor { get; set; }
}
}

View file

@ -0,0 +1,65 @@
using System.ComponentModel.DataAnnotations;
using Foolproof;
using Kreta.BusinessLogic.Classes;
using Kreta.Enums;
using Kreta.Resources;
using Kreta.Web.Security;
namespace Kreta.Web.Models
{
public class AmiKepzesiJellemzokModel
{
[RequiredIf("MuveszetiAgValidationAttr", true, ErrorMessageResourceName = nameof(ErrorResource.MufajMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(TantargyResource.Mufaj), ResourceType = typeof(TantargyResource))]
public int? MufajTipusId { get; set; }
[Display(Name = nameof(TantargyResource.Mufaj), ResourceType = typeof(TantargyResource))]
public string MufajTipus_DNAME => MufajTipusId.GetDisplayName<MufajTipusEnum>(ClaimData.SelectedTanevID.Value);
[Display(Name = nameof(TantargyResource.Tanszak), ResourceType = typeof(TantargyResource))]
[RequiredIf("IsRequiredAmiKepzesiJellemzok", true, ErrorMessageResourceName = nameof(ErrorResource.TanszakMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
public int? TanszakTipusId { get; set; }
[Display(Name = nameof(TantargyResource.Tanszak), ResourceType = typeof(TantargyResource))]
public string TanszakTipus_DNAME => TanszakTipusId.GetDisplayName<TanszakTipusEnum>(ClaimData.SelectedTanevID.Value);
[Display(Name = nameof(TantargyResource.MuveszetiAg), ResourceType = typeof(TantargyResource))]
[RequiredIf("IsRequiredAmiKepzesiJellemzok", true, ErrorMessageResourceName = nameof(ErrorResource.MuveszetiAgMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
public int? MuveszetiAgId { get; set; }
[Display(Name = nameof(TantargyResource.MuveszetiAg), ResourceType = typeof(TantargyResource))]
public string MuveszetiAg_DNAME => MuveszetiAgId.GetDisplayName<MuveszetiAgEnum>(ClaimData.SelectedTanevID.Value);
public int ZenemuveszetiAgId => (int)MuveszetiAgEnum.ZenemuveszetiAg;
public int MufajTipusIdDefaultValue => (int)MufajTipusEnum.na;
public bool MuveszetiAgValidationAttr
{
get
{
return MuveszetiAgId == (int)MuveszetiAgEnum.ZenemuveszetiAg;
}
}
public bool IsRequiredAmiKepzesiJellemzok { get; set; } = false;
}
public class AmiKepzesiJellemzokModelForTanulo : AmiKepzesiJellemzokModel
{
[RequiredIf("MuveszetiAgValidationAttr", true, ErrorMessageResourceName = nameof(ErrorResource.MufajMegadasaKotelezoTanugyFul), ErrorMessageResourceType = typeof(ErrorResource))]
public new int? MufajTipusId { get; set; }
[RequiredIf("IsRequiredAmiKepzesiJellemzok", true, ErrorMessageResourceName = nameof(ErrorResource.TanszakMegadasaKotelezoTanugyFul), ErrorMessageResourceType = typeof(ErrorResource))]
public new int? TanszakTipusId { get; set; }
[RequiredIf("IsRequiredAmiKepzesiJellemzok", true, ErrorMessageResourceName = nameof(ErrorResource.MuveszetiAgMegadasaKotelezoTanugyFul), ErrorMessageResourceType = typeof(ErrorResource))]
public new int? MuveszetiAgId { get; set; }
public new bool MuveszetiAgValidationAttr
{
get
{
return MuveszetiAgId == (int)MuveszetiAgEnum.ZenemuveszetiAg;
}
}
}
}

View file

@ -0,0 +1,9 @@
namespace Kreta.Web.Models
{
public class BankszamlaIgenylesModel
{
public bool ShowIgenyles { get; set; }
public string IgenylesOldalUrl { get; set; }
}
}

View file

@ -0,0 +1,110 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kreta.BusinessLogic.Classes;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Framework;
using Kreta.Resources;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
using Kreta.Web.Utils;
namespace Kreta.Web.Models.Builder
{
public class LayoutModelBuilder
{
private UrlHelper url;
public UrlHelper Url
{
get
{
if (url == null)
{
url = new UrlHelper(HttpContext.Current.Request.RequestContext);
}
return url;
}
}
public void SetBase(string uzenetekSzama, LayoutModel model, string url)
{
string shortname = ClaimData.OrganizationShortName;
model.OrganizationName = ClaimData.OrganizationCode + " - " + (string.IsNullOrWhiteSpace(shortname) ? ClaimData.OrganizationName : shortname);
model.UserMenu = CreateUserMenu(uzenetekSzama);
model.HomePageUrl = Url.Content(string.Format(CommonExtensions.GetDefaultPage(true)));
}
public LayoutUserMenu CreateUserMenu(string uzenetekSzama)
{
var menu = new LayoutUserMenu();
menu.UserName = string.Format("{0} {1}", ClaimData.FelhasznaloNev, !string.IsNullOrWhiteSpace(ClaimData.GondviseloNeve) ? "(" + ClaimData.GondviseloNeve + ")" : "");
menu.MessageCount = uzenetekSzama;
menu.EventCount = GetEventCount();
menu.AdminHomePageUrl = "";
var packages = ClaimData.FelhasznaloSzerepCsomagok;
if (packages.Contains(KretaClaimPackages.Adminisztrator.ClaimValue))
{
var url = new UrlHelper(HttpContext.Current.Request.RequestContext);
menu.AdminHomePageUrl = url.Content("~/Adminisztracio/RendszerHibaErtesites");
}
menu.ProfilImgSrc = ProfileUtils.UserProfileImage;
menu.UserMenuItems = new List<LayoutUserMenuItem>();
var fullKretaVersion = ClaimData.IsFullKretaVerzio;
if (ClaimManager.HasPackage(KretaClaimPackages.Ellenorzo.ClaimValue, KretaClaimPackages.Naplo.ClaimValue))
{
string icon = "fa-user";
string action = "MasterLayoutHelper.popUpSajatAdatlapWindow(); return false;";
menu.UserMenuItems.Add(new LayoutUserMenuItem { Name = LayoutResource.SzemelyesAdatlap, Url = "javascript:void(0);", ClientAction = action, CssClass = icon });
}
string tempURL = Url.Action("Index", "Profil", new { area = "Adminisztracio" });
if (!fullKretaVersion)
{
tempURL = "javascript:void(0);";
}
menu.UserMenuItems.Add(new LayoutUserMenuItem { Name = StringResourcesUtil.GetString(2610) /*Profil beállítások*/, Url = tempURL, ClientAction = string.Empty, CssClass = "fa-cog" + (!fullKretaVersion ? " disabledMenuItem" : "") });
if (ClaimData.FelhasznaloSzerepkorok.Keys.Except(Constants.General.NotVisiblePermissions).Count() > 1 && (ClaimData.IsActivTanev || !ClaimData.IsAdministrator))
{
menu.UserMenuItems.Add(new LayoutUserMenuItem { Name = MenuResource.SzerepkorValtas, Url = Url.Action("Index", "SzerepkorValaszto", new { area = "Adminisztracio" }), ClientAction = string.Empty, CssClass = "fa-retweet" });
}
if (ClaimData.FelhasznaloSzerepkor == SzerepkorTipusEnum.Adminisztrator)
{
menu.UserMenuItems.Add(new LayoutUserMenuItem() { Name = UgyfelszolgalatResource.KRETAUgyfelszolgalat, Url = "javascript:void(0);", ClientAction = "JiraRestHelper.popUpUgyfelSzolgalatWindow(); return false;", CssClass = "fa-ugyfelszolgalaticon" });
}
menu.UserMenuItems.Add(new LayoutUserMenuItem { Name = StringResourcesUtil.GetString(2582) /*Kijelentkezés*/, Url = "javascript:void(0);", ClientAction = "MasterLayout.LogOut(); return false;", CssClass = "fa-sign-out" });
GetPopupAzonosito(menu);
return menu;
}
private void GetPopupAzonosito(LayoutUserMenu menu)
{
var cookie = HttpContext.Current.Request.Cookies.Get("DisplayedPopups");
DataSet ds = new AdminHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetNextDashboardPopupAzonosito(ClaimData.GondviseloId, cookie?.Value.Split('|'));
if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
menu.NeedPopupId = SDAConvert.ToInt32(ds.Tables[0].Rows[0]["ID"]);
menu.NeedPopupAzonosito = SDAConvert.ToString(ds.Tables[0].Rows[0]["C_EGYEDIAZONOSITO"]);
}
}
public static string GetEventCount()
{
return "0";
}
}
}

View file

@ -0,0 +1,464 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Foolproof;
using Kreta.BusinessLogic.Classes;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Core.CustomAttributes;
using Kreta.Core.Domain;
using Kreta.Enums;
using Kreta.Resources;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
using static Kreta.Core.Constants;
using static Kreta.Core.EntityInfos.EntityLengths;
namespace Kreta.Web.Models
{
public class CimElerhetosegModel : PanelBarChildModel
{
public int? Id { get; set; }
public int FelhasznaloId { get; set; }
[RequiredIf("IsGondviseloJelszoIgenylo", true, ErrorMessageResourceName = nameof(ErrorResource.OktatasiAzonositoKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[RegularExpression(RegularExpressions.OktatasiAzonositoTanulo, ErrorMessageResourceName = nameof(ErrorResource.OktatasiAzonositoFormatumaNemMegfeleloTanulo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(TanuloResource.OktatasiAzonosito), ResourceType = typeof(TanuloResource))]
public string OktatasiAzonosito_JelszoIgenylo { get; set; }
[RequiredIf("IsGondviseloJelszoIgenylo", true, ErrorMessageResourceName = nameof(ErrorResource.GondviseloNeveKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(200, ErrorMessageResourceName = nameof(ErrorResource.GondviseloNeveMax200Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(TanuloResource.GondviseloNeve), ResourceType = typeof(TanuloResource))]
public string GondviseloNev_JelszoIgenylo { get; set; }
[RequiredIf("IsGondviseloJelszoIgenylo", true, ErrorMessageResourceName = nameof(ErrorResource.GondviseloRokonsagiFokaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(TanuloResource.RokonsagiFok), ResourceType = typeof(TanuloResource))]
public int? RokonsagiFok_JelszoIgenylo { get; set; }
[RequiredIf("IsGondviseloElerhetoseg", true, ErrorMessageResourceName = nameof(ErrorResource.AGondviseloKivalasztasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(TanuloResource.GondviseloNeve), ResourceType = typeof(TanuloResource))]
public int? GondviseloId { get; set; }
[Required(ErrorMessageResourceName = nameof(ErrorResource.CimTipusMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.CimTipusa), ResourceType = typeof(CommonResource))]
public int? CimTipus { get; set; } = (int)CimTipusEnum.allando_lakcim;
[Display(Name = nameof(TanuloResource.CimTipusa), ResourceType = typeof(TanuloResource))]
public string CimTipusStr => TanuloResource.AllandoLakcim;
[Display(Name = nameof(TanuloResource.CimTipusa), ResourceType = typeof(TanuloResource))]
public string TartozkodasiCimTipusStr => TanuloResource.TartozkodasiHely;
[RequiredIf("TanulovalEgyezik", false, ErrorMessageResourceName = nameof(ErrorResource.OrszagMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Orszag), ResourceType = typeof(CommonResource))]
public int? Orszag { get; set; }
[RequiredIf("KulfoldiCimValidationAttr", true, ErrorMessageResourceName = nameof(ErrorResource.IranyitoszamKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(20, ErrorMessageResourceName = nameof(AlkalmazottResource.IranyitoszamMax20Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Iranyitoszam), ResourceType = typeof(CommonResource))]
public string Iranyitoszam { get; set; }
[RequiredIf("TanulovalEgyezik", false, ErrorMessageResourceName = nameof(ErrorResource.IranyitoszamKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(20, ErrorMessageResourceName = nameof(AlkalmazottResource.IranyitoszamMax20Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Iranyitoszam), ResourceType = typeof(CommonResource))]
public string Iranyitoszam_Str { get; set; }
[RequiredIf("KulfoldiCimValidationAttr", true, ErrorMessageResourceName = nameof(ErrorResource.HelysegKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(200, ErrorMessageResourceName = nameof(AlkalmazottResource.HelysegMax200Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Helyseg), ResourceType = typeof(CommonResource))]
public string HelysegNev { get; set; }
[RequiredIf("TanulovalEgyezik", false, ErrorMessageResourceName = nameof(ErrorResource.HelysegKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(200, ErrorMessageResourceName = nameof(AlkalmazottResource.HelysegMax200Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Helyseg), ResourceType = typeof(CommonResource))]
public string HelysegNev_Str { get; set; }
[RequiredIf("TanulovalEgyezik", false, ErrorMessageResourceName = nameof(ErrorResource.KozteruletNevenekKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(40, ErrorMessageResourceName = nameof(AlkalmazottResource.KozteruletNeveMax40Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.KozteruletNev), ResourceType = typeof(CommonResource))]
public string KozteruletNev { get; set; }
[Display(Name = nameof(CommonResource.KozteruletJellege), ResourceType = typeof(CommonResource))]
public string KozteruletTipus { get; set; } //Ez a KretaComboBox-hoz
public bool KulfoldiCimValidationAttr
{
get
{
if (!TanulovalEgyezik)
if (Orszag == (int)OrszagTipusEnum.Magyarorszag)
return true;
return false;
}
}
public bool IsKozpontilagSzinkronizalt { get; set; }
[RequiredIf("CimTanulovalEgyezikVagyMagyarorszagi", false, ErrorMessageResourceName = nameof(ErrorResource.KozteruletJellegenekKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.KozteruletJellege), ResourceType = typeof(CommonResource))]
public string KozteruletTipus_Str { get; set; } //Ez a KretaTextBox-hoz
[RequiredIf("TanulovalEgyezik", false, ErrorMessageResourceName = nameof(ErrorResource.HazszamKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(Cim.HazszamLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Hazszam), ResourceType = typeof(CommonResource))]
public string Hazszam { get; set; }
[StringLength(Cim.EmeletLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Emelet), ResourceType = typeof(CommonResource))]
public string Emelet { get; set; }
[StringLength(Cim.AjtoLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Ajto), ResourceType = typeof(CommonResource))]
public string Ajto { get; set; }
//Tartózkodásihely
[Display(Name = nameof(CommonResource.Orszag), ResourceType = typeof(CommonResource))]
public int? TartozkodasiOrszag { get; set; }
[Display(Name = nameof(CommonResource.Iranyitoszam), ResourceType = typeof(CommonResource))]
public string TartozkodasiIranyitoszam { get; set; }
[Display(Name = nameof(CommonResource.Helyseg), ResourceType = typeof(CommonResource))]
public string TartozkodasiHelysegNev { get; set; }
[Display(Name = nameof(CommonResource.KozteruletNev), ResourceType = typeof(CommonResource))]
public string TartozkodasiKozteruletNev { get; set; }
[Display(Name = nameof(CommonResource.KozteruletJellege), ResourceType = typeof(CommonResource))]
public string TartozkodasiKozteruletTipusNev { get; set; }
[Display(Name = nameof(CommonResource.Hazszam), ResourceType = typeof(CommonResource))]
public string TartozkodasiHazszam { get; set; }
[Display(Name = nameof(CommonResource.Emelet), ResourceType = typeof(CommonResource))]
public string TartozkodasiEmelet { get; set; }
[Display(Name = nameof(CommonResource.Ajto), ResourceType = typeof(CommonResource))]
public string TartozkodasiAjto { get; set; }
public bool HasTartozkodasiHely { get; set; }
[Display(Name = nameof(CommonResource.Alapertelmezett), ResourceType = typeof(CommonResource))]
public bool AlapertelmezettCim { get; set; }
[Display(Name = nameof(CommonResource.Alapertelmezett), ResourceType = typeof(CommonResource))]
public bool AlapertelmezettEmail { get; set; }
[Display(Name = nameof(CommonResource.Alapertelmezett), ResourceType = typeof(CommonResource))]
public bool AlapertelmezettTel { get; set; }
[Display(Name = nameof(TanuloResource.CimMegegyezikATanuloCimevel), ResourceType = typeof(TanuloResource))]
public bool TanulovalEgyezik { get; set; } = false;
public bool CimTanulovalEgyezikVagyMagyarorszagi => Orszag == (int)OrszagTipusEnum.Magyarorszag || TanulovalEgyezik;
[RequiredIf("TelefonKotelezo", true, ErrorMessageResourceName = nameof(ErrorResource.TelefonszamMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[PhoneExtended(ErrorMessageResourceName = nameof(ErrorResource.ATelefonszamFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Telefonszam), ResourceType = typeof(CommonResource))]
public string Telefon { get; set; }
[RequiredIf("TelefonKotelezo", true, ErrorMessageResourceName = nameof(ErrorResource.TelefonTipusMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.TelefonTipus), ResourceType = typeof(CommonResource))]
public int? TelefonTipus { get; set; }
[PhoneExtended(ErrorMessageResourceName = nameof(ErrorResource.ATelefonszamFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Telefonszam2), ResourceType = typeof(CommonResource))]
public string Telefon2 { get; set; }
[Display(Name = nameof(CommonResource.TelefonTipus), ResourceType = typeof(CommonResource))]
public int? TelefonTipus2 { get; set; }
[RequiredIf("EmailcimKotelezo", true, ErrorMessageResourceName = nameof(ErrorResource.EmailCimMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[StringLength(General.EmailMaximumKarakterekSzama, ErrorMessageResourceName = nameof(ErrorResource.EmailMax0Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Email), ResourceType = typeof(CommonResource))]
public string Emailcim_Input { get; set; }
[EmailAddressExtended(ErrorMessageResourceName = nameof(ErrorResource.EMailCimFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Email), ResourceType = typeof(CommonResource))]
public string Emailcim => Emailcim_Input?.Trim();
[RequiredIf("EmailTipusKotelezo", true, ErrorMessageResourceName = nameof(ErrorResource.EmailTipusMegadasaKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.EmailTipus), ResourceType = typeof(CommonResource))]
public int? EmailTipus { get; set; }
public string EmailTipusStr => EmailTipus.GetDisplayName<EmailTipusEnum>(ClaimData.SelectedTanevID.Value);
public string TelefonTipusStr => TelefonTipus.GetDisplayName<TelefonTipusEnum>(ClaimData.SelectedTanevID.Value);
public string TelefonTipus2Str => TelefonTipus2.GetDisplayName<TelefonTipusEnum>(ClaimData.SelectedTanevID.Value);
public string OrszagStr => Orszag.GetDisplayName<OrszagTipusEnum>(ClaimData.SelectedTanevID.Value);
public string TartozkodasiOrszagStr => TartozkodasiOrszag.GetDisplayName<OrszagTipusEnum>(ClaimData.SelectedTanevID.Value);
[Display(Name = nameof(TanuloResource.TelefonElerhetosegek), ResourceType = typeof(TanuloResource))]
public int? TanuloElerhetosegTelId { get; set; }
[Display(Name = nameof(TanuloResource.EmailElerhetosegek), ResourceType = typeof(TanuloResource))]
public int? TanuloElerhetosegEmailId { get; set; }
public bool IsAutoBindNeeded { get; set; } = true;
public List<string> FormSettings { get; set; } = new List<string>();
public bool IsAlapertelmezettVisible { get; set; } = true;
public bool IsAlapertelmezettModosithato { get; set; } = true;
public bool IsGondviseloElerhetoseg { get; set; } = false;
public bool EmailcimKotelezo { get; set; } = false;
public bool EmailTipusKotelezo { get; set; } = false;
public bool TelefonKotelezo { get; set; } = false;
public bool IsGondviseloJelszoIgenylo { get; set; } = false;
public List<int> GondviselokAlapertelmezettCimmel { get; set; }
public string ComboBoxApiControllerName { get; set; } = Constants.ApiControllers.ComboBoxHelperApi;
public static CimElerhetosegModel ConvertCoToModel(ElerhetosegCimCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.GondviseloId = co.GondviseloId;
model.Iranyitoszam_Str = co.Iranyitoszam;
model.Iranyitoszam = co.Iranyitoszam;
model.HelysegNev = co.HelysegNev;
model.HelysegNev_Str = co.HelysegNev;
model.KozteruletNev = co.KozteruletNev;
model.KozteruletTipus = co.KozteruletTipusNev;
model.KozteruletTipus_Str = co.KozteruletTipusNev;
model.Hazszam = co.Hazszam;
model.Emelet = co.Emelet;
model.Ajto = co.Ajto;
model.CimTipus = co.CimTipus;
model.Orszag = co.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
model.FelhasznaloId = co.FelhasznaloId;
model.AlapertelmezettCim = co.Alapertelmezett;
return model;
}
public static CimElerhetosegModel ConvertCoToModel(TanuloAdatCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.Iranyitoszam_Str = co.Iranyitoszam;
model.Iranyitoszam = co.Iranyitoszam;
model.HelysegNev = co.HelysegNev;
model.HelysegNev_Str = co.HelysegNev;
model.KozteruletNev = co.KozteruletNev;
model.KozteruletTipus_Str = co.KozteruletTipusNev;
model.Hazszam = co.Hazszam;
model.Emelet = co.Emelet;
model.Ajto = co.Ajto;
model.Orszag = co.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
model.Emailcim_Input = co.Emailcim;
model.EmailTipus = co.EmailTipusId;
model.Telefon = co.Telefonszam;
model.TelefonTipus = co.TelefonTipus;
model.TartozkodasiOrszag = co.TartozkodasiOrszag;
model.TartozkodasiIranyitoszam = co.TartozkodasiIranyitoszam;
model.TartozkodasiHelysegNev = co.TartozkodasiHelysegNev;
model.TartozkodasiKozteruletNev = co.TartozkodasiKozteruletNev;
model.TartozkodasiKozteruletTipusNev = co.TartozkodasiKozteruletTipusNev;
model.TartozkodasiHazszam = co.TartozkodasiHazszam;
model.TartozkodasiEmelet = co.TartozkodasiEmelet;
model.TartozkodasiAjto = co.TartozkodasiAjto;
model.HasTartozkodasiHely = co.HasTartozkodasiHely;
return model;
}
public static CimElerhetosegModel ConvertCoToModel(AlkalmazottElerhetosegCimCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.FelhasznaloId = co.AlkalmazottId;
model.Iranyitoszam_Str = co.Iranyitoszam;
model.Iranyitoszam = co.Iranyitoszam;
model.HelysegNev_Str = co.HelysegNev;
model.HelysegNev = co.HelysegNev;
model.KozteruletNev = co.KozteruletNev;
model.KozteruletTipus = co.KozteruletTipusNev;
model.KozteruletTipus_Str = co.KozteruletTipusNev;
model.Hazszam = co.Hazszam;
model.Emelet = co.Emelet;
model.Ajto = co.Ajto;
model.AlapertelmezettCim = co.Alapertelmezett;
model.CimTipus = co.CimTipus;
model.Orszag = co.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
return model;
}
public static CimElerhetosegModel ConvertCoToModel(AlkalmazottElerhetosegEmailCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.FelhasznaloId = co.AlkalmazottId;
model.Emailcim_Input = co.EmailCim;
model.AlapertelmezettEmail = co.Alapertelmezett;
model.EmailTipus = co.EmailTipusa;
return model;
}
public static CimElerhetosegModel ConvertCoToModel(AlkalmazottElerhetosegTelCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.FelhasznaloId = co.AlkalmazottId;
model.Telefon = co.Telefonszam;
model.AlapertelmezettTel = co.Alapertelmezett;
model.TelefonTipus = co.TelefonTipusa;
return model;
}
public static CimElerhetosegModel ConvertCoToModel(TanuloElerhetosegTelCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.FelhasznaloId = co.TanuloId;
model.Telefon = co.Telefonszam;
model.AlapertelmezettTel = co.Alapertelmezett;
model.TelefonTipus = co.TelefonTipusa;
return model;
}
public static ElerhetosegCimCO ConvertModelToElerhetosegCimCO(CimElerhetosegModel model)
{
var co = new ElerhetosegCimCO();
co.ID = model.Id;
co.GondviseloId = model.GondviseloId;
co.FelhasznaloId = model.FelhasznaloId;
co.Orszag = model.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
co.Iranyitoszam = co.Orszag == (int)OrszagTipusEnum.Magyarorszag ? model.Iranyitoszam : model.Iranyitoszam_Str;
co.HelysegNev = co.Orszag == (int)OrszagTipusEnum.Magyarorszag ? model.HelysegNev : model.HelysegNev_Str;
co.KozteruletTipusNev = co.Orszag == (int)OrszagTipusEnum.Magyarorszag ? model.KozteruletTipus : model.KozteruletTipus_Str;
co.KozteruletNev = model.KozteruletNev;
co.Hazszam = model.Hazszam;
co.Emelet = model.Emelet;
co.Ajto = model.Ajto;
co.CimTipus = model.CimTipus;
co.Alapertelmezett = model.AlapertelmezettCim;
co.tanuloval_egyezik = model.TanulovalEgyezik;
return co;
}
public static FelhasznaloElerhetosegCimCO ConvertModelToFelhasznaloElerhetosegCo(CimElerhetosegModel model)
{
FelhasznaloElerhetosegCimCO co = new FelhasznaloElerhetosegCimCO();
co.ID = model.Id;
co.Orszag = model.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
co.Iranyitoszam = model.Iranyitoszam_Str;
co.HelysegNev = model.HelysegNev_Str;
co.KozteruletNev = model.KozteruletNev;
co.KozteruletTipusNev = model.KozteruletTipus_Str;
co.FelhasznaloId = model.FelhasznaloId;
co.Hazszam = model.Hazszam;
co.Emelet = model.Emelet;
co.Ajto = model.Ajto;
co.Alapertelmezett = model.AlapertelmezettCim;
co.CimTipus = model.CimTipus ?? default(int);
return co;
}
public static FelhasznaloElerhetosegEmailCO ConvertModelToFelhasznaloElerhetosegEmailCo(CimElerhetosegModel model)
{
var co = new FelhasznaloElerhetosegEmailCO();
co.ID = model.Id;
co.FelhasznaloId = model.FelhasznaloId;
co.EmailCim = model.Emailcim;
co.Alapertelmezett = model.AlapertelmezettEmail;
co.EmailTipusa = model.EmailTipus ?? default(int);
return co;
}
public static FelhasznaloElerhetosegTelCO ConvertModelToFelhasznaloElerhetosegTelCo(CimElerhetosegModel model)
{
var co = new FelhasznaloElerhetosegTelCO();
co.ID = model.Id;
co.FelhasznaloId = model.FelhasznaloId;
co.Telefonszam = model.Telefon;
co.Alapertelmezett = model.AlapertelmezettTel;
co.TelefonTipusa = model.TelefonTipus ?? default(int);
return co;
}
public static TanuloElerhetosegTelCO ConvertModelToTanuloElerhetosegTelCO(CimElerhetosegModel model)
{
var co = new TanuloElerhetosegTelCO();
co.ID = model.Id;
co.TanuloId = model.FelhasznaloId;
co.Telefonszam = model.Telefon;
co.Alapertelmezett = model.AlapertelmezettTel;
co.TelefonTipusa = model.TelefonTipus ?? default(int);
return co;
}
public static TanuloElerhetosegEmailCO ConvertModelToTanuloElerhetosegEmailCO(CimElerhetosegModel model)
{
var co = new TanuloElerhetosegEmailCO();
co.ID = model.Id;
co.TanuloId = model.FelhasznaloId;
co.EmailCim = model.Emailcim;
co.Alapertelmezett = model.AlapertelmezettEmail;
co.EmailTipusa = model.EmailTipus ?? default(int);
return co;
}
public static CimElerhetosegModel ConvertCoToModel(TanuloElerhetosegEmailCO co)
{
var model = new CimElerhetosegModel();
model.Id = co.ID;
model.FelhasznaloId = co.TanuloId;
model.Emailcim_Input = co.EmailCim;
model.AlapertelmezettEmail = co.Alapertelmezett;
model.EmailTipus = co.EmailTipusa;
return model;
}
}
public class CimElerhetosegConstant
{
public const string CimSectionVisible = "CimSectionVisible";
public const string EmailSectionVisible = "EmailSectionVisible";
public const string TelSectionVisible = "TelSectionVisible";
public const string VisibleTelefon2 = "VisibleTelefon2";
public const string AlapertelmezettNemModosithato = "AlapertelmezettNemModosithato";
public const string AlapertelmezettCimVisible = "AlapertelmezettCimVisible";
public const string AlapertelmezettEmailVisible = "AlapertelmezettEmailVisible";
public const string AlapertelmezettTelVisible = "AlapertelmezettTelVisible";
public const string IsNew = "IsNew";
public const string TanuloElerhetosegTelVisible = "TanuloElerhetosegTelVisible";
public const string TanuloElerhetosegEmailVisible = "TanuloElerhetosegEmailVisible";
public const string Nameof_TanulovalEgyezik = nameof(CimElerhetosegModel.TanulovalEgyezik);
public const string Nameof_Orszag = nameof(CimElerhetosegModel.Orszag);
public const string Nameof_Iranyitoszam = nameof(CimElerhetosegModel.Iranyitoszam);
public const string Nameof_HelysegNev = nameof(CimElerhetosegModel.HelysegNev);
public const string Nameof_KozteruletTipus = nameof(CimElerhetosegModel.KozteruletTipus);
public const string SeparatorRowHide = "SeparatorRowHide";
public const string TartozkodasiHelyCimTipus = "TartozkodasiHelyCimTipus";
public const string AllandoLakcimCimTipus = nameof(AllandoLakcimCimTipus);
public const string CsakMagyarorszag = "CsakMagyarorszag";
public const string TelepulesNev = "TelepulesNev";
}
}

View file

@ -0,0 +1,10 @@
using System.Collections.Generic;
using Kreta.Web.Helpers.Modal;
namespace Kreta.Web.Models.EditorTemplates
{
public class ModelWindowBaseModel
{
public List<ModalButtonModel> Buttons { get; set; }
}
}

View file

@ -0,0 +1,20 @@
using System.Collections.Generic;
using Kendo.Mvc.UI;
namespace Kreta.Web.Models.EditorTemplates
{
public class PanelBarBaseModel : LayoutModel
{
public PanelBarBaseModel()
{
Animation = false;
ExpandMode = PanelBarExpandMode.Multiple;
}
public string PanelName { get; set; }
public List<PanelBarChildModel> ChildModels { get; set; }
public bool Animation { get; set; }
public PanelBarExpandMode ExpandMode { get; set; }
}
}

View file

@ -0,0 +1,15 @@
namespace Kreta.Web.Models.EditorTemplates
{
public class PanelBarChildDataModel
{
public string Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ControllerAction { get; set; }
public string DocumentType { get; set; }
public int TipusId { get; set; }
public int FeladatellatasiHelyId { get; set; }
}
}

View file

@ -0,0 +1,8 @@
namespace Kreta.Web.Models.EditorTemplates
{
public class PanelBarChildHeaderModel
{
public string Name { get; set; }
public string Description { get; set; }
}
}

View file

@ -0,0 +1,15 @@
using System.Collections.Generic;
namespace Kreta.Web.Models.EditorTemplates
{
public class PanelBarChildModel
{
public string PartialViewTitle { get; set; }
public string PartialViewName { get; set; }
public List<object> Data { get; set; }
public object GenericPanelBarModel { get; set; }
public bool Enabled { get; set; } = true;
}
}

View file

@ -0,0 +1,73 @@
using System.Collections.Generic;
using Kreta.Framework;
using Kreta.Resources;
using Kreta.Web.Helpers.Modal;
namespace Kreta.Web.Models.EditorTemplates
{
public class PopUpModel
{
public object Instance { get; private set; }
public string View { get; private set; }
public List<ModalButtonModel> Buttons { get; }
public PopUpModel(object model, string view)
{
Instance = model;
View = view;
Buttons = new List<ModalButtonModel>();
}
public PopUpModel AddOkBtn(PopUpModel pm, string eventName)
{
pm.Buttons.Add(new ModalButtonModel { Name = "BtnOk", Text = CommonResource.Mentes, EventName = eventName });
return pm;
}
public PopUpModel AddCancelBtn(PopUpModel pm, string eventName)
{
pm.Buttons.Add(new ModalButtonModel { Name = "BtnCancel", Text = CommonResource.Megse, EventName = eventName });
return pm;
}
public PopUpModel AddDeleteBtn(PopUpModel pm, string eventName)
{
pm.Buttons.Add(new ModalButtonModel { Name = "BtnDelete", Text = CommonResource.Torles, EventName = eventName });
return pm;
}
public PopUpModel AddBtn(PopUpModel pm, string name, int content, string eventName, string containerCssClass = null, bool secondLine = false, bool setDisabledAfterClick = false, string text = null)
{
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = content > 0 ? StringResourcesUtil.GetString(content) : text, EventName = clickEventName, ContainerCssClass = containerCssClass, SecondLine = secondLine });
return pm;
}
public PopUpModel AddBtn(PopUpModel pm, string name, string text, string eventName, bool secondLine, string containerCssClass = null, bool setDisabledAfterClick = false)
{
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = text, EventName = clickEventName, ContainerCssClass = containerCssClass, SecondLine = secondLine });
return pm;
}
public PopUpModel AddBtn(PopUpModel pm, string name, string text, string eventName, string containerCssClass = null, bool setDisabledAfterClick = false)
{
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = text, EventName = clickEventName, ContainerCssClass = containerCssClass });
return pm;
}
private string SetClickEventName(string originialEventName, string buttonName, bool setDisabledAfterClick)
{
var eventName = originialEventName;
if (setDisabledAfterClick)
{
eventName = $"function(e) {{ $('#{buttonName}').attr('disabled', true); {originialEventName}(); }}";
}
return eventName;
}
}
}

View file

@ -0,0 +1,10 @@
using System.Collections.Generic;
using Kreta.Web.Helpers.TabStrip;
namespace Kreta.Web.Models.EditorTemplates
{
public class TabStripModel
{
public List<TabStripItemModel> TabList { get; set; }
}
}

View file

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using Kreta.BusinessLogic.HelperClasses;
namespace Kreta.Web.Models
{
public class EgyhaztartasbanElokModel
{
public List<EgyhaztartasbanElokRowModel> Sorok { get; set; } = new List<EgyhaztartasbanElokRowModel>() { };
public EgyhaztartasbanElokCo ConvertToCo()
{
var co = new EgyhaztartasbanElokCo();
var listCo = new List<EgyhaztartasbanElokRowCo>();
foreach (var item in this.Sorok)
{
listCo.Add(new EgyhaztartasbanElokRowCo()
{
ID = item.ID,
Nev = item.Nev,
AnyjaNev = item.AnyjaNev,
SzuletesiIdo = item.SzuletesiIdo,
SzuletesiHely = item.SzuletesiHely,
Taj = item.Taj,
RokonsagiFok = item.RokonsagiFok,
Email = item.Email,
Telefon = item.Telefon,
isDeleted = item.isDeleted
});
}
co.Sorok = listCo;
return co;
}
}
public class EgyhaztartasbanElokRowModel
{
public int? ID { get; set; }
public string Nev { get; set; }
public string AnyjaNev { get; set; }
public DateTime? SzuletesiIdo { get; set; }
public string SzuletesiHely { get; set; }
public string Taj { get; set; }
public int? RokonsagiFok { get; set; }
public string Email { get; set; }
public string Telefon { get; set; }
public int RowNumber { get; set; }
public bool isDeleted { get; set; }
}
}

View file

@ -0,0 +1,68 @@
using System;
using System.ComponentModel.DataAnnotations;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Resources;
namespace Kreta.Web.Models
{
public class Felhasznalo4TAdatokModel
{
public Felhasznalo4TAdatokModel()
{
}
public Felhasznalo4TAdatokModel(Felhasznalo4TAdatokCo co)
{
Elotag = co.Elotag;
Vezeteknev = co.Vezeteknev;
SzuletesiVezeteknev = co.SzuletesiVezeteknev;
Utonev = co.Utonev;
SzuletesiUtonev = co.SzuletesiUtonev;
AnyjaVezeteknev = co.AnyjaVezeteknev;
AnyjaUtonev = co.AnyjaUtonev;
SzuletesiHely = co.SzuletesiHely;
SzuletesiDatum = co.SzuletesiDatum;
}
[Display(Name = nameof(FelhasznalokResource.Elotag), ResourceType = typeof(FelhasznalokResource))]
public string Elotag { get; set; }
[Display(Name = nameof(FelhasznalokResource.CsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string Vezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuletesiCsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiVezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.Utoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string Utonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuletesiUtoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiUtonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.AnjyaSzuletesiCsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string AnyjaVezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.AnyjaSzuletesiUtoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string AnyjaUtonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuletesiHely), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiHely { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuletesiIdo), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public DateTime? SzuletesiDatum { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuletesiIdo), ResourceType = typeof(FelhasznalokResource))]
public string SzuletesiDatumStr => SzuletesiDatum.HasValue ? SzuletesiDatum.Value.ToShortDateString() : "-";
public bool IsEditable { get; set; } = true;
}
}

View file

@ -0,0 +1,68 @@
using System;
using System.ComponentModel.DataAnnotations;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Resources;
namespace Kreta.Web.Models
{
public class Gondviselo4TAdatokModel
{
public Gondviselo4TAdatokModel()
{
}
public Gondviselo4TAdatokModel(Felhasznalo4TAdatokCo co)
{
Elotag = co.Elotag;
Vezeteknev = co.Vezeteknev;
SzuletesiVezeteknev = co.SzuletesiVezeteknev;
Utonev = co.Utonev;
SzuletesiUtonev = co.SzuletesiUtonev;
AnyjaVezeteknev = co.AnyjaVezeteknev;
AnyjaUtonev = co.AnyjaUtonev;
SzuletesiHely = co.SzuletesiHely;
SzuletesiDatum = co.SzuletesiDatum;
}
[Display(Name = nameof(FelhasznalokResource.Elotag), ResourceType = typeof(FelhasznalokResource))]
public string Elotag { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloCsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string Vezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloSzuletesiCsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiVezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloUtoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string Utonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloSzuletesiUtoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiUtonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloAnjyaSzuletesiCsaladiNeve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string AnyjaVezeteknev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloAnyjaSzuletesiUtoneve), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string AnyjaUtonev { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloSzuletesiHely), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public string SzuletesiHely { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloSzuletesiIdo), ResourceType = typeof(FelhasznalokResource))]
[Required(ErrorMessageResourceName = nameof(ErrorResource.Required), ErrorMessageResourceType = typeof(ErrorResource))]
public DateTime? SzuletesiDatum { get; set; }
[Display(Name = nameof(FelhasznalokResource.SzuloSzuletesiIdo), ResourceType = typeof(FelhasznalokResource))]
public string SzuletesiDatumStr => SzuletesiDatum.HasValue ? SzuletesiDatum.Value.ToShortDateString() : "-";
public bool IsEditable { get; set; } = true;
}
}

View file

@ -0,0 +1,134 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Foolproof;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Core.CustomAttributes;
using Kreta.Enums;
using Kreta.Resources;
using static Kreta.Core.Constants;
using static Kreta.Core.EntityInfos.EntityLengths;
namespace Kreta.Web.Models
{
public class GondviseloCimElerhetosegModel
{
public int TanuloId_Gondviselo { get; set; }
[Display(Name = nameof(TanuloResource.GondviseloNeve), ResourceType = typeof(TanuloResource))]
public int? GondviseloId { get; set; }
[RequiredIf("TanulovalEgyezik_Gondviselo", true, ErrorMessageResourceName = nameof(TanuloResource.CimTipusKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[Display(Name = nameof(CommonResource.CimTipusa), ResourceType = typeof(CommonResource))]
public int? CimTipus_Gondviselo { get; set; } = (int)CimTipusEnum.allando_lakcim;
[Display(Name = nameof(TanuloResource.CimTipusa), ResourceType = typeof(TanuloResource))]
public string CimTipusStr_Gondviselo => TanuloResource.TartozkodasiHely;
[RequiredIf("TanulovalEgyezik_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.OrszagMegadasaKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[Display(Name = nameof(CommonResource.Orszag), ResourceType = typeof(CommonResource))]
public int? Orszag_Gondviselo { get; set; }
[RequiredIf("Orszag_Gondviselo", (int)OrszagTipusEnum.Magyarorszag, ErrorMessageResourceName = nameof(TanuloResource.IranyitoszamKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(20, ErrorMessageResourceName = nameof(AlkalmazottResource.IranyitoszamMax20Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Iranyitoszam), ResourceType = typeof(CommonResource))]
public string Iranyitoszam_Gondviselo { get; set; }
[RequiredIf("TanulovalEgyezik_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.IranyitoszamKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(20, ErrorMessageResourceName = nameof(AlkalmazottResource.IranyitoszamMax20Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Iranyitoszam), ResourceType = typeof(CommonResource))]
public string Iranyitoszam_Gondviselo_Str { get; set; }
[RequiredIf("Orszag_Gondviselo", (int)OrszagTipusEnum.Magyarorszag, ErrorMessageResourceName = nameof(TanuloResource.HelysegNevKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(200, ErrorMessageResourceName = nameof(AlkalmazottResource.HelysegMax200Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Helyseg), ResourceType = typeof(CommonResource))]
public string HelysegNev_Gondviselo { get; set; }
[RequiredIf("TanulovalEgyezik_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.HelysegNevKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(200, ErrorMessageResourceName = nameof(AlkalmazottResource.HelysegMax200Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.Helyseg), ResourceType = typeof(CommonResource))]
public string HelysegNev_Gondviselo_Str { get; set; }
[RequiredIf("TanulovalEgyezik_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.KozteruletNevenekKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(200, ErrorMessageResourceName = nameof(AlkalmazottResource.KozteruletNeveMax200Karakter), ErrorMessageResourceType = typeof(AlkalmazottResource))]
[Display(Name = nameof(CommonResource.KozteruletNev), ResourceType = typeof(CommonResource))]
public string KozteruletNev_Gondviselo { get; set; }
[RequiredIf("Orszag_Gondviselo", (int)OrszagTipusEnum.Magyarorszag, ErrorMessageResourceName = nameof(TanuloResource.KozteruletJellegenekKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[Display(Name = nameof(CommonResource.KozteruletJellege), ResourceType = typeof(CommonResource))]
public string KozteruletTipus_Gondviselo { get; set; } //Ez a KretaComboBox-hoz
[RequiredIf("CimTanulovalEgyezikVagyMagyarorszagi_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.KozteruletJellegenekKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[Display(Name = nameof(CommonResource.KozteruletJellege), ResourceType = typeof(CommonResource))]
public string KozteruletTipus_Gondviselo_Str { get; set; } //Ez a KretaTextBox-hoz
[RequiredIf("TanulovalEgyezik_Gondviselo", false, ErrorMessageResourceName = nameof(TanuloResource.HazszamKitolteseKotelezoGondviseloFul), ErrorMessageResourceType = typeof(TanuloResource))]
[StringLength(Cim.HazszamLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Hazszam), ResourceType = typeof(CommonResource))]
public string Hazszam_Gondviselo { get; set; }
[StringLength(Cim.EmeletLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Emelet), ResourceType = typeof(CommonResource))]
public string Emelet_Gondviselo { get; set; }
[StringLength(Cim.AjtoLength, ErrorMessageResourceName = nameof(CommonResource.MaxLengthValidation), ErrorMessageResourceType = typeof(CommonResource))]
[Display(Name = nameof(CommonResource.Ajto), ResourceType = typeof(CommonResource))]
public string Ajto_Gondviselo { get; set; }
[Display(Name = nameof(TanuloResource.CimMegegyezikATanuloCimevel), ResourceType = typeof(TanuloResource))]
public bool TanulovalEgyezik_Gondviselo { get; set; } = false;
public bool CimTanulovalEgyezikVagyMagyarorszagi_Gondviselo => Orszag_Gondviselo == (int)OrszagTipusEnum.Magyarorszag || TanulovalEgyezik_Gondviselo;
[PhoneExtended(ErrorMessageResourceName = nameof(ErrorResource.ATelefonszamFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Telefonszam), ResourceType = typeof(CommonResource))]
public string Telefon_Gondviselo { get; set; }
[Display(Name = nameof(CommonResource.TelefonTipus), ResourceType = typeof(CommonResource))]
public int? TelefonTipus_Gondviselo { get; set; }
[StringLength(General.EmailMaximumKarakterekSzama, ErrorMessageResourceName = nameof(ErrorResource.EmailMax0Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
[Display(Name = nameof(CommonResource.Email), ResourceType = typeof(CommonResource))]
public string Emailcim_Gondviselo_Input { get; set; }
[EmailAddressExtended(ErrorMessageResourceName = nameof(ErrorResource.EMailCimFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
public string Emailcim_Gondviselo => Emailcim_Gondviselo_Input?.Trim();
[Display(Name = nameof(TanuloResource.TelefonElerhetosegek), ResourceType = typeof(TanuloResource))]
public int? TanuloElerhetosegTelId_Gondviselo { get; set; }
[Display(Name = nameof(TanuloResource.EmailElerhetosegek), ResourceType = typeof(TanuloResource))]
public int? TanuloElerhetosegEmailId_Gondviselo { get; set; }
public bool IsAutoBindNeeded_Gondviselo { get; set; } = true;
public List<string> FormSettings { get; set; } = new List<string>();
public bool IsAlapertelmezettVisible_Gondviselo { get; set; } = true;
public bool IsAlapertelmezettModosithato_Gondviselo { get; set; } = true;
public static GondviseloCimElerhetosegModel ConvertCoToModel(ElerhetosegCimCO co)
{
var model = new GondviseloCimElerhetosegModel();
model.GondviseloId = co.GondviseloId;
model.Iranyitoszam_Gondviselo_Str = co.Iranyitoszam;
model.Iranyitoszam_Gondviselo = co.Iranyitoszam;
model.HelysegNev_Gondviselo = co.HelysegNev;
model.HelysegNev_Gondviselo_Str = co.HelysegNev;
model.KozteruletNev_Gondviselo = co.KozteruletNev;
model.KozteruletTipus_Gondviselo = co.KozteruletTipusNev;
model.KozteruletTipus_Gondviselo_Str = co.KozteruletTipusNev;
model.Hazszam_Gondviselo = co.Hazszam;
model.Emelet_Gondviselo = co.Emelet;
model.Ajto_Gondviselo = co.Ajto;
model.CimTipus_Gondviselo = co.CimTipus;
model.Orszag_Gondviselo = co.Orszag ?? (int)OrszagTipusEnum.Magyarorszag;
model.TanuloId_Gondviselo = co.FelhasznaloId;
return model;
}
}
}

View file

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Kreta.Web.Models
{
public interface IUploadFileModel
{
int MaxAllowedFileSizeInBytes { get; set; }
IEnumerable<string> AllowedFileExtensions { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Kreta.Web.Models
{
public class IskolaorAdatModel
{
public int IskolaorID { get; set; }
public string IskolaorIdpAzonosito { get; set; }
public string IskolaorNev { get; set; }
public string IskolaorTelefonszam { get; set; }
}
}

View file

@ -0,0 +1,31 @@
using System.Collections.Generic;
using System.Web.Mvc;
using Kreta.Web.Helpers.Modal;
namespace Kreta.Web.Models
{
public class IskolaorPopupModel
{
public int? IskolaorId { get; set; }
public List<SelectListItem> IskolaorList { get; set; }
public string IskolaorTelefonszam { get; set; }
public string IskolaorUzenet { get; set; }
public ModalButtonModel Sablon1Button { get; set; }
public ModalButtonModel Sablon2Button { get; set; }
public ModalButtonModel Sablon3Button { get; set; }
public ModalButtonModel Sablon4Button { get; set; }
public ModalButtonModel Sablon5Button { get; set; }
public ModalButtonModel Sablon6Button { get; set; }
public ModalButtonModel Sablon7Button { get; set; }
public ModalButtonModel Sablon8Button { get; set; }
public ModalButtonModel Sablon9Button { get; set; }
public ModalButtonModel Sablon10Button { get; set; }
public ModalButtonModel Sablon11Button { get; set; }
public ModalButtonModel UzenetKuldesButton { get; set; }
public List<IskolaorAdatModel> IskolaorAdatModelList { get; set; }
public string IntezmenyAzonosito { get; set; }
public string KuldoID { get; set; }
public string KuldoNev { get; set; }
public string KuldoTelefonszam { get; set; }
}
}

View file

@ -0,0 +1,35 @@
using System.Collections.Generic;
namespace Kreta.Web.Models
{
public class LayoutModel
{
public string OrganizationName { get; set; }
public string HomePageUrl { get; set; }
public LayoutUserMenu UserMenu { get; set; }
}
public class LayoutUserMenu
{
public string UserName { get; set; }
public string MessageCount { get; set; }
public string InboxUrl { get; set; }
public string EventUrl { get; set; }
public string AdminHomePageUrl { get; set; }
public string EventCount { get; set; }
public string NemNaplozottTanorakCount { get; set; }
public string NemNaplozottTanorakUrl { get; set; }
public string ProfilImgSrc { get; set; }
public IList<LayoutUserMenuItem> UserMenuItems { get; set; }
public int NeedPopupId { get; set; }
public string NeedPopupAzonosito { get; set; }
}
public class LayoutUserMenuItem
{
public string Name { get; set; }
public string Url { get; set; }
public string CssClass { get; set; }
public string ClientAction { get; set; }
}
}

View file

@ -0,0 +1,8 @@
namespace Kreta.Web.Models
{
public class MaintenanceModel
{
public string Title { get; set; }
public string Message { get; set; }
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Resources;
namespace Kreta.Web.Models
{
public class MentoriNyugdijModel
{
public MentoriNyugdijModel()
{
}
public bool IsApaczaiMentor { get; set; }
public int? MunkaugyiAdatId { get; set; }
[Display(Name = nameof(AlkalmazottResource.Nyugdijas), ResourceType = typeof(AlkalmazottResource))]
public bool IsNyugdijas { get; set; }
[Display(Name = nameof(AlkalmazottResource.NyugdijKezdet), ResourceType = typeof(AlkalmazottResource))]
public DateTime? NyugdijKezdet { get; set; }
[Display(Name = nameof(AlkalmazottResource.NyugdijTipus), ResourceType = typeof(AlkalmazottResource))]
public int? NyugdijTipusId { get; set; }
public MentoriNyugdijCo ConvertToCo()
{
return new MentoriNyugdijCo()
{
MunkaugyiAdatId = MunkaugyiAdatId,
IsNyugdijas = IsNyugdijas,
NyugdijKezdet = NyugdijKezdet,
NyugdijTipusId = NyugdijTipusId,
};
}
}
}

View file

@ -0,0 +1,10 @@
using System;
namespace Kreta.Web.Models
{
public class OracsereModel
{
public int TanarId { get; set; }
public DateTime OracsereDatum { get; set; }
}
}

View file

@ -0,0 +1,21 @@
namespace Kreta.Web.Models
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
public class ReCaptchaModel
{
[JsonProperty("success")]
public bool Success { get; set; }
[JsonProperty("error-codes")]
public IEnumerable<string> ErrorCodes { get; set; }
[JsonProperty("challenge_ts")]
public DateTime ChallengeTs { get; set; }
[JsonProperty("hostname")]
public string Hostname { get; set; }
}
}

View file

@ -0,0 +1,72 @@
namespace Kreta.Web.Models
{
/// <summary>
/// StatusModel
/// </summary>
public class StatusModel
{
/// <summary>
/// Gets or sets the build version.
/// </summary>
/// <value>
/// The build version.
/// </value>
public string BuildVersion { get; set; }
/// <summary>
/// Gets or sets the name of the branch.
/// </summary>
/// <value>
/// The name of the branch.
/// </value>
public string BranchName { get; set; }
/// <summary>
/// Gets or sets the build date time UTC.
/// </summary>
/// <value>
/// The build date time UTC.
/// </value>
public string BuildDateTimeUtc { get; set; }
/// <summary>
/// Gets or sets the commit number.
/// </summary>
/// <value>
/// The commit number.
/// </value>
public string CommitNumber { get; set; }
/// <summary>
/// Gets or sets the last login date time by institute.
/// </summary>
/// <value>
/// The last login date time by institute.
/// </value>
public string LastLoginDateTimeByInstitute { get; set; }
/// <summary>
/// Gets or sets the active school year.
/// </summary>
/// <value>
/// The active school year.
/// </value>
public string ActiveSchoolYear { get; set; }
/// <summary>
/// Gets or sets the last lesson date time.
/// </summary>
/// <value>
/// The last lesson date time.
/// </value>
public string LastLessonDateTime { get; set; }
/// <summary>
/// Gets or sets the last logged lesson date time.
/// </summary>
/// <value>
/// The last logged lesson date time.
/// </value>
public string LastLoggedLessonDateTime { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.Drawing;
namespace Kreta.Web.Models
{
public class StepDisplayModel
{
public int Steps { get; set; }
public int Active { get; set; }
public string Height { get; set; } = "50px";
public string Width { get; set; } = "100%";
public int Radius { get; set; } = 20;
public string SelectedColor { get; set; }
public string BaseColor { get; set; }
public Font Font { get; set; } = new Font("Arial", 16);
}
}

View file

@ -0,0 +1,68 @@
using System.ComponentModel.DataAnnotations;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.Resources;
using Kreta.Web.Models.EditorTemplates;
namespace Kreta.Web.Models
{
public class TanuloBankszamlaModel : PanelBarChildModel
{
public TanuloBankszamlaModel()
{
}
public TanuloBankszamlaModel(string javascriptAjaxSaveMethod)
{
JavascriptAjaxSaveMethod = javascriptAjaxSaveMethod;
}
[Display(Name = nameof(TanuloResource.BankszamlaSzam), ResourceType = typeof(TanuloResource))]
public string BankszamlaSzam { get; set; }
[Display(Name = nameof(TanuloResource.BankszamlaTulajdonosa), ResourceType = typeof(TanuloResource))]
public int? BankszamlaTulajdonos { get; set; }
[Display(Name = nameof(TanuloResource.BankszamlaTulajdonosNeve), ResourceType = typeof(TanuloResource))]
public string BankszamlaTulajdonosNeve { get; set; }
[Display(Name = nameof(TanuloResource.SzamlavezetoBank), ResourceType = typeof(TanuloResource))]
public string SzamlavezetoBank { get; set; }
public string Cimsor { get; set; }
public bool IsReadonly { get; set; } = false;
public string BankszamlaTulajdonos_DNAME { get; set; }
public string JavascriptAjaxSaveMethod { get; private set; }
public bool IsSzakkepzo { get; set; } = false;
public string IdPostfix { get; set; }
public string BankszamlaSzamTooltip { get; set; } = TanuloResource.ToolTipBankszamlaSzam;
public string BankszamlaSzamReadonlyTooltip { get; set; } = TanuloResource.ToolTipTanuloBankszamlaAdataiNemModosithatok;
public string BankszamlaSzamId => $"{(nameof(BankszamlaSzam) + (string.IsNullOrWhiteSpace(IdPostfix) ? "" : $"_{IdPostfix}"))}";
public string BankszamlaTulajdonosId => $"{(nameof(BankszamlaTulajdonos) + (string.IsNullOrWhiteSpace(IdPostfix) ? "" : $"_{IdPostfix}"))}";
public string BankszamlaTulajdonosNeveId => $"{(nameof(BankszamlaTulajdonosNeve) + (string.IsNullOrWhiteSpace(IdPostfix) ? "" : $"_{IdPostfix}"))}";
public string SzamlavezetoBankId => $"{(nameof(SzamlavezetoBank) + (string.IsNullOrWhiteSpace(IdPostfix) ? "" : $"_{IdPostfix}"))}";
public BankszamlaCo ConvertToCo()
{
return new BankszamlaCo()
{
BankszamlaSzam = this.BankszamlaSzam,
BankszamlaTulajdonos = this.BankszamlaTulajdonos,
BankszamlaTulajdonosNeve = this.BankszamlaTulajdonosNeve,
SzamlavezetoBank = this.SzamlavezetoBank,
};
}
}
}

View file

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Kreta.Web.Models
{
public class UploadFileModel : IUploadFileModel
{
public int MaxAllowedFileSizeInBytes { get; set; }
public IEnumerable<string> AllowedFileExtensions { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Kreta.Web.Models
{
public class WarningValidationModel
{
public string Msg { get; set; }
public string ErrorMsg { get; set; }
public string SuccessFunction { get; set; }
public string CloseFunction { get; set; }
}
}

View file

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
namespace Kreta.Web.Models
{
public class ZaradekBuborekModel
{
public List<ZaradekSzovegModel> ZaradekokListaja { get; set; }
public string ZaradekSzovegek { get; set; }
public bool IsSzerkesztheto { get; set; }
public DateTime KeltezesDatuma { get; set; }
public DateTime UtolsoModositasDatuma { get; set; }
public int Id { get; set; }
public string OsztalyNev { get; set; }
public bool IsKapcsolodo { get; set; }
public bool IsTorolheto { get; set; }
public bool IsOsztaly { get; set; }
public static int Comparison(ZaradekBuborekModel x, ZaradekBuborekModel y)
{
return
x.KeltezesDatuma.Date == y.KeltezesDatuma.Date ?
x.UtolsoModositasDatuma.Date > y.UtolsoModositasDatuma.Date ? -1 : 1
:
x.KeltezesDatuma > y.KeltezesDatuma ? -1 : 1;
}
}
}

View file

@ -0,0 +1,14 @@
using System.Collections.Generic;
using Kreta.BusinessLogic.HelperClasses;
namespace Kreta.Web.Models
{
public class ZaradekMegjeleniteseModel
{
public int ZaradekId { get; set; }
public List<ZaradekNyelvCo> ZaradekSzovegList { get; set; }
public bool IsTorzslapMegjelenes { get; set; }
public bool IsBizonyitvanMegjelenes { get; set; }
public bool IsNaploMegjelenes { get; set; }
}
}

View file

@ -0,0 +1,65 @@
using System.Collections.Generic;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.Enums;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Models
{
public class ZaradekModel
{
public ZaradekModel()
{
BuborekModelList = new List<ZaradekBuborekModel>();
SetOfoRogzithetZaradekot(null);
}
public ZaradekModel(int tanuloCsoportId, int? tanuloId = null)
{
var connectionType = ConnectionTypeExtensions.GetSessionConnectionType();
var zaradekHelper = new ZaradekHelper(connectionType);
var systemSettingsHelper = new SystemSettingsHelper(connectionType);
SetOfoRogzithetZaradekot(systemSettingsHelper);
BuborekModelList = zaradekHelper.GetZaradekok(systemSettingsHelper.GetSystemSettingValue<List<int>>(RendszerBeallitasTipusEnum.Nemzeti_Nyelvi_Dokumentum_Nyelvek), tanuloCsoportId, tanuloId)
.ConvertAll(co => new ZaradekBuborekModel
{
Id = co.Id.Value,
ZaradekSzovegek = co.ZaradekSzovegek,
ZaradekokListaja = co.ZaradekSzovegList.ConvertAll(x => new ZaradekSzovegModel { NyelvId = x.NyelvId, Szoveg = x.Szoveg }),
KeltezesDatuma = co.KeltezesDatuma.Value,
UtolsoModositasDatuma = co.UtolsoModositasDatuma,
IsSzerkesztheto = ClaimData.IsAdministrator || (co.RogzitoId == ClaimData.FelhasznaloId && ClaimData.IsOsztalyfonok && ((IsOfoRogzithetEvkoziZaradekot && !co.IsKiVagyAtsorolasiZaradek) || IsOfoRogzithetKiVagyAtsorolasiZaradekot)),
OsztalyNev = co.OsztalyNev,
IsKapcsolodo = co.IsKapcsolodo,
IsTorolheto = co.IsTorolheto || !co.IsKiVagyAtsorolasiZaradek,
IsOsztaly = co.IsOsztaly
});
BuborekModelList.Sort(ZaradekBuborekModel.Comparison);
TanuloCsoportId = tanuloCsoportId;
}
public List<ZaradekBuborekModel> BuborekModelList { get; set; }
public bool IsViewMod { get; set; }
public int? TanuloCsoportId { get; set; }
public bool IsOfoRogzithetEvkoziZaradekot { get; set; }
public bool IsOfoRogzithetKiVagyAtsorolasiZaradekot { get; set; }
public bool IsKapcsolodoZaradekokMegjelennek { get; set; }
private void SetOfoRogzithetZaradekot(SystemSettingsHelper systemSettingsHelper)
{
systemSettingsHelper = systemSettingsHelper ?? new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
IsOfoRogzithetEvkoziZaradekot = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Osztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_zaradekat);
IsOfoRogzithetKiVagyAtsorolasiZaradekot = systemSettingsHelper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Osztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat);
}
}
}

View file

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.Linq;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.Enums;
using Kreta.Web.Helpers;
namespace Kreta.Web.Models
{
public class ZaradekSzovegModel
{
public int NyelvId { get; set; }
public string Szoveg { get; set; }
public static List<ZaradekSzovegModel> AdatszotarNyelvCoToZaradekSzovegModel(List<AdatszotarZaradekNyelvCo> coList = null)
{
coList = coList ?? new List<AdatszotarZaradekNyelvCo>();
return new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSystemSettingValue<List<int>>(RendszerBeallitasTipusEnum.Nemzeti_Nyelvi_Dokumentum_Nyelvek).ConvertAll(y =>
new ZaradekSzovegModel
{
NyelvId = y,
Szoveg = coList.SingleOrDefault(x => x.NyelvId == y)?.Name ?? string.Empty
});
}
}
}