init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
48
KretaWeb/Areas/Tanulo/Models/HetesekModel.cs
Normal file
48
KretaWeb/Areas/Tanulo/Models/HetesekModel.cs
Normal file
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.Tanulo.Models
|
||||
{
|
||||
public class HetesekModel : IKretaIdentity
|
||||
{
|
||||
public string ID { get; set; }
|
||||
|
||||
[Display(Name = nameof(HetesResource.HetSorszama), ResourceType = typeof(HetesResource))]
|
||||
public int HetSorszam { get; set; }
|
||||
|
||||
[Display(Name = nameof(HetesResource.HetKezdoNapja), ResourceType = typeof(HetesResource))]
|
||||
public DateTime HetKezdoNap { get; set; }
|
||||
|
||||
[Display(Name = nameof(HetesResource.HetUtolsoNapja), ResourceType = typeof(HetesResource))]
|
||||
public DateTime HetUtolsoNap { get; set; }
|
||||
|
||||
[Display(Name = nameof(HetesResource.Hetirend), ResourceType = typeof(HetesResource))]
|
||||
public string Hetirend { get; set; }
|
||||
|
||||
[Display(Name = nameof(HetesResource.HetesTanulok), ResourceType = typeof(HetesResource))]
|
||||
public string Tanulok { get; set; }
|
||||
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
public HetesekCO ToCo()
|
||||
{
|
||||
var tanuloIds = new List<int>();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(Tanulok))
|
||||
{
|
||||
tanuloIds = Tanulok.Split(',').Select(x => int.Parse(x)).ToList();
|
||||
}
|
||||
|
||||
return new HetesekCO()
|
||||
{
|
||||
HetSorszam = HetSorszam,
|
||||
TanuloIdList = tanuloIds
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue