using System.ComponentModel.DataAnnotations; using Kreta.BusinessLogic.Classes; using Kreta.BusinessLogic.HelperClasses; using Kreta.BusinessLogic.Helpers.SystemSettings; using Kreta.Enums; using Kreta.Resources; using Kreta.Web.Attributes; using Kreta.Web.Helpers; using Kreta.Web.Security; namespace Kreta.Web.Areas.Tantargy.Models { public class TantargyFelosztasModel { public TantargyFelosztasModel() { if (ClaimData.IsVegyes) { SearchFeladatKategoriaId = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSystemSettingValue(RendszerBeallitasTipusEnum.Default_Feladat_Kategoria); } } [Display(Name = nameof(OsztalyCsoportResource.EllatottKoznevelesiFeladatTipus), ResourceType = typeof(OsztalyCsoportResource))] public int? SearchFeladatKategoriaId { get; set; } public int IntezmenyId { get; set; } [Display(Name = nameof(OsztalyCsoportResource.OsztalyCsoport), ResourceType = typeof(OsztalyCsoportResource))] public int? SearchOsztalCsoport { get; set; } /// TODO (Dev.Kornél): Typo [Display(Name = nameof(AdminisztracioResource.Tantargy), ResourceType = typeof(AdminisztracioResource))] public int? SearchTantargy { get; set; } [Display(Name = nameof(TantargyfelosztasResource.TanarPedagogusValasztasa), ResourceType = typeof(TantargyfelosztasResource))] public int? SearchTanar { get; set; } [KretaDisplayName(442)] public int? SearchEvfolyam { get; set; } [KretaDisplayName(254)/*Heti óraszám*/] [KretaRange(0, Kreta.Core.Constants.General.TantargyfelosztasImportMaxOraszam)] public double? SearchOraszam { get; set; } [KretaDisplayName(90)/*Feladatellátási hely*/] public int? SearchFeladatellatasihely { get; set; } [KretaDisplayName(255)/*Foglalkozas Typusa*/] public int? SearchFoglalkozasTipusa { get; set; } public bool ElfogadottTTF { get; set; } public bool ElfogadottESL { get; set; } public bool VeglegesTTF { get; set; } public bool VeglegesESL { get; set; } [Display(Name = nameof(TantargyfelosztasResource.Osztalybontasokkal), ResourceType = typeof(TantargyfelosztasResource))] public bool Osztalybontasokkal { get; set; } [Display(Name = nameof(TantargyfelosztasResource.KapcsolodoCsoportokkal), ResourceType = typeof(TantargyfelosztasResource))] public bool KapcsolodoCsoportokkal { get; set; } public bool IsFromSzervezet { get; set; } [Display(Name = nameof(AlkalmazottResource.DualisKepzohelyNeve), ResourceType = typeof(AlkalmazottResource))] public string DualisKepzohelyNeve { get; set; } [Display(Name = nameof(AlkalmazottResource.DualisKepzohelyAdoszama), ResourceType = typeof(AlkalmazottResource))] public string DualisKepzohelyAdoszama { get; set; } public string ControllerName { get; set; } public string ApiControllerName { get; set; } public TantargyFelosztasKeresesCo ConvertToCo() { return new TantargyFelosztasKeresesCo() { Feladatellatasihely = SearchFeladatellatasihely, FeladatKategoriaId = SearchFeladatKategoriaId, IsKapcsolodoCsoportokkal = KapcsolodoCsoportokkal, IsOsztalybontasokkal = Osztalybontasokkal, Oraszam = SearchOraszam, OsztalyCsoport = SearchOsztalCsoport, Tanar = SearchTanar, Tantargy = SearchTantargy, IsFromSzervezet = IsFromSzervezet, DualisKepzohelyNeve = DualisKepzohelyNeve, DualisKepzohelyAdoszama = DualisKepzohelyAdoszama, }; } } }