71 lines
4.7 KiB
C#
71 lines
4.7 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kreta.BusinessLogic.Classes;
|
|
using Kreta.Core.CustomAttributes;
|
|
using Kreta.Resources;
|
|
using Kreta.Web.Models;
|
|
using static Kreta.Core.Constants;
|
|
|
|
namespace Kreta.Web.Areas.Intezmeny.Models
|
|
{
|
|
public class IntezmenyModel : CimElerhetosegModel
|
|
{
|
|
[Display(Name = nameof(CommonResource.IgazgatoNeve), ResourceType = typeof(CommonResource))]
|
|
[KretaRequired(typeof(CommonResource), nameof(CommonResource.IgazgatoNeveKotelezo))]
|
|
[StringLength(maximumLength: 100, ErrorMessageResourceName = nameof(ErrorResource.Max100Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
public string IgazgatoNeve { get; set; }
|
|
|
|
[Display(Name = nameof(CommonResource.IntezmenyHivatalosNev), ResourceType = typeof(CommonResource))]
|
|
[KretaRequired(typeof(CommonResource), nameof(CommonResource.IntezmenyHivatalosNevKotelezo))]
|
|
[StringLength(maximumLength: 255, ErrorMessageResourceName = nameof(ErrorResource.Max255Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
public string IntezmenyNev { get; set; }
|
|
|
|
[Display(Name = nameof(CommonResource.OMAzonosito), ResourceType = typeof(CommonResource))]
|
|
[KretaRequired(typeof(CommonResource), nameof(CommonResource.OMAzonositoKotelezo))]
|
|
[KretaStringLength(6, MinimumLength = 6, ErrorMessageResourceName = nameof(CommonResource.OMAzonosito6Szamjegy), ErrorMessageResourceType = typeof(CommonResource))]
|
|
[KretaRegularExpression(RegularExpressions.OMAzonosito, ErrorMessageResourceName = nameof(CommonResource.OMAzonosito6Szamjegy), ErrorMessageResourceType = typeof(CommonResource))]
|
|
public string OMKod { get; set; }
|
|
|
|
[PhoneExtended(ErrorMessageResourceName = nameof(ErrorResource.ATelefonszamFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[Display(Name = nameof(CommonResource.Telefonszam), ResourceType = typeof(CommonResource))]
|
|
public new string Telefon { get; set; }
|
|
|
|
[EmailAddressExtended(ErrorMessageResourceName = nameof(ErrorResource.EMailCimFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[StringLength(General.EmailMaximumKarakterekSzama, ErrorMessageResourceName = nameof(ErrorResource.EmailMax0Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[Display(Name = nameof(CommonResource.Email), ResourceType = typeof(CommonResource))]
|
|
public string Email { get; set; }
|
|
|
|
[EmailAddressExtended(true, true, ErrorMessageResourceName = nameof(ErrorResource.EMailCimFormatumaNemMegfelelo), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[StringLength(General.EmailMaximumKarakterekSzama, ErrorMessageResourceName = nameof(ErrorResource.EmailMax0Karakter), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[Display(Name = nameof(CommonResource.AdminEmail), ResourceType = typeof(CommonResource))]
|
|
public string AdminEmail { get; set; }
|
|
|
|
[Display(Name = nameof(CommonResource.RovidNev), ResourceType = typeof(CommonResource))]
|
|
[StringLength(50, ErrorMessageResourceName = nameof(ErrorResource.IntezmenyRovidNevTulHosszu), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
public string RovidNev { get; set; }
|
|
|
|
[Range(0, 500, ErrorMessageResourceName = nameof(ErrorResource.AzEngedelyezettAllashelyekSzamaMax500), ErrorMessageResourceType = typeof(ErrorResource))]
|
|
[Display(Name = nameof(IntezmenyResource.EngedelyezettPedagogusAllashely), ResourceType = typeof(IntezmenyResource))]
|
|
public double? EngedelyezettAllashely { get; set; }
|
|
|
|
[Display(Name = nameof(CommonResource.Cim), ResourceType = typeof(CommonResource))]
|
|
public string Cim => string.Format("{0} {1}, {2} {3} {4}{5}", Iranyitoszam_Str, HelysegNev_Str, KozteruletNev, KozteruletTipus_Str, string.IsNullOrWhiteSpace(Hazszam) ? "" : $"{Hazszam.TrimEnd('.')}.", string.IsNullOrWhiteSpace(Emelet) ? "" : string.Format(" {0}. em{1}", Emelet.Trim('.'), string.IsNullOrWhiteSpace(Ajto) ? "" : string.Format("/{0}.", Ajto.TrimEnd('.'))));
|
|
|
|
public IntezmenyiDokumentumModel AlapitoOkirat { get; set; }
|
|
|
|
public IntezmenyiDokumentumModel SZMSZ { get; set; }
|
|
|
|
public IntezmenyiDokumentumModel PedagogiaiProgram { get; set; }
|
|
|
|
public IntezmenyiDokumentumModel Hazirend { get; set; }
|
|
|
|
public IntezmenyiDokumentumModel Munkaterv { get; set; }
|
|
|
|
public IntezmenyiDokumentumModel MukodesiEngedely { get; set; }
|
|
|
|
[Display(Name = nameof(IntezmenyResource.Szakkepzo), ResourceType = typeof(IntezmenyResource))]
|
|
public bool IsSzakkepzo { get; set; }
|
|
|
|
[Display(Name = nameof(IntezmenyResource.JuttatasHatarnap), ResourceType = typeof(IntezmenyResource))]
|
|
public int JuttatasHatarnap { get; set; }
|
|
}
|
|
}
|