kreta/KretaWeb/Areas/OsztalyCsoport/Models/OsztalyGridModel.cs
2024-03-13 00:33:46 +01:00

86 lines
4.9 KiB
C#

using System.ComponentModel.DataAnnotations;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.BusinessLogic.Interfaces;
using Kreta.Core.CustomAttributes;
using Kreta.Resources;
namespace Kreta.Web.Areas.OsztalyCsoport.Models
{
public class OsztalyGridModel : IKretaIdentity
{
public const string OsztalyExportAttributeId = nameof(OsztalyExportAttributeId);
public const string OsztalyAmiExportAttributeId = nameof(OsztalyAmiExportAttributeId);
public OsztalyGridModel()
{
}
public OsztalyGridModel(OsztalyItemCo osztalyItemCo)
{
ID = osztalyItemCo.Id.ToString();
TanevNev = osztalyItemCo.TanevNev;
OsztalyFonok = osztalyItemCo.Osztalyfonok;
OsztalyFonokElotagNelkul = osztalyItemCo.OsztalyfonokElotagNelkul;
OsztalyNev = osztalyItemCo.Nev;
EvfolyamId = osztalyItemCo.EvfolyamId;
EvfolyamNev = osztalyItemCo.EvfolyamNev;
TeremNev = osztalyItemCo.TeremNev;
VegzosEvFolyam_BNAME = osztalyItemCo.VegzosEvfolyam_BNAME;
TanulokSzama = osztalyItemCo.TanulokSzama;
TanulokSzamaOrder = osztalyItemCo.TanulokSzamaOrder;
CsoportokSzama = osztalyItemCo.CsoportokSzama;
MuveszetiAgNev = osztalyItemCo.MuveszetiAgNev;
}
public string ID { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Tanev), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 00, nameof(OsztalyCsoportResource.Tanev), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 00, nameof(OsztalyCsoportResource.Tanev), typeof(OsztalyCsoportResource))]
public string TanevNev { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Osztalyfonok), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 03, nameof(OsztalyCsoportResource.Osztalyfonok), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 03, nameof(OsztalyCsoportResource.Osztalyfonok), typeof(OsztalyCsoportResource))]
public string OsztalyFonok { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Osztalyfonok), ResourceType = typeof(OsztalyCsoportResource))]
public string OsztalyFonokElotagNelkul { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.OsztalyNeve), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 01, nameof(OsztalyCsoportResource.OsztalyNeve), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 01, nameof(OsztalyCsoportResource.OsztalyNeve), typeof(OsztalyCsoportResource))]
public string OsztalyNev { get; set; }
public int EvfolyamId { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Evfolyam), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 02, nameof(OsztalyCsoportResource.Evfolyam), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 02, nameof(OsztalyCsoportResource.Evfolyam), typeof(OsztalyCsoportResource))]
public string EvfolyamNev { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Osztalyterem), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 04, nameof(OsztalyCsoportResource.Osztalyterem), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 04, nameof(OsztalyCsoportResource.Osztalyterem), typeof(OsztalyCsoportResource))]
public string TeremNev { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.Vegzos), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 05, nameof(OsztalyCsoportResource.Vegzos), typeof(OsztalyCsoportResource))]
public string VegzosEvFolyam_BNAME { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.TanulokSzama), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyExportAttributeId, 06, nameof(OsztalyCsoportResource.TanulokSzama), typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 06, nameof(TanuloResource.NovendekekSzama), typeof(TanuloResource))]
public string TanulokSzama { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.TanulokSzama), ResourceType = typeof(OsztalyCsoportResource))]
public int TanulokSzamaOrder { get; set; }
public int CsoportokSzama { get; set; }
[Display(Name = nameof(OsztalyCsoportResource.MuvesztiAg), ResourceType = typeof(OsztalyCsoportResource))]
[SimpleExportColumn(OsztalyAmiExportAttributeId, 05, nameof(OsztalyCsoportResource.MuvesztiAg), typeof(OsztalyCsoportResource))]
public string MuveszetiAgNev { get; set; }
}
}