using System.ComponentModel.DataAnnotations; using Kreta.BusinessLogic.HelperClasses; using Kreta.BusinessLogic.Interfaces; using Kreta.Core.CustomAttributes; using Kreta.Resources; namespace Kreta.Web.Areas.Adatszolgaltatasok.Models { public class OsztalyokEsCsoportokGridModel : IKretaIdentity { public const string OsztalyCsoportLetszamExportAttributeId = nameof(OsztalyCsoportLetszamExportAttributeId); public OsztalyokEsCsoportokGridModel() { } public OsztalyokEsCsoportokGridModel(OsztalyCsoportLetszamItemCo itemCo) { ID = itemCo.Id.ToString(); Nev = itemCo.Nev; Tipus = itemCo.Tipus; TanulokSzama = itemCo.TanulokSzama.ToString(); Evfolyam_DNAME = itemCo.EvfolyamNev; CsoportTipus_DNAME = itemCo.CsoportTipusNev; Osztalybontas = itemCo.OsztalyBontas; } public string ID { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 00, nameof(CommonResource.Nev), typeof(CommonResource))] [Display(Name = nameof(CommonResource.Nev), ResourceType = typeof(CommonResource))] public string Nev { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 01, nameof(OsztalyCsoportResource.Tipus), typeof(OsztalyCsoportResource))] [Display(Name = nameof(OsztalyCsoportResource.Tipus), ResourceType = typeof(OsztalyCsoportResource))] public string Tipus { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 02, nameof(OsztalyCsoportResource.Evfolyam), typeof(OsztalyCsoportResource))] [Display(Name = nameof(OsztalyCsoportResource.Evfolyam), ResourceType = typeof(OsztalyCsoportResource))] public string Evfolyam_DNAME { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 03, nameof(OsztalyCsoportResource.CsoportTipus), typeof(OsztalyCsoportResource))] [Display(Name = nameof(OsztalyCsoportResource.CsoportTipus), ResourceType = typeof(OsztalyCsoportResource))] public string CsoportTipus_DNAME { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 04, nameof(OsztalyCsoportResource.Osztalybontas), typeof(OsztalyCsoportResource))] [Display(Name = nameof(OsztalyCsoportResource.Osztalybontas), ResourceType = typeof(OsztalyCsoportResource))] public string Osztalybontas { get; set; } [SimpleExportColumn(OsztalyCsoportLetszamExportAttributeId, 05, nameof(OsztalyCsoportResource.Letszam), typeof(OsztalyCsoportResource))] [Display(Name = nameof(OsztalyCsoportResource.Letszam), ResourceType = typeof(OsztalyCsoportResource))] public string TanulokSzama { get; set; } } }