init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
65
KretaWeb/Models/AmiKepzesiJellemzokModel.cs
Normal file
65
KretaWeb/Models/AmiKepzesiJellemzokModel.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue