66 lines
2.9 KiB
C#
66 lines
2.9 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Kreta.BusinessLogic.HelperClasses;
|
|
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
|
using Kreta.Enums;
|
|
using Kreta.Resources;
|
|
using Kreta.Web.Helpers;
|
|
using Kreta.Web.Security;
|
|
|
|
namespace Kreta.Web.Areas.Tanar.Models
|
|
{
|
|
public class OralatogatasokKereseseModel
|
|
{
|
|
[Display(Name = nameof(OralatogatasokResource.IdoszakKezdete), ResourceType = typeof(OralatogatasokResource))]
|
|
public DateTime? IdoszakKezdete { get; set; }
|
|
|
|
[Display(Name = nameof(OralatogatasokResource.IdoszakVege), ResourceType = typeof(OralatogatasokResource))]
|
|
public DateTime? IdoszakVege { get; set; }
|
|
|
|
[Display(Name = nameof(OralatogatasokResource.LatogatottOsztalyCsoport), ResourceType = typeof(OralatogatasokResource))]
|
|
public int? OsztalyCsoportId { get; set; }
|
|
|
|
[Display(Name = nameof(OrarendResource.KapcsolodoCsoportok), ResourceType = typeof(OrarendResource))]
|
|
public bool KellKapcsolodoCsoportokSearch { get; set; }
|
|
|
|
[Display(Name = nameof(OralatogatasokResource.OralatogatastVegzoPedagogus), ResourceType = typeof(OralatogatasokResource))]
|
|
public int? TanarId { get; set; }
|
|
|
|
[Display(Name = nameof(OralatogatasokResource.LatogatottPedagogus), ResourceType = typeof(OralatogatasokResource))]
|
|
public int? LatogatottPedagogusId { get; set; }
|
|
|
|
[Display(Name = nameof(OralatogatasokResource.LatogatottOra), ResourceType = typeof(OralatogatasokResource))]
|
|
public int? TantargyId { get; set; }
|
|
|
|
[Display(Name = nameof(OsztalyCsoportResource.EllatottKoznevelesiFeladatTipus), ResourceType = typeof(OsztalyCsoportResource))]
|
|
public int? FeladatKategoriaId { get; set; }
|
|
|
|
[Display(Name = nameof(CommonResource.Feladatellatasihely), ResourceType = typeof(CommonResource))]
|
|
public int? FeladatEllatasiHelyId { get; set; }
|
|
|
|
public OralatogatasokKereseseModel()
|
|
{
|
|
if (ClaimData.IsVegyes)
|
|
{
|
|
FeladatKategoriaId = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Default_Feladat_Kategoria);
|
|
}
|
|
}
|
|
|
|
public OralatogatasokKereseseCO ConvertToCo(bool isTanar)
|
|
{
|
|
return new OralatogatasokKereseseCO
|
|
{
|
|
IdoszakKezdete = IdoszakKezdete,
|
|
IdoszakVege = IdoszakVege,
|
|
TanarId = TanarId,
|
|
TantargyId = TantargyId,
|
|
LatogatottPedagogusId = LatogatottPedagogusId,
|
|
OsztalyCsoportId = OsztalyCsoportId,
|
|
IsKellKapcsolodoCsoportok = KellKapcsolodoCsoportokSearch,
|
|
FeladatKategoriaId = FeladatKategoriaId,
|
|
FeladatEllatasiHelyId = FeladatEllatasiHelyId,
|
|
IsTanar = isTanar
|
|
};
|
|
}
|
|
}
|
|
}
|