29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
using System.Data;
|
|
using Kreta.BusinessLogic.Helpers;
|
|
using Kreta.Core.ConnectionType;
|
|
using Kreta.Enums;
|
|
|
|
namespace Kreta.Naplo.BusinessLogic.V3.Logic
|
|
{
|
|
public static class HelyettesitesLogic
|
|
{
|
|
public class Tanar
|
|
{
|
|
public Tanar(int tanarId, int tanevId, int intezmenyId, string intezmenyAzonosito, OktNevelesiKategoriaEnum? oktatasNevelesKategoriaEnum = null)
|
|
{
|
|
TanarHelyettesiteseiDt = new HelyettesitesHelper(new MobileConnectionType(tanarId, intezmenyId, intezmenyAzonosito, tanevId))
|
|
.GetHelyettesitesekListajaGrid(new Kreta.BusinessLogic.HelperClasses.HelyettesitesekListajaSearchCO
|
|
{
|
|
HelyettesitoTanarSearch = tanarId,
|
|
FeladatKategoriaId = oktatasNevelesKategoriaEnum.HasValue ? (int)oktatasNevelesKategoriaEnum : default
|
|
|
|
}).Tables[0];
|
|
}
|
|
|
|
private DataTable TanarHelyettesiteseiDt { get; set; }
|
|
|
|
public bool IsHelyettesito(int osztalyCsoportId, int tantargyId)
|
|
=> TanarHelyettesiteseiDt.Select($"OsztalyCsoportId = {osztalyCsoportId} AND TantargyId = {tantargyId}").Length > 0;
|
|
}
|
|
}
|
|
}
|