using System; using System.ComponentModel.DataAnnotations; using Kreta.BusinessLogic.Helpers; using Kreta.BusinessLogic.Interfaces; using Kreta.Core.CustomAttributes; using Kreta.Resources; using Kreta.Web.Attributes; namespace Kreta.Web.Areas.Intezmeny.Models { public class TanevRendjeGridModel : IKretaIdentity { #region Fields /// <summary> /// Technikai paraméter(ek) a reflection-ös exporthoz. /// </summary> public const string TanevRendjeExportAttributeId = nameof(TanevRendjeExportAttributeId); #endregion Fields public TanevRendjeGridModel() { } public TanevRendjeGridModel(TanevRendjeItemCo co) { ID = co.Id.ToString(); Datum = co.Datum; TanevNev = co.TanevNev; NapTipusNev = co.NapTipusNev; IsOrarendiNapText = co.IsOrarendiNapText; NapNev = co.NapNev; HetirendNev = co.HetirendNev; Megjegyzes = co.Megjegyzes; ErintettOsztalyCsoportText = co.ErintettOsztalyCsoportText; } public string ID { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 00, nameof(TanevResource.Tanev), typeof(TanevResource))] [KretaDisplayName(450)] public string TanevNev { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 01, nameof(TanevResource.Datum), typeof(TanevResource))] [KretaDisplayName(273)] public DateTime Datum { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 02, nameof(TanevResource.Naptipus), typeof(TanevResource))] [KretaDisplayName(671)] public string NapTipusNev { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 03, nameof(TanevResource.OrarendiNap), typeof(TanevResource))] [KretaDisplayName(672)] public string IsOrarendiNapText { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 04, nameof(TanevResource.ElteroOrarendSzerintiNap), typeof(TanevResource))] [Display(Name = nameof(IntezmenyResource.ElteroOrarendSzerintiNap), ResourceType = typeof(IntezmenyResource))] public string NapNev { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 05, nameof(TanevResource.OrarendiNapHetirendje), typeof(TanevResource))] [KretaDisplayName(265)] public string HetirendNev { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 06, nameof(TanevResource.Megjegyzes), typeof(TanevResource))] [KretaDisplayName(97)] public string Megjegyzes { get; set; } [SimpleExportColumn(TanevRendjeExportAttributeId, 07, nameof(TanevResource.ErintettOsztalyCsoport), typeof(TanevResource))] [Display(Name = nameof(IntezmenyResource.ErintettOsztalyCsoport), ResourceType = typeof(IntezmenyResource))] public string ErintettOsztalyCsoportText { get; set; } } }