77 lines
3.9 KiB
C#
77 lines
3.9 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kreta.BusinessLogic.Classes;
|
|
using Kreta.BusinessLogic.HelperClasses;
|
|
using Kreta.BusinessLogic.Interfaces;
|
|
using Kreta.Core.CustomAttributes;
|
|
using Kreta.Resources;
|
|
|
|
namespace Kreta.Web.Areas.Tantargy.Models
|
|
{
|
|
public class TantargyakGridModel : IKretaIdentity
|
|
{
|
|
public const string TantargyakExportAttributeId = nameof(TantargyakExportAttributeId);
|
|
|
|
public TantargyakGridModel()
|
|
{
|
|
|
|
}
|
|
|
|
public TantargyakGridModel(TantargyItemCo itemCo)
|
|
{
|
|
ID = itemCo.Id.ToString();
|
|
TantargyNev = itemCo.Nev;
|
|
TanevNev = itemCo.TanevNev;
|
|
TargyKategoria = itemCo.TargykategoriaTipusId;
|
|
TargyKategoriaNev = itemCo.TargykategoriaTipusNev;
|
|
FoTargyNev = itemCo.FotargyNev;
|
|
IsFotargy_BNAME = itemCo.IsFotargy.GetDisplayName();
|
|
GyakorlatiTargy = itemCo.IsGyakorlatiTargy;
|
|
GyakorlatiTargy_BNAME = itemCo.IsGyakorlatiTargy.GetDisplayName();
|
|
IsTanulmanyiAtlagbaSzamit_BNAME = itemCo.IsTanulmanyiAtlagbaSzamit.GetDisplayName();
|
|
IsErtekelesKorlatozva_BNAME = itemCo.IsErtekelesKorlatozva.GetDisplayName();
|
|
Sorszam = itemCo.Sorszam;
|
|
}
|
|
|
|
public string ID { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Nev), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 00, nameof(TantargyResource.Nev), typeof(TantargyResource))]
|
|
public string TantargyNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Tanev), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 01, nameof(TantargyResource.Tanev), typeof(TantargyResource))]
|
|
public string TanevNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Nev), ResourceType = typeof(TantargyResource))]
|
|
public int TargyKategoria { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.TantargyKategoria), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 02, nameof(TantargyResource.TantargyKategoria), typeof(TantargyResource))]
|
|
public string TargyKategoriaNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.KapcsolodoFotantargyNeve), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 04, nameof(TantargyResource.KapcsolodoFotantargyNeve), typeof(TantargyResource))]
|
|
public string FoTargyNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Fotantargy), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 03, nameof(TantargyResource.Fotantargy), typeof(TantargyResource))]
|
|
public string IsFotargy_BNAME { get; set; }
|
|
|
|
public bool GyakorlatiTargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.GyakorlatiTargy), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 05, nameof(TantargyResource.GyakorlatiTargy), typeof(TantargyResource))]
|
|
public string GyakorlatiTargy_BNAME { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.TantagyAtlagbaSzamitasa), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 06, nameof(TantargyResource.TantagyAtlagbaSzamitasa), typeof(TantargyResource))]
|
|
public string IsTanulmanyiAtlagbaSzamit_BNAME { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.ErtekelesKorlatozas), ResourceType = typeof(TantargyResource))]
|
|
[SimpleExportColumn(TantargyakExportAttributeId, 07, nameof(TantargyResource.ErtekelesKorlatozas), typeof(TantargyResource))]
|
|
public string IsErtekelesKorlatozva_BNAME { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Sorszam), ResourceType = typeof(TantargyResource))]
|
|
public int Sorszam { get; set; }
|
|
}
|
|
}
|