using Kreta.BusinessLogic.Classes; using Kreta.BusinessLogic.HelperClasses; using Kreta.Enums; using Kreta.Enums.ManualEnums; using Kreta.Resources; using Kreta.Web.Security; namespace Kreta.Web.Areas.Adminisztracio.Models { public class TelefonElerhetosegModel { public int? Id { get; set; } public string TextBoxId { get; set; } public string ComboBoxId { get; set; } public int? Tipus { get; set; } public string Telefonszam { get; set; } public bool Alapertelmezett { get; set; } public ElerhetosegStatusEnum Status { get; set; } public bool IsPublic { get { return Tipus == (int)TelefonTipusEnum.PublikusTelefonszam; } } public string Label { get { var label = string.Empty; if (Tipus.HasValue) { var tipusString = ((TelefonTipusEnum)Tipus).GetDisplayName(ClaimData.SelectedTanevID.Value); label = $"{tipusString} {CommonResource.Telefonszam.ToLower()}"; } return label; } } public TelefonElerhetosegCo ConvertToCo() { return new TelefonElerhetosegCo { Id = Id, TextBoxId = TextBoxId, Tipus = Tipus.Value, Telefonszam = Telefonszam, Alapertelmezett = Alapertelmezett, IsPublic = IsPublic, Status = Status }; } } }