init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
38
KretaWeb/Areas/OsztalyCsoport/Models/EgyeniCsoportModel.cs
Normal file
38
KretaWeb/Areas/OsztalyCsoport/Models/EgyeniCsoportModel.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Helpers;
|
||||
|
||||
namespace Kreta.Web.Areas.OsztalyCsoport.Models
|
||||
{
|
||||
public class EgyeniCsoportModel
|
||||
{
|
||||
public int? ID { get; set; }
|
||||
|
||||
[Display(Name = nameof(OsztalyCsoportResource.CsoportNeve), ResourceType = typeof(OsztalyCsoportResource))]
|
||||
[KretaRequired(StringResourcesId = 1311)]
|
||||
[StringLength(maximumLength: 255, ErrorMessageResourceName = nameof(ErrorResource.CsoportNeveMax255), ErrorMessageResourceType = typeof(ErrorResource))]
|
||||
public string CsoportNeve { get; set; }
|
||||
|
||||
[Display(Name = nameof(CommonResource.Feladatellatasihely), ResourceType = typeof(CommonResource))]
|
||||
[KretaRequired(StringResourcesId = 1680)]
|
||||
public int? FeladatEllatasiHelyId { get; set; }
|
||||
|
||||
public CsoportCO ConvertToCsoportCo()
|
||||
{
|
||||
var feladatKategoriaId = new FeladatEllatasiHelyHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetFeladatKategoriaId(FeladatEllatasiHelyId ?? 0);
|
||||
return new CsoportCO()
|
||||
{
|
||||
CsoportNeve = CsoportNeve,
|
||||
CsoportTipus = feladatKategoriaId == (int)OktNevelesiKategoriaEnum.AlapfokuMuveszetoktatas ? (int)CsoportTipusEnum.AlapfMuvOktZenemuveszetiCsoportEgyeniFotanszak : (int)CsoportTipusEnum.egyeni_foglalkozasi_csoport,
|
||||
EvfolyamTipusa = (int)EvfolyamTipusEnum.na,
|
||||
FeladatEllatasiHelyId = FeladatEllatasiHelyId ?? 0,
|
||||
Id = ID ?? 0,
|
||||
OsztalyBontas = false
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue