24 lines
1.7 KiB
C#
24 lines
1.7 KiB
C#
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Logic
|
|
{
|
|
using Kreta.BusinessLogic.Helpers;
|
|
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
|
using Kreta.Core.ConnectionType;
|
|
using Kreta.Enums;
|
|
using Kreta.Enums.ManualEnums.SystemSettings;
|
|
|
|
public static class SystemSettingsLogic
|
|
{
|
|
public static bool IsMagantanuloOralatogatasAloliMentessegEnabled(int tantargyId, string intezmenyAzonosito, int tanevId, int userId, int intezmenyId)
|
|
{
|
|
var magantanuloMulasztasSystemSetting = (SystemSettingMagantanuloMulasztas)new SystemSettingsHelper(new MobileConnectionType(userId, intezmenyId, intezmenyAzonosito, tanevId)).GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Magantanulo_oralatogatas_aloli_mentessegenek_kezelese);
|
|
var IsNemKellMegjelennie = magantanuloMulasztasSystemSetting == SystemSettingMagantanuloMulasztas.NemKellMegjelennie;
|
|
var IsNemGyakorlatiTantargyonResztKellVennie = magantanuloMulasztasSystemSetting == SystemSettingMagantanuloMulasztas.CsakGyakorlaton && !new TantargyHelper(new MobileConnectionType(userId, intezmenyId, intezmenyAzonosito, tanevId)).IsGyakorlatiTantargy(tantargyId);
|
|
|
|
return IsNemKellMegjelennie || IsNemGyakorlatiTantargyonResztKellVennie;
|
|
}
|
|
|
|
public static bool IsMulasztasokParhuzamosOraKezelesUtkozesVizsgalatEnabled(string intezmenyAzonosito, int tanevId, int userId, int intezmenyId)
|
|
=> new SystemSettingsHelper(new MobileConnectionType(userId, intezmenyId, intezmenyAzonosito, tanevId)).GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.A_foglalkozasok_mulasztasi_adatai_megadasanal_a_parhuzamos_orakkal_valo_utkozes_vizsgalata);
|
|
|
|
}
|
|
}
|