152 lines
6.7 KiB
C#
152 lines
6.7 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using Kreta.BusinessLogic.HelperClasses;
|
|
using Kreta.Enums;
|
|
using Kreta.Resources;
|
|
|
|
namespace Kreta.Web.Areas.Tantargy.Models
|
|
{
|
|
public class TantargySearchModel
|
|
{
|
|
public TantargySearchModel()
|
|
{
|
|
}
|
|
|
|
public List<int> NemzetiDokumentumNyelvek { get; set; } = new List<int>();
|
|
|
|
public bool NemzetiDokumentumNyelvekMegjelenjenek
|
|
{
|
|
get
|
|
{
|
|
return NemzetiDokumentumNyelvek.Any(x => x == ((int)AnyanyelvEnum.horvat) || x == ((int)AnyanyelvEnum.szerb) || x == ((int)AnyanyelvEnum.roman));
|
|
}
|
|
}
|
|
|
|
[Display(Name = nameof(TantargyResource.TantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string TantargyNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.TantargyKategoria), ResourceType = typeof(TantargyResource))]
|
|
public int? TantargyKategoriaID { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.ESLTantargyKategoria), ResourceType = typeof(TantargyResource))]
|
|
public int? EslTargykategoriaTipusId { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.ErtekelesKorlatozas), ResourceType = typeof(TantargyResource))]
|
|
public int? IsErtekelesKorlatozva { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.Fotantargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsFotargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.KapcsolodoFotantargyNeve), ResourceType = typeof(TantargyResource))]
|
|
public int? KeresesFotargyID { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.GyakorlatiTargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsGyakorlati { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.TantargyRovidnev), ResourceType = typeof(TantargyResource))]
|
|
public string RovidNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.BizonyitvanybanMegjelenoNev), ResourceType = typeof(TantargyResource))]
|
|
public string BizonyitvanyNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.AltantargykentBizonyitvanyban), ResourceType = typeof(TantargyResource))]
|
|
public int? IsAltantargykentBizonyitvanyban { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.NincsBeloleOra), ResourceType = typeof(TantargyResource))]
|
|
public int? IsNincsBeloleOra { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.OsztalynaplobanNemJelenikMeg), ResourceType = typeof(TantargyResource))]
|
|
public int? IsOsztalyNaplobanNemJelenikMeg { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.OsztalyokOrarendjebenMegjelenik), ResourceType = typeof(TantargyResource))]
|
|
public int? IsOsztalyokOrarendjebenMegjelenik { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.TantagyAtlagbaSzamitasa), ResourceType = typeof(TantargyResource))]
|
|
public int? IsTanulmanyiAtlagbaSzamit { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.AmiTargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsAmiTargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.KollegiumiTargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsKollegiumTargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.EgymiTargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsEgymiTargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.FelnottoktatasTargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsFelnottoktatasTargy { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.AngolTantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string AngolNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.NemetTantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string NemetNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.HorvatTantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string HorvatNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.RomanTantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string RomanNev { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.SzerbTantargyNev), ResourceType = typeof(TantargyResource))]
|
|
public string SzerbNev { get; set; }
|
|
|
|
public bool? nincsTantargykategoria { get; set; }
|
|
|
|
[Display(Name = nameof(TantargyResource.MSZGtantargy), ResourceType = typeof(TantargyResource))]
|
|
public int? IsMszgTargyFltr { get; set; }
|
|
|
|
public bool IsFromSzervezet { get; set; }
|
|
|
|
public bool IsSzakkepzo { get; set; }
|
|
|
|
public static TantargySearchModel SetFilterTantargySearchModel(string filter)
|
|
{
|
|
TantargySearchModel result = new TantargySearchModel();
|
|
|
|
switch (filter)
|
|
{
|
|
case "nincskategoria":
|
|
result.nincsTantargykategoria = true;
|
|
break;
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
public TantargySearchCo ConvertToCo()
|
|
{
|
|
return new TantargySearchCo()
|
|
{
|
|
BizonyitvanyNev = this.BizonyitvanyNev,
|
|
IsAltantargykentBizonyitvanyban = this.IsAltantargykentBizonyitvanyban,
|
|
IsNincsBeloleOra = this.IsNincsBeloleOra,
|
|
IsOsztalyNaplobanNemJelenikMeg = this.IsOsztalyNaplobanNemJelenikMeg,
|
|
IsOsztalyokOrarendjebenMegjelenik = this.IsOsztalyokOrarendjebenMegjelenik,
|
|
IsTanulmanyiAtlagbaSzamit = this.IsTanulmanyiAtlagbaSzamit,
|
|
IsAmiTargy = this.IsAmiTargy,
|
|
IsKollegiumTargy = this.IsKollegiumTargy,
|
|
IsEgymiTargy = this.IsEgymiTargy,
|
|
IsFelnottoktatasTargy = this.IsFelnottoktatasTargy,
|
|
IsMszgTargy = this.IsMszgTargyFltr,
|
|
AngolNev = this.AngolNev,
|
|
NemetNev = this.NemetNev,
|
|
HorvatNev = this.HorvatNev,
|
|
RomanNev = this.RomanNev,
|
|
SzerbNev = this.SzerbNev,
|
|
IsErtekelesKorlatozva = this.IsErtekelesKorlatozva,
|
|
IsFotargy = this.IsFotargy,
|
|
IsGyakorlati = this.IsGyakorlati,
|
|
KeresesFotargyID = this.KeresesFotargyID,
|
|
nincsTantargykategoria = this.nincsTantargykategoria,
|
|
RovidNev = this.RovidNev,
|
|
TantargyKategoriaID = this.TantargyKategoriaID,
|
|
EslTargykategoriaTipusId = this.EslTargykategoriaTipusId,
|
|
TantargyNev = this.TantargyNev,
|
|
IsFromSzervezet = IsFromSzervezet,
|
|
IsSzakkepzo = IsSzakkepzo
|
|
};
|
|
}
|
|
}
|
|
}
|