init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,231 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{920DDAC6-E3E7-4928-A9B3-2D84DAF6D5B4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Ellenorzo.Domain</RootNamespace>
|
||||
<AssemblyName>Kreta.Ellenorzo.Domain</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>
|
||||
</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Kreta.Core.Validation, Version=2.0.16.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Validation.2.0.16\lib\net452\Kreta.Core.Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="VN\BejelentettSzamonkeres\BejelentettSzamonkeresListRequest.cs" />
|
||||
<Compile Include="VN\BejelentettSzamonkeres\BejelentettSzamonkeresListResponse.cs" />
|
||||
<Compile Include="VN\Common\ApiSecurity.cs" />
|
||||
<Compile Include="VN\Common\DefaultConnectionParameters.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloBaseAdatlapRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloAdatokResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloAdatlapRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\NapiErtesitesOsszefoglaloResponse.cs" />
|
||||
<Compile Include="VN\HaziFeladat\Csatolmany\CsatolmanySimplifiedResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\OsztalyAtlag\OsztalyAtlagListRequest.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\OsztalyAtlag\OsztalyAtlagListResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagListRequest.cs" />
|
||||
<Compile Include="VN\Faliujsag\FaliujsagListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokHelyettesSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\BankszamlaResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\BankszamlaRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\ElerhetosegRequest.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraJelentkezesCreateRequest.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraResponse.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraIdopontResponse.cs" />
|
||||
<Compile Include="VN\Common\MobileUser.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="VN\Common\DateTimeIntervalRequest.cs" />
|
||||
<Compile Include="VN\Constant.cs" />
|
||||
<Compile Include="VN\Converter\ResponseModelConverter.cs" />
|
||||
<Compile Include="VN\Adatszotar\Adatszotar.cs" />
|
||||
<Compile Include="VN\Email\EmailListRequest.cs" />
|
||||
<Compile Include="VN\Email\EmailListResponse.cs" />
|
||||
<Compile Include="VN\Email\EmailResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagListResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagRequest.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\ErtekelesListResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\ErtekelesListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\AlkalmazottListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\AlkalmazottListResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokListResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\TanarListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\TanarListResponse.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraListRequest.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraListResponse.cs" />
|
||||
<Compile Include="VN\Fogadoora\Idopont\FogadooraIdopontJelentkezesDeleteRequest.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatDetailResponse.cs" />
|
||||
<Compile Include="VN\Interfaces\ISortable.cs" />
|
||||
<Compile Include="VN\Interfaces\IReadonlyUidRaw.cs" />
|
||||
<Compile Include="VN\Intezmeny\IntezmenyAdatok.cs" />
|
||||
<Compile Include="VN\Intezmeny\Rendszermodul\RendszermodulListResponse.cs" />
|
||||
<Compile Include="VN\Intezmeny\TestreszabasBeallitasok\TestreszabasBeallitasokResponse.cs" />
|
||||
<Compile Include="VN\Lep\EloadasResponse.cs" />
|
||||
<Compile Include="VN\Lep\GondviseloEngedelyezesRequest.cs" />
|
||||
<Compile Include="VN\Logic\EnumLogic.cs" />
|
||||
<Compile Include="VN\Logic\OsztalyCsoportLogic.cs" />
|
||||
<Compile Include="VN\Csatolmany\CsatolmanyListRequest.cs" />
|
||||
<Compile Include="VN\Csatolmany\CsatolmanySimplifiedResponse.cs" />
|
||||
<Compile Include="VN\Orarend\OrarendElemGetRequest.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportListRequest.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportListResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportTagsagResponse.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\Osztaly\OsztalyTanuloiListRequest.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\TanuloSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatGetRequest.cs" />
|
||||
<Compile Include="VN\Indexers\UidsCollection.cs" />
|
||||
<Compile Include="VN\Interfaces\IModelValidacio.cs" />
|
||||
<Compile Include="VN\Interfaces\IRequestUidFilter.cs" />
|
||||
<Compile Include="VN\Interfaces\IRequestUidsFilter.cs" />
|
||||
<Compile Include="VN\Intezmeny\TanevRendje\TanevRendjeListResponse.cs" />
|
||||
<Compile Include="VN\Intezmeny\Hetirend\HetirendListRequest.cs" />
|
||||
<Compile Include="VN\Intezmeny\Hetirend\HetirendListResponse.cs" />
|
||||
<Compile Include="VN\Intezmeny\IntezmenyResponse.cs" />
|
||||
<Compile Include="VN\Logic\UidLogic.cs" />
|
||||
<Compile Include="VN\Ora\TanitasiOra\TanitasiOraResponse.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\AtlagAlakulasaResponse.cs" />
|
||||
<Compile Include="VN\Feljegyzes\FeljegyzesListResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokGetResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\TanarSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\GondviseloGetResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\OsztalyfonokGetResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\TanuloAdatResponse.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\TanuloGetResponse.cs" />
|
||||
<Compile Include="VN\Common\IntezmenyModel.cs" />
|
||||
<Compile Include="VN\Faliujsag\FaliujsagListResponse.cs" />
|
||||
<Compile Include="VN\Feljegyzes\FeljegyzesListRequest.cs" />
|
||||
<Compile Include="VN\Mulasztas\MulasztasListRequest.cs" />
|
||||
<Compile Include="VN\Mulasztas\MulasztasListResponse.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatListRequest.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatListResponse.cs" />
|
||||
<Compile Include="VN\Orarend\OrarendElemListRequest.cs" />
|
||||
<Compile Include="VN\Orarend\OrarendElemListResponse.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportResponse.cs" />
|
||||
<Compile Include="VN\Tantargy\TantargyResponse.cs" />
|
||||
<Compile Include="VN\Tantargy\TanuloAktualisanTanultTantargyListRequest.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonListRequest.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonListResponse.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonResponse.cs" />
|
||||
<Compile Include="VN\Terem\TeremSimplifiedResponse.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\BejelentettSzamonkeresUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\AdatszotarUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\EloadasUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\HaziFeladatCsatolmanyUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\CsatolmanyUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\ErtekelesUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\FogadooraUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\HaziFeladatKommentUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\HaziFeladatUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\FeljegyzesUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\IntezmenyUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OktatasiNevelesiFeladatUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\NyelviFeladatGroupUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OraiFeladatGroupUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OrarendUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TanevRendjeUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\HetirendUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OsztalyCsoportUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OsztalyUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\CsoportUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\FaliujsagUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OsztalyfonokUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OsztalyfonokHelyettesUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\AlkalmazottUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TanarUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\OrarendElemUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TantargyFelosztasUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TanuloUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\GondviseloUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\FelhasznaloUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\MulasztasUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\EmailUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TantargyUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TelefonUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\TeremUid.cs" />
|
||||
<Compile Include="VN\UniqueIdentifier\FogadooraIdopontUid.cs" />
|
||||
<Compile Include="VN\Utility\Extensions.cs" />
|
||||
<Compile Include="VN\Utility\ValidationAttributes\ShortDateTimeAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418d3e-caf1-482c-9b18-85d147abd495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.DataAccessManual\Kreta.DataAccessManual.csproj">
|
||||
<Project>{3212F2BF-6883-48B4-9F7D-0DFF4C826221}</Project>
|
||||
<Name>Kreta.DataAccessManual</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Enums\Kreta.Enums.csproj">
|
||||
<Project>{1d5e0ac2-dfab-4d32-9ad1-b5788a7d06bd}</Project>
|
||||
<Name>Kreta.Enums</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Resources\Kreta.Resources.csproj">
|
||||
<Project>{DFCB4D33-B599-42B2-98C6-B60FD220DB0C}</Project>
|
||||
<Name>Kreta.Resources</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Ellenorzo.Dao\Kreta.Ellenorzo.Dao.csproj">
|
||||
<Project>{29AF1E7D-3220-462F-B90D-ABA3C984987B}</Project>
|
||||
<Name>Kreta.Ellenorzo.Dao</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Ellenorzo.Enum\Kreta.Ellenorzo.Enums.csproj">
|
||||
<Project>{e8717728-75ca-4f4a-b23d-53c593ff0840}</Project>
|
||||
<Name>Kreta.Ellenorzo.Enums</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Adatszotar
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.05.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Adatszotar<T> where T : Enum
|
||||
{
|
||||
private string _leiras;
|
||||
|
||||
public Adatszotar(int id)
|
||||
{
|
||||
Uid = new AdatszotarUid(id, GetEnumName(id));
|
||||
}
|
||||
|
||||
public Adatszotar(int id, string leiras)
|
||||
{
|
||||
Uid = new AdatszotarUid(id, GetEnumName(id));
|
||||
Leiras = leiras;
|
||||
}
|
||||
|
||||
public Adatszotar(string leiras)
|
||||
{
|
||||
Uid = new AdatszotarUid(0, GetEnumName(0));
|
||||
Leiras = leiras;
|
||||
}
|
||||
|
||||
//INFO Devkornel: Ezt csak indokolt esetben használd!
|
||||
public Adatszotar(string nev, string leiras)
|
||||
{
|
||||
Uid = new AdatszotarUid(0, nev);
|
||||
Leiras = leiras;
|
||||
}
|
||||
|
||||
public string EnumTypeFullName => typeof(T).Name;
|
||||
|
||||
public string EnumTypeName => EnumTypeFullName.Replace("Enum", string.Empty).Replace("enum", string.Empty);
|
||||
|
||||
public static bool IsAdatszotarElem(int id) => id >= Constant.EgyedilegFelvettAdatSzotarElemStartIndex && string.IsNullOrWhiteSpace(Enum.GetName(typeof(T), id));
|
||||
|
||||
public string Leiras { get => _leiras ?? GetDisplayNameAttribute(); private set => _leiras = value; }
|
||||
|
||||
public AdatszotarUid Uid { get; private set; }
|
||||
|
||||
private string GetEnumName(int id) => id == 0 ? $"{typeof(T)}_{nameof(Enums.VN.Adatszotar.IsmeretlenErtek)}"
|
||||
: IsAdatszotarElem(id) ? nameof(Enums.VN.Adatszotar.AdatszotarElem)
|
||||
: Enum.GetName(typeof(T), id);
|
||||
|
||||
public override bool Equals(object obj) => obj is Adatszotar<T> @enum && Uid.Id == @enum.Uid.Id;
|
||||
|
||||
public T GetEnum() => (T)Enum.Parse(typeof(T), Uid.Nev);
|
||||
|
||||
public override int GetHashCode() => 2_108_858_624 + Uid.Id.GetHashCode();
|
||||
|
||||
private string GetDisplayNameAttribute()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Uid.Nev))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var fieldInfo = typeof(T).GetField(Uid.Nev);
|
||||
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
DisplayAttribute attributes = (DisplayAttribute)fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false).FirstOrDefault();
|
||||
|
||||
if (attributes != null)
|
||||
{
|
||||
return attributes.GetName();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static implicit operator Adatszotar<T>(int id) => new Adatszotar<T>(id);
|
||||
|
||||
public static implicit operator Adatszotar<T>(T enumValue) => new Adatszotar<T>(Convert.ToInt32(enumValue));
|
||||
|
||||
public static bool operator !=(Adatszotar<T> lhsWrapper, T rhsEnum) => IsAdatszotarElem(lhsWrapper.Uid.Id) || !lhsWrapper.GetEnum().Equals(rhsEnum);
|
||||
|
||||
#pragma warning disable S3875 // "operator==" should not be overloaded on reference types
|
||||
public static bool operator ==(Adatszotar<T> lhsWrapper, T rhsEnum) => !IsAdatszotarElem(lhsWrapper.Uid.Id) && lhsWrapper.GetEnum().Equals(rhsEnum);
|
||||
#pragma warning restore S3875 // "operator==" should not be overloaded on reference types
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresListRequest : IValidatableObject, IRequestUidsFilter<BejelentettSzamonkeresUid>, IModelValidacio<BejelentettSzamonkeresListRequest>
|
||||
{
|
||||
public BejelentettSzamonkeresListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public BejelentettSzamonkeresListRequest(string uidsRaw)
|
||||
{
|
||||
Uids = string.IsNullOrWhiteSpace(uidsRaw) ? null : new UidsCollection<BejelentettSzamonkeresUid>(uidsRaw, UidConverter);
|
||||
}
|
||||
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public Dictionary<Predicate<BejelentettSzamonkeresListRequest>, string> ModelValidaciok => new Dictionary<Predicate<BejelentettSzamonkeresListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 31),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 1 hónap intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public UidsCollection<BejelentettSzamonkeresUid> Uids { get; private set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
public static readonly Converter<string[], BejelentettSzamonkeresUid> UidConverter = uidRaw => new BejelentettSzamonkeresUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresListResponse : IEqualityComparer<BejelentettSzamonkeresListResponse>
|
||||
{
|
||||
public DateTime BejelentesDatuma { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public Adatszotar<HetNapjaTipusEnum> HetNapja { get; set; }
|
||||
|
||||
public int OrarendiOraOraszama { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse RogzitoTanar { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesModEnum> SzamonkeresModja { get; set; }
|
||||
|
||||
public string SzamonkeresTemaja { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public BejelentettSzamonkeresUid Uid { get; set; }
|
||||
|
||||
public bool Equals(BejelentettSzamonkeresListResponse x, BejelentettSzamonkeresListResponse y) => x.Uid.Equals(x.Uid, y.Uid) && x.OrarendiOraOraszama == y.OrarendiOraOraszama;
|
||||
|
||||
public int GetHashCode(BejelentettSzamonkeresListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Common
|
||||
{
|
||||
public class ApiSecurity
|
||||
{
|
||||
public ApiSecurity(string accessTokenRaw, string securityKey)
|
||||
{
|
||||
AccessTokenRaw = accessTokenRaw;
|
||||
SecurityKey = securityKey;
|
||||
Signature = AccessTokenRaw.Split('.')[2];
|
||||
}
|
||||
|
||||
public string AccessTokenRaw { get; private set; }
|
||||
public string SecurityKey { get; private set; }
|
||||
public string Signature { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Common
|
||||
{
|
||||
public class DateTimeIntervalRequest : IValidatableObject
|
||||
{
|
||||
private DateTime? _toDate;
|
||||
|
||||
public DateTimeIntervalRequest(DefaultInterval defaultInterval)
|
||||
{
|
||||
switch (defaultInterval)
|
||||
{
|
||||
case DefaultInterval.AktivTanev:
|
||||
FromDate = null;
|
||||
_toDate = null;
|
||||
break;
|
||||
case DefaultInterval.None:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTimeIntervalRequest(DefaultInterval defaultInterval, DateTime? fromDate, DateTime? toDate) : this(defaultInterval)
|
||||
{
|
||||
if (fromDate.HasValue || toDate.HasValue)
|
||||
{
|
||||
FromDate = fromDate;
|
||||
ToDate = toDate;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime? FromDate { get; private set; }
|
||||
|
||||
public DateTime? ToDate { get => _toDate?.Date.AddDays(1).AddSeconds(-1); private set => _toDate = value; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (FromDate > ToDate)
|
||||
{
|
||||
yield return new ValidationResult("ToDateMustBeGreaterOrEqualThanFromDate");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.DataAccessManual.Interfaces;
|
||||
using Kreta.Ellenorzo.Dao.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Common
|
||||
{
|
||||
public class DefaultConnectionParameters
|
||||
{
|
||||
public string IntezmenyAzonosito { get; }
|
||||
|
||||
public int IntezmenyId { get; }
|
||||
|
||||
public int TanevId { get; }
|
||||
|
||||
public int TanevSorszam { get; }
|
||||
|
||||
public int FelhasznaloId { get; }
|
||||
|
||||
public int TanuloId { get; }
|
||||
|
||||
public int? GondviseloId { get; }
|
||||
|
||||
public IEnumerable<FelhasznaloSzerepkor> JogosultsagLista { get; }
|
||||
|
||||
public IDalHandler DalHandler { get; set; }
|
||||
|
||||
public string UserName { get; }
|
||||
|
||||
public Guid UserIdpUniqueId { get; }
|
||||
|
||||
public Guid StudentIdpUniqueId { get; }
|
||||
|
||||
public Guid InstituteUniqueId { get; }
|
||||
|
||||
public DefaultConnectionParameters(MobileUser mobileUser, IntezmenyAdatokDao intezmenyAdatok, string intezmenyAzonosito)
|
||||
{
|
||||
IntezmenyAzonosito = intezmenyAzonosito;
|
||||
TanuloId = mobileUser.UserId;
|
||||
GondviseloId = mobileUser.TutelaryId;
|
||||
FelhasznaloId = GondviseloId ?? TanuloId;
|
||||
JogosultsagLista = mobileUser.Roles;
|
||||
UserName = mobileUser.UserName;
|
||||
UserIdpUniqueId = mobileUser.UserIdpUniqueId;
|
||||
StudentIdpUniqueId = mobileUser.StudentIdpUniqueId;
|
||||
TanevId = intezmenyAdatok.TanevId;
|
||||
TanevSorszam = intezmenyAdatok.TanevSorszam;
|
||||
IntezmenyId = intezmenyAdatok.IntezmenyId;
|
||||
InstituteUniqueId = mobileUser.InstituteUniqueId;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Common
|
||||
{
|
||||
public class IntezmenyModel : IEqualityComparer<IntezmenyModel>
|
||||
{
|
||||
public IntezmenyUid Uid { get; set; }
|
||||
|
||||
public string Azonosito { get; set; }
|
||||
|
||||
public string TeljesNev { get; set; }
|
||||
|
||||
public bool Equals(IntezmenyModel x, IntezmenyModel y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(IntezmenyModel obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Common
|
||||
{
|
||||
public class MobileUser
|
||||
{
|
||||
private const int MinimumIdentifierValue = 1;
|
||||
|
||||
public MobileUser(string instituteCode, int userId, string userName, int? tutelaryId, IEnumerable<FelhasznaloSzerepkor> roles, int schoolYearId, ApiSecurity apiSecurity, Guid userIdpUniqueId, Guid studentIdpUniqueId, Guid instituteUniqueId)
|
||||
{
|
||||
ApiSecurity = apiSecurity;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(instituteCode))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(instituteCode)} cannot be null or whitespace");
|
||||
}
|
||||
|
||||
InstituteCode = instituteCode;
|
||||
|
||||
if (userId < MinimumIdentifierValue)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(userId)} must be greater or equal to {MinimumIdentifierValue}");
|
||||
}
|
||||
|
||||
UserId = userId;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(userName))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(userName)} cannot be null or whitespace");
|
||||
}
|
||||
|
||||
UserName = userName;
|
||||
|
||||
if (roles == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(roles));
|
||||
}
|
||||
|
||||
if (!roles.Any())
|
||||
{
|
||||
throw new ArgumentException($"User \"{instituteCode}/{userId}\" must have at least one role");
|
||||
}
|
||||
|
||||
Roles = roles;
|
||||
|
||||
if (tutelaryId != null)
|
||||
{
|
||||
if (tutelaryId < MinimumIdentifierValue)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(tutelaryId)} must be greater or equal to {MinimumIdentifierValue}");
|
||||
}
|
||||
|
||||
if (!roles.Contains(FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(roles)} must contain {FelhasznaloSzerepkor.Gondviselo} because {nameof(tutelaryId)} is not null");
|
||||
}
|
||||
}
|
||||
|
||||
TutelaryId = tutelaryId;
|
||||
|
||||
if (schoolYearId < MinimumIdentifierValue)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(schoolYearId)} must be greater or equal to {MinimumIdentifierValue}");
|
||||
}
|
||||
|
||||
SchoolYearId = schoolYearId;
|
||||
|
||||
UserIdpUniqueId = userIdpUniqueId;
|
||||
|
||||
StudentIdpUniqueId = studentIdpUniqueId;
|
||||
|
||||
InstituteUniqueId = instituteUniqueId;
|
||||
}
|
||||
|
||||
public int ActualUserId => TutelaryId ?? UserId;
|
||||
|
||||
public string InstituteCode { get; }
|
||||
|
||||
public ApiSecurity ApiSecurity { get; }
|
||||
|
||||
public int SchoolYearId { get; }
|
||||
|
||||
public IEnumerable<FelhasznaloSzerepkor> Roles { get; }
|
||||
|
||||
public int? TutelaryId { get; }
|
||||
|
||||
public int UserId { get; }
|
||||
|
||||
public string UserName { get; }
|
||||
|
||||
public Guid UserIdpUniqueId { get; }
|
||||
|
||||
public Guid StudentIdpUniqueId { get; }
|
||||
|
||||
public Guid InstituteUniqueId { get; }
|
||||
}
|
||||
}
|
15
Kreta.WebApi/Ellenorzo/Kreta.Ellenorzo.Domain/VN/Constant.cs
Normal file
15
Kreta.WebApi/Ellenorzo/Kreta.Ellenorzo.Domain/VN/Constant.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN
|
||||
{
|
||||
public static class Constant
|
||||
{
|
||||
public static readonly char UidInnerDelimiter = ',';
|
||||
|
||||
public static readonly string UidNullValue = "null";
|
||||
|
||||
public static readonly string UidNanValue = "HibasUid";
|
||||
|
||||
public static readonly char UidDelimiter = ';';
|
||||
|
||||
public static readonly int EgyedilegFelvettAdatSzotarElemStartIndex = 100_000;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Converter
|
||||
{
|
||||
/// <summary>
|
||||
/// This registers the converter functions called ModelToModel, but it's not mandatory to do.
|
||||
/// </summary>
|
||||
public static class ResponseModelConverter
|
||||
{
|
||||
public static HashSet<GondviseloGetResponse> ModelToModel(IEnumerable<GondviseloResponse> model) => model.ConvertAll(ModelToModel).ToHashSet();
|
||||
|
||||
private static GondviseloGetResponse ModelToModel(GondviseloResponse model) => (GondviseloGetResponse)model;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Csatolmany
|
||||
{
|
||||
public class CsatolmanyListRequest
|
||||
{
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
public DateTime DatumIg { get; set; }
|
||||
|
||||
public IEnumerable<OrarendElemUid> OrarendElemUids { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Csatolmany
|
||||
{
|
||||
public class CsatolmanySimplifiedResponse : IEqualityComparer<CsatolmanySimplifiedResponse>
|
||||
{
|
||||
public CsatolmanyUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool Equals(CsatolmanySimplifiedResponse x, CsatolmanySimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(CsatolmanySimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Email
|
||||
{
|
||||
public class EmailListRequest
|
||||
{
|
||||
public List<int> FelhasznaloIds { get; set; }
|
||||
|
||||
public bool? IsPublic { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Email
|
||||
{
|
||||
public class EmailListResponse : IEqualityComparer<EmailListResponse>
|
||||
{
|
||||
public FelhasznaloUid FelhasznaloUid { get; set; }
|
||||
|
||||
public List<EmailResponse> Emailek { get; set; } = new List<EmailResponse>();
|
||||
|
||||
public EmailListResponse()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public bool Equals(EmailListResponse x, EmailListResponse y) => x == y || x.FelhasznaloUid.Equals(x.FelhasznaloUid, y.FelhasznaloUid);
|
||||
|
||||
public int GetHashCode(EmailListResponse obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Email
|
||||
{
|
||||
public class EmailResponse : IEqualityComparer<EmailResponse>
|
||||
{
|
||||
public string Email { get; set; }
|
||||
|
||||
public Adatszotar<EmailTipusEnum> Tipus { get; set; }
|
||||
|
||||
public bool IsAlapertelmezett { get; set; }
|
||||
|
||||
public EmailUid Uid { get; set; }
|
||||
|
||||
public bool Equals(EmailResponse x, EmailResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(EmailResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
public class OsztalyAtlagListRequest
|
||||
{
|
||||
public OsztalyAtlagListRequest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OsztalyAtlagListRequest(string tantargyUid)
|
||||
{
|
||||
TantargyUids = string.IsNullOrWhiteSpace(tantargyUid) ? null : new List<TantargyUid> { new TantargyUid(tantargyUid) };
|
||||
}
|
||||
public OktatasiNevelesiFeladatUid OktatasiNevelesiFeladatUid { get; set; }
|
||||
|
||||
public List<TantargyUid> TantargyUids { get; set; }
|
||||
|
||||
public bool IsAtlagNeeded { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
public class OsztalyAtlagListResponse : IEqualityComparer<OsztalyAtlagListResponse>
|
||||
{
|
||||
public decimal? OsztalyCsoportAtlag { get; set; }
|
||||
|
||||
public decimal? OsztalyCsoportAtlagtolValoElteres { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public decimal? TanuloAtlag { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
|
||||
public bool Equals(OsztalyAtlagListResponse x, OsztalyAtlagListResponse y) => x == y || x.Tantargy.Equals(y.Tantargy);
|
||||
|
||||
public int GetHashCode(OsztalyAtlagListResponse obj) => obj.Tantargy.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
[Serializable]
|
||||
public class AtlagAlakulasaResponse
|
||||
{
|
||||
public decimal Atlag { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagListRequest
|
||||
{
|
||||
public OktatasiNevelesiFeladatUid OktatasiNevelesiFeladatUid { get; set; }
|
||||
|
||||
public bool IsAtlagAlakulasaIncluded { get; set; }
|
||||
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
public TantargyUid TantargyUid { get; set; }
|
||||
|
||||
public bool IsMobileApiCacheEnabled { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
[Serializable]
|
||||
public class TantargyiAtlagListResponse
|
||||
{
|
||||
public decimal? Atlag { get; set; }
|
||||
|
||||
public decimal? SulyozottOsztalyzatOsszege { get; set; }
|
||||
|
||||
public decimal? SulyozottOsztalyzatSzama { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public TanuloSimplifiedResponse Tanulo { get; set; }
|
||||
|
||||
public List<AtlagAlakulasaResponse> AtlagAlakulasaIdoFuggvenyeben { get; set; }
|
||||
|
||||
public int SortIndex { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagRequest
|
||||
{
|
||||
public HashSet<TantargyResponse> Tantargyak { get; set; }
|
||||
|
||||
public List<int> TanuloIds { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagResponse
|
||||
{
|
||||
public readonly List<ErtekelesListResponse> Ertekelesek = new List<ErtekelesListResponse>();
|
||||
|
||||
public void Add(ErtekelesListResponse ertekeles)
|
||||
{
|
||||
Ertekelesek.Add(ertekeles);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest
|
||||
{
|
||||
public TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest(string osztalyCsoportUid)
|
||||
{
|
||||
OsztalyCsoportUid = new OsztalyCsoportUid(osztalyCsoportUid);
|
||||
}
|
||||
|
||||
public TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public OsztalyCsoportUid OsztalyCsoportUid { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagResponse
|
||||
{
|
||||
public decimal? OsztalyCsoportAtlag { get; set; }
|
||||
|
||||
public decimal? OsztalyCsoportAtlagtolValoElteres => TanuloAtlag - OsztalyCsoportAtlag;
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public decimal? TanuloAtlag { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesListRequest : IValidatableObject, IRequestUidFilter<ErtekelesUid>, IModelValidacio<ErtekelesListRequest>
|
||||
{
|
||||
public ErtekelesListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public ErtekelesListRequest(string uidRaw, string tantargyUids)
|
||||
{
|
||||
Uid = uidRaw == null ? null : new ErtekelesUid(uidRaw);
|
||||
TantargyUids = string.IsNullOrWhiteSpace(tantargyUids) ? null : new UidsCollection<TantargyUid>(tantargyUids, s_uidConverter);
|
||||
}
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public List<int> TanuloIds { get; set; }
|
||||
|
||||
public UidsCollection<TantargyUid> TantargyUids { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
public Dictionary<Predicate<ErtekelesListRequest>, string> ModelValidaciok => new Dictionary<Predicate<ErtekelesListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
};
|
||||
|
||||
public ErtekelesUid Uid { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
private static readonly Converter<string[], TantargyUid> s_uidConverter = uidRaw => new TantargyUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using ErtekelesErtekFajta = Kreta.Ellenorzo.Enums.VN.ErtekelesErtekFajta;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesListResponse : IEqualityComparer<ErtekelesListResponse>
|
||||
{
|
||||
private int? _sulySzazalekErteke;
|
||||
|
||||
public ErtekelesListResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public ErtekelesListResponse(ErtekelesListResponse oldModel)
|
||||
{
|
||||
Uid = oldModel.Uid;
|
||||
Tipus = oldModel.Tipus;
|
||||
Tantargy = oldModel.Tantargy;
|
||||
Tema = oldModel.Tema;
|
||||
Mod = oldModel.Mod;
|
||||
SulySzazalekErteke = oldModel.SulySzazalekErteke;
|
||||
SzovegesErtek = oldModel.SzovegesErtek;
|
||||
SzovegesErtekelesRovidNev = oldModel.SzovegesErtekelesRovidNev;
|
||||
SzamErtek = oldModel.SzamErtek;
|
||||
LattamozasDatuma = oldModel.LattamozasDatuma;
|
||||
ErtekeloTanar = oldModel.ErtekeloTanar;
|
||||
Datum = oldModel.Datum;
|
||||
KeszitesDatum = oldModel.KeszitesDatum;
|
||||
ErtekFajta = oldModel.ErtekFajta;
|
||||
OsztalyCsoport = oldModel.OsztalyCsoport;
|
||||
Tanulo = oldModel.Tanulo;
|
||||
SortIndex = oldModel.SortIndex;
|
||||
}
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse ErtekeloTanar { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesErtekFajta> ErtekFajta { get; set; }
|
||||
|
||||
public ErtekelesUid Uid { get; set; }
|
||||
|
||||
public bool IsAtlagbaBeleszamit => Tipus == ErtekelesTipusEnum.evkozi_jegy_ertekeles && Mod != null && Uid.Jelleg == ErtekelesJelleg.Ertekeles;
|
||||
|
||||
public DateTime KeszitesDatum { get; set; }
|
||||
|
||||
public DateTime? LattamozasDatuma { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesModEnum> Mod { get; set; }
|
||||
|
||||
public int? SulySzazalekErteke { get => _sulySzazalekErteke; set => _sulySzazalekErteke = IsAtlagbaBeleszamit ? value : null; }
|
||||
|
||||
public int? SzamErtek { get; set; }
|
||||
|
||||
public string SzovegesErtek { get; set; }
|
||||
|
||||
public string SzovegesErtekelesRovidNev { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesTipusEnum> Tipus { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public TanuloSimplifiedResponse Tanulo { get; set; }
|
||||
|
||||
public int SortIndex { get; set; }
|
||||
|
||||
public bool Equals(ErtekelesListResponse x, ErtekelesListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(ErtekelesListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagListRequest : IValidatableObject, IModelValidacio<FaliujsagListRequest>
|
||||
{
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public Dictionary<Predicate<FaliujsagListRequest>, string> ModelValidaciok => new Dictionary<Predicate<FaliujsagListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 31),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 1 hónap intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagListResponse : IEqualityComparer<FaliujsagListResponse>
|
||||
{
|
||||
public DateTime ErvenyessegKezdete { get; set; }
|
||||
|
||||
public DateTime ErvenyessegVege { get; set; }
|
||||
|
||||
public FaliujsagUid Uid { get; set; }
|
||||
|
||||
public string RogzitoNeve { get; set; }
|
||||
|
||||
public string Cim { get; set; }
|
||||
|
||||
public string Tartalom { get; set; }
|
||||
|
||||
public bool Equals(FaliujsagListResponse x, FaliujsagListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(FaliujsagListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott
|
||||
{
|
||||
public class AlkalmazottListRequest
|
||||
{
|
||||
public List<int> FelhasznaloIds { get; set; }
|
||||
|
||||
public EmailListRequest Email { get; set; }
|
||||
|
||||
public TelefonListRequest Telefon { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott
|
||||
{
|
||||
public class AlkalmazottListResponse : IEqualityComparer<AlkalmazottListResponse>
|
||||
{
|
||||
public AlkalmazottUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public List<TelefonResponse> Telefonok { get; set; }
|
||||
|
||||
public List<EmailResponse> Emailek { get; set; }
|
||||
|
||||
public bool Equals(AlkalmazottListResponse x, AlkalmazottListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(AlkalmazottListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokGetResponse : IEqualityComparer<OsztalyfonokGetResponse>
|
||||
{
|
||||
public OsztalyfonokUid Uid { get; set; }
|
||||
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
public bool Equals(OsztalyfonokGetResponse x, OsztalyfonokGetResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyfonokGetResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokHelyettesSimplifiedResponse : IEqualityComparer<OsztalyfonokHelyettesSimplifiedResponse>
|
||||
{
|
||||
public OsztalyfonokHelyettesUid Uid { get; set; }
|
||||
|
||||
public bool Equals(OsztalyfonokHelyettesSimplifiedResponse x, OsztalyfonokHelyettesSimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyfonokHelyettesSimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokListRequest : IRequestUidsFilter<OsztalyfonokUid>
|
||||
{
|
||||
public OsztalyfonokListRequest(string uidsRaw = null)
|
||||
{
|
||||
Uids = new UidsCollection<OsztalyfonokUid>(uidsRaw, UidConverter);
|
||||
}
|
||||
|
||||
public UidsCollection<OsztalyfonokUid> Uids { get; private set; }
|
||||
|
||||
public TanarListRequest Tanar { get; set; }
|
||||
|
||||
public static readonly Converter<string[], OsztalyfonokUid> UidConverter = uidRaw => new OsztalyfonokUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokListResponse : IEqualityComparer<OsztalyfonokListResponse>
|
||||
{
|
||||
public OsztalyfonokUid Uid { get; set; }
|
||||
|
||||
public TanarListResponse Tanar { get; set; }
|
||||
|
||||
public List<OsztalyCsoportListResponse> Osztalyai { get; set; }
|
||||
|
||||
public bool Equals(OsztalyfonokListResponse x, OsztalyfonokListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyfonokListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokSimplifiedResponse : IEqualityComparer<OsztalyfonokSimplifiedResponse>
|
||||
{
|
||||
public OsztalyfonokUid Uid { get; set; }
|
||||
|
||||
public bool Equals(OsztalyfonokSimplifiedResponse x, OsztalyfonokSimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyfonokSimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar
|
||||
{
|
||||
public class TanarListRequest
|
||||
{
|
||||
public AlkalmazottListRequest Alkalmazott { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar
|
||||
{
|
||||
public class TanarListResponse : IEqualityComparer<TanarListResponse>
|
||||
{
|
||||
public TanarUid Uid { get; set; }
|
||||
|
||||
public AlkalmazottListResponse Alkalmazott { get; set; }
|
||||
|
||||
public bool Equals(TanarListResponse x, TanarListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(TanarListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar
|
||||
{
|
||||
public class TanarSimplifiedResponse : IEqualityComparer<TanarSimplifiedResponse>
|
||||
{
|
||||
public TanarUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool Equals(TanarSimplifiedResponse x, TanarSimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(TanarSimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo
|
||||
{
|
||||
public class BankszamlaRequest
|
||||
{
|
||||
public string BankszamlaSzam { get; set; }
|
||||
|
||||
public int? BankszamlaTulajdonosTipusId { get; set; }
|
||||
|
||||
public string BankszamlaTulajdonosNeve { get; set; }
|
||||
|
||||
public string SzamlavezetoBank { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo
|
||||
{
|
||||
[Serializable]
|
||||
public class BankszamlaResponse
|
||||
{
|
||||
public string BankszamlaSzam { get; set; }
|
||||
|
||||
public int? BankszamlaTulajdonosTipusId { get; set; }
|
||||
|
||||
public string BankszamlaTulajdonosNeve { get; set; }
|
||||
|
||||
public bool IsReadOnly { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo
|
||||
{
|
||||
public class ElerhetosegRequest
|
||||
{
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
public class GondviseloEszkozIgenylesRequest : GondviseloBaseAdatlapRequest, IValidatableObject, IModelValidacio<GondviseloEszkozIgenylesRequest>
|
||||
{
|
||||
public bool IsElfogadottAszf { get; set; }
|
||||
|
||||
public new Dictionary<Predicate<GondviseloEszkozIgenylesRequest>, string> ModelValidaciok => new Dictionary<Predicate<GondviseloEszkozIgenylesRequest>, string>
|
||||
{
|
||||
{
|
||||
x => !string.IsNullOrWhiteSpace(x.Elotag) && !Core.Constants.ElotagList.Contains(x.Elotag),
|
||||
$"Az {nameof(Elotag)} paraméter nem szerepel a kiválasztható értékek között!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.Vezeteknev),
|
||||
$"A {nameof(Vezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.Utonev),
|
||||
$"Az {nameof(Utonev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiVezeteknev),
|
||||
$"A {nameof(SzuletesiVezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiUtonev),
|
||||
$"A {nameof(SzuletesiUtonev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiHely),
|
||||
$"A {nameof(SzuletesiHely)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => !x.SzuletesiDatum.HasValue,
|
||||
$"A {nameof(SzuletesiDatum)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.AnyjaVezeteknev),
|
||||
$"Az {nameof(AnyjaVezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.AnyjaUtonev),
|
||||
$"Az {nameof(AnyjaUtonev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => !x.IsElfogadottAszf,
|
||||
$"Az {nameof(IsElfogadottAszf)} paraméter értékenek true-nak kell lennie!"
|
||||
}
|
||||
};
|
||||
|
||||
public new IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
public class GondviseloAdatokResponse
|
||||
{
|
||||
public string Elotag { get; set; }
|
||||
|
||||
public string Vezeteknev { get; set; }
|
||||
|
||||
public string SzuletesiVezeteknev { get; set; }
|
||||
|
||||
public string Utonev { get; set; }
|
||||
|
||||
public string SzuletesiUtonev { get; set; }
|
||||
|
||||
public string AnyjaVezeteknev { get; set; }
|
||||
|
||||
public string AnyjaUtonev { get; set; }
|
||||
|
||||
public string SzuletesiHely { get; set; }
|
||||
|
||||
public DateTime? SzuletesiDatum { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
public class GondviseloBaseAdatlapRequest : IValidatableObject, IModelValidacio<GondviseloBaseAdatlapRequest>
|
||||
{
|
||||
public string Elotag { get; set; }
|
||||
|
||||
public string Vezeteknev { get; set; }
|
||||
|
||||
public string Utonev { get; set; }
|
||||
|
||||
public string SzuletesiVezeteknev { get; set; }
|
||||
|
||||
public string SzuletesiUtonev { get; set; }
|
||||
|
||||
public string SzuletesiHely { get; set; }
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? SzuletesiDatum { get; set; }
|
||||
|
||||
public string AnyjaVezeteknev { get; set; }
|
||||
|
||||
public string AnyjaUtonev { get; set; }
|
||||
|
||||
public Dictionary<Predicate<GondviseloBaseAdatlapRequest>, string> ModelValidaciok => new Dictionary<Predicate<GondviseloBaseAdatlapRequest>, string>
|
||||
{
|
||||
{
|
||||
x => !string.IsNullOrWhiteSpace(x.Elotag) && !Core.Constants.ElotagList.Contains(x.Elotag),
|
||||
$"Az {nameof(Elotag)} paraméter nem szerepel a kiválasztható értékek között!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.Vezeteknev),
|
||||
$"A {nameof(Vezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.Utonev),
|
||||
$"Az {nameof(Utonev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiVezeteknev),
|
||||
$"A {nameof(SzuletesiVezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiUtonev),
|
||||
$"A {nameof(SzuletesiUtonev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.SzuletesiHely),
|
||||
$"A {nameof(SzuletesiHely)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => !x.SzuletesiDatum.HasValue,
|
||||
$"A {nameof(SzuletesiDatum)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.AnyjaVezeteknev),
|
||||
$"Az {nameof(AnyjaVezeteknev)} paraméter megadása kötelező!"
|
||||
},
|
||||
{
|
||||
x => string.IsNullOrWhiteSpace(x.AnyjaUtonev),
|
||||
$"Az {nameof(AnyjaUtonev)} paraméter megadása kötelező!"
|
||||
}
|
||||
};
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
public class GondviseloResponse : IEqualityComparer<GondviseloResponse>
|
||||
{
|
||||
public GondviseloUid Uid { get; set; }
|
||||
|
||||
public Guid IdpUniqueId { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
public bool IsTorvenyesKepviselo { get; set; }
|
||||
|
||||
public bool Equals(GondviseloResponse x, GondviseloResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(GondviseloResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo
|
||||
{
|
||||
public class NapiErtesitesOsszefoglaloResponse
|
||||
{
|
||||
public int Ertekelesek { get; set; }
|
||||
public int Mulasztasok { get; set; }
|
||||
public int Feljegyzesek { get; set; }
|
||||
public int Bejelentettszamonkeresek { get; set; }
|
||||
public int Hazifeladatok { get; set; }
|
||||
public int Uzenetek { get; set; }
|
||||
public int Orarendvaltozasok { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
[Serializable]
|
||||
public class GondviseloGetResponse : IEqualityComparer<GondviseloGetResponse>
|
||||
{
|
||||
public GondviseloUid Uid { get; set; }
|
||||
|
||||
public Guid IdpUniqueId { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
public bool IsTorvenyesKepviselo { get; set; }
|
||||
|
||||
public bool Equals(GondviseloGetResponse x, GondviseloGetResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(GondviseloGetResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
|
||||
public static explicit operator GondviseloGetResponse(Gondviselo.GondviseloResponse model) => model == null ? null :
|
||||
new GondviseloGetResponse
|
||||
{
|
||||
Uid = model.Uid,
|
||||
IdpUniqueId = model.IdpUniqueId,
|
||||
Nev = model.Nev,
|
||||
EmailCim = model.EmailCim,
|
||||
Telefonszam = model.Telefonszam,
|
||||
IsTorvenyesKepviselo = model.IsTorvenyesKepviselo
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
public class OsztalyfonokGetResponse : IEqualityComparer<OsztalyfonokGetResponse>
|
||||
{
|
||||
public OsztalyfonokUid Uid { get; set; }
|
||||
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
public bool Equals(OsztalyfonokGetResponse x, OsztalyfonokGetResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyfonokGetResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
|
||||
public static explicit operator OsztalyfonokGetResponse(Alkalmazott.Tanar.Osztalyfonok.OsztalyfonokGetResponse model) => model == null ? null :
|
||||
new OsztalyfonokGetResponse
|
||||
{
|
||||
Uid = model.Uid,
|
||||
Nev = model.Nev,
|
||||
EmailCim = model.EmailCim,
|
||||
Telefonszam = model.Telefonszam
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
[Serializable]
|
||||
public class TanuloAdatResponse
|
||||
{
|
||||
public Guid IdpUniqueId { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public string SzuletesiNev { get; set; }
|
||||
|
||||
public string SzuletesiHely { get; set; }
|
||||
|
||||
public string AnyjaNeve { get; set; }
|
||||
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
public List<string> Cimek { get; set; }
|
||||
|
||||
public DateTime SzuletesiDatum { get; set; }
|
||||
|
||||
public BankszamlaResponse Bankszamla { get; set; }
|
||||
|
||||
public bool IsEszkozKiosztva { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
[Serializable]
|
||||
public class TanuloGetResponse : IEqualityComparer<TanuloGetResponse>
|
||||
{
|
||||
public int TanevId { get; set; }
|
||||
|
||||
public HashSet<GondviseloGetResponse> GondviseloLista { get; set; }
|
||||
|
||||
public TanuloUid Uid { get; set; }
|
||||
|
||||
public Guid IdpUniqueId { get; set; }
|
||||
|
||||
public IntezmenyResponse Intezmeny { get; set; }
|
||||
|
||||
public TanuloAdatResponse TanuloAdat { get; set; }
|
||||
|
||||
public bool Equals(TanuloGetResponse x, TanuloGetResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(TanuloGetResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
[Serializable]
|
||||
public class TanuloSimplifiedResponse : IEqualityComparer<TanuloSimplifiedResponse>
|
||||
{
|
||||
public TanuloUid Uid { get; set; }
|
||||
|
||||
public bool Equals(TanuloSimplifiedResponse x, TanuloSimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(TanuloSimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Feljegyzes
|
||||
{
|
||||
public class FeljegyzesListRequest : IValidatableObject, IRequestUidFilter<FeljegyzesUid>, IModelValidacio<FeljegyzesListRequest>
|
||||
{
|
||||
public FeljegyzesListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public FeljegyzesListRequest(string uidRaw)
|
||||
{
|
||||
Uid = UidLogic.GetUid(uidRaw, UidConverter);
|
||||
}
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; }
|
||||
|
||||
public Dictionary<Predicate<FeljegyzesListRequest>, string> ModelValidaciok => new Dictionary<Predicate<FeljegyzesListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 31),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 1 hónap intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public FeljegyzesUid Uid { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
public static readonly Converter<string[], FeljegyzesUid> UidConverter = uidRaw => new FeljegyzesUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Feljegyzes
|
||||
{
|
||||
public class FeljegyzesListResponse : IEqualityComparer<FeljegyzesListResponse>
|
||||
{
|
||||
public string Cim { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public FeljegyzesUid Uid { get; set; }
|
||||
|
||||
public DateTime KeszitesDatuma { get; set; }
|
||||
|
||||
public DateTime? LattamozasDatuma { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse Tanar { get; set; }
|
||||
|
||||
public string Tartalom { get; set; }
|
||||
|
||||
public Adatszotar<EsemenyTipusEnum> Tipus { get; set; }
|
||||
|
||||
public bool Equals(FeljegyzesListResponse x, FeljegyzesListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(FeljegyzesListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraIdopontResponse : IEqualityComparer<FogadooraIdopontResponse>
|
||||
{
|
||||
public bool IsJelentkeztem { get; set; }
|
||||
|
||||
public DateTime FogadooraKezdete { get; set; }
|
||||
|
||||
public DateTime KezdoIdopont { get; set; }
|
||||
|
||||
public FogadooraIdopontUid Uid { get; set; }
|
||||
|
||||
public DateTime VegIdopont { get; set; }
|
||||
|
||||
public DateTime? JelentkezesHatarido { get; set; }
|
||||
|
||||
public FogadooraUid FogadooraUid { get; set; }
|
||||
|
||||
public bool Equals(FogadooraIdopontResponse x, FogadooraIdopontResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(FogadooraIdopontResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraJelentkezesCreateRequest
|
||||
{
|
||||
public FogadooraJelentkezesCreateRequest(string uidRaw)
|
||||
{
|
||||
FogadooraIdopontUid = new FogadooraIdopontUid(uidRaw);
|
||||
}
|
||||
|
||||
public FogadooraIdopontUid FogadooraIdopontUid { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraListRequest : IValidatableObject, IModelValidacio<FogadooraListRequest>
|
||||
{
|
||||
public FogadooraListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public Dictionary<Predicate<FogadooraListRequest>, string> ModelValidaciok => new Dictionary<Predicate<FogadooraListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 21),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 3 hetes intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
public FogadooraUid Uid { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraListResponse
|
||||
{
|
||||
public TanarSimplifiedResponse Tanar { get; set; }
|
||||
|
||||
public List<FogadooraResponse> Fogadoorak { get; set; } = new List<FogadooraResponse>();
|
||||
|
||||
public FogadooraListResponse()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Terem;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraResponse : IEqualityComparer<FogadooraResponse>
|
||||
{
|
||||
public FogadooraUid Uid { get; set; }
|
||||
|
||||
public TeremSimplifiedResponse Terem { get; set; }
|
||||
|
||||
public bool IsJelentkezesFeatureEnabled { get; set; }
|
||||
|
||||
public DateTime KezdoIdopont { get; set; }
|
||||
|
||||
public DateTime VegIdopont { get; set; }
|
||||
|
||||
public DateTime? JelentkezesHatarido { get; set; }
|
||||
|
||||
public List<FogadooraIdopontResponse> Idopontok { get; set; }
|
||||
|
||||
public bool Equals(FogadooraResponse x, FogadooraResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(FogadooraResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Fogadoora.Idopont
|
||||
{
|
||||
public class FogadooraIdopontJelentkezesDeleteRequest
|
||||
{
|
||||
public FogadooraIdopontJelentkezesDeleteRequest(string uidRaw = null)
|
||||
{
|
||||
FogadooraIdopontUid = new FogadooraIdopontUid(uidRaw);
|
||||
}
|
||||
|
||||
public FogadooraIdopontUid FogadooraIdopontUid { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat.Csatolmany
|
||||
{
|
||||
public class CsatolmanySimplifiedResponse : IEqualityComparer<CsatolmanySimplifiedResponse>
|
||||
{
|
||||
public HaziFeladatCsatolmanyUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool Equals(CsatolmanySimplifiedResponse x, CsatolmanySimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(CsatolmanySimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.HaziFeladat.Csatolmany;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatDetailResponse : HaziFeladatListResponse
|
||||
{
|
||||
public IEnumerable<CsatolmanySimplifiedResponse> Csatolmanyok { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatGetRequest : IRequestUidFilter<HaziFeladatUid>
|
||||
{
|
||||
public HaziFeladatGetRequest(string uidRaw = null)
|
||||
{
|
||||
Uid = UidLogic.GetUid(uidRaw, UidConverter);
|
||||
}
|
||||
|
||||
public HaziFeladatUid Uid { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; } = true;
|
||||
|
||||
public static readonly Converter<string[], HaziFeladatUid> UidConverter = uidRaw => new HaziFeladatUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatListRequest : IValidatableObject, IModelValidacio<HaziFeladatListRequest>
|
||||
{
|
||||
public Dictionary<Predicate<HaziFeladatListRequest>, string> ModelValidaciok => new Dictionary<Predicate<HaziFeladatListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} érték!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && ((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 21,
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 3 hetes intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatListResponse : IEqualityComparer<HaziFeladatListResponse>
|
||||
{
|
||||
public DateTime FeladasDatuma { get; set; }
|
||||
|
||||
public DateTime? HataridoDatuma { get; set; }
|
||||
|
||||
public DateTime RogzitesIdopontja { get; set; }
|
||||
|
||||
public HaziFeladatUid Uid { get; set; }
|
||||
|
||||
public bool IsMegoldva { get; set; }
|
||||
|
||||
public bool IsTanarRogzitette { get; set; }
|
||||
|
||||
public bool IsTanuloHaziFeladatEnabled { get; set; }
|
||||
|
||||
public bool IsBeadhato { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse RogzitoTanar { get; set; }
|
||||
|
||||
public string Szoveg { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public bool IsCsatolasEngedelyezes { get; set; }
|
||||
|
||||
public bool Equals(HaziFeladatListResponse x, HaziFeladatListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(HaziFeladatListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Indexers
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.07.
|
||||
/// </summary>
|
||||
public class UidsCollection<T> : IEnumerable<T> where T : class, IReadonlyUidRaw
|
||||
{
|
||||
private readonly List<T> _uids = new List<T>();
|
||||
|
||||
public UidsCollection(string uidsRaw, Converter<string[], T> uidsConverter)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(uidsRaw))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string[] uidArray = uidsRaw.Split(Constant.UidDelimiter);
|
||||
|
||||
if (uidArray.Length > 50)
|
||||
{
|
||||
throw new BlException(BlExceptionType.ListaTobbMint50ElemetTartalmaz);
|
||||
}
|
||||
|
||||
_uids = new List<T>(uidArray.Length);
|
||||
|
||||
for (int i = 0; i < uidArray.Length; i++)
|
||||
{
|
||||
_uids.Add(GetUid(uidArray[i]));
|
||||
}
|
||||
|
||||
T GetUid(string uidRaw)
|
||||
{
|
||||
string[] compositeKey = uidRaw.Split(Constant.UidInnerDelimiter);
|
||||
|
||||
T uid = uidsConverter.Invoke(compositeKey);
|
||||
return uid;
|
||||
}
|
||||
}
|
||||
|
||||
public T this[int index] => _uids[index];
|
||||
|
||||
public IEnumerator GetEnumerator() => throw new NotImplementedException();
|
||||
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator() => _uids.GetEnumerator();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Interfaces
|
||||
{
|
||||
public interface IModelValidacio<T>
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
|
||||
Dictionary<Predicate<T>, string> ModelValidaciok { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Interfaces
|
||||
{
|
||||
public interface IReadonlyUidRaw
|
||||
{
|
||||
string UidRaw { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Interfaces
|
||||
{
|
||||
public interface IRequestUidFilter<T> where T : class, IReadonlyUidRaw
|
||||
{
|
||||
T Uid { get; set; }
|
||||
|
||||
bool IsCallerGetOnlyOneItem { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Interfaces
|
||||
{
|
||||
public interface IRequestUidsFilter<T> where T : class, IReadonlyUidRaw
|
||||
{
|
||||
UidsCollection<T> Uids { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Interfaces
|
||||
{
|
||||
public interface ISortable
|
||||
{
|
||||
int SortIndex { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class HetirendListRequest : IValidatableObject, IModelValidacio<HetirendListRequest>
|
||||
{
|
||||
public Dictionary<Predicate<HetirendListRequest>, string> ModelValidaciok => new Dictionary<Predicate<HetirendListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.OrarendElemVegNapDatuma < x.OrarendElemKezdoNapDatuma, $"A(z) {nameof(OrarendElemKezdoNapDatuma)} nagyobb, mint a(z) {nameof(OrarendElemVegNapDatuma)} érték!"
|
||||
},
|
||||
{ x => (x.OrarendElemVegNapDatuma - x.OrarendElemKezdoNapDatuma).Days > 21,
|
||||
$"A {nameof(OrarendElemKezdoNapDatuma)} és a {nameof(OrarendElemVegNapDatuma)} paraméterek meg vannak adva, de maximum 3 hetes intervallum kérdezhető le!"
|
||||
},
|
||||
{
|
||||
x => x.OrarendElemKezdoNapDatuma < (DateTime)SqlDateTime.MinValue || x.OrarendElemKezdoNapDatuma > (DateTime)SqlDateTime.MaxValue, $"A {nameof(OrarendElemKezdoNapDatuma)} paraméter nem lehet kisebb, mint 1753. január 1. és nagyobb, mint 9999. december 31.!"
|
||||
},
|
||||
{
|
||||
x => x.OrarendElemVegNapDatuma < (DateTime)SqlDateTime.MinValue || x.OrarendElemVegNapDatuma > (DateTime)SqlDateTime.MaxValue, $"A {nameof(OrarendElemVegNapDatuma)} paraméter nem lehet kisebb, mint 1753. január 1. és nagyobb, mint 9999. december 31.!"
|
||||
}
|
||||
};
|
||||
|
||||
public DateTime OrarendElemKezdoNapDatuma { get; set; }
|
||||
|
||||
public DateTime OrarendElemVegNapDatuma { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class HetirendListResponse : IEqualityComparer<HetirendListResponse>
|
||||
{
|
||||
public Adatszotar<HetiRendTipusEnum> Tipus { get; set; }
|
||||
|
||||
public DateTime KezdoNapDatuma { get; set; }
|
||||
|
||||
public DateTime VegNapDatuma { get; set; }
|
||||
|
||||
public int HetSorszama { get; set; }
|
||||
|
||||
public HetirendUid Uid { get; set; }
|
||||
|
||||
public bool Equals(HetirendListResponse x, HetirendListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(HetirendListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny
|
||||
{
|
||||
public class IntezmenyAdatok : IEqualityComparer<IntezmenyAdatok>
|
||||
{
|
||||
public IntezmenyUid Uid { get; set; }
|
||||
|
||||
public string Azonosito { get; set; }
|
||||
|
||||
public string TeljesNev { get; set; }
|
||||
|
||||
public string RovidNev { get; set; }
|
||||
|
||||
public bool Equals(IntezmenyAdatok x, IntezmenyAdatok y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(IntezmenyAdatok obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Rendszermodul;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.TestreszabasBeallitasok;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny
|
||||
{
|
||||
[Serializable]
|
||||
public class IntezmenyResponse : IEqualityComparer<IntezmenyResponse>
|
||||
{
|
||||
public IntezmenyAdatok IntezmenyAdatok { get; set; }
|
||||
|
||||
public HashSet<RendszermodulListResponse> Rendszermodulok { get; set; }
|
||||
|
||||
public TestreszabasBeallitasokResponse TestreszabasBeallitasok { get; set; }
|
||||
|
||||
public bool Equals(IntezmenyResponse x, IntezmenyResponse y) => x.IntezmenyAdatok.Uid.Equals(x.IntezmenyAdatok.Uid, y.IntezmenyAdatok.Uid);
|
||||
|
||||
public int GetHashCode(IntezmenyResponse obj) => obj.IntezmenyAdatok.Uid.UidRaw.GetHashCode();
|
||||
|
||||
public static explicit operator IntezmenyResponse(IntezmenyModel model) => model == null ? null :
|
||||
new IntezmenyResponse
|
||||
{
|
||||
IntezmenyAdatok = new IntezmenyAdatok
|
||||
{
|
||||
Uid = model.Uid,
|
||||
Azonosito = model.Azonosito,
|
||||
TeljesNev = model.TeljesNev
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny.Rendszermodul
|
||||
{
|
||||
public class RendszermodulListResponse : IEqualityComparer<RendszermodulListResponse>
|
||||
{
|
||||
public bool IsAktiv { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
|
||||
public RendszermodulTipus Tipus { get; set; }
|
||||
|
||||
public bool Equals(RendszermodulListResponse x, RendszermodulListResponse y) => x.Tipus.Equals(y.Tipus);
|
||||
|
||||
public int GetHashCode(RendszermodulListResponse obj) => obj.Tipus.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny.TanevRendje
|
||||
{
|
||||
public class TanevRendjeListResponse : IEqualityComparer<TanevRendjeListResponse>
|
||||
{
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public Adatszotar<HetNapjaTipusEnum> ElteroOrarendSzerintiTanitasiNap { get; set; }
|
||||
|
||||
public TanevRendjeUid Uid { get; set; }
|
||||
|
||||
public Adatszotar<NapTipusEnum> Naptipus { get; set; }
|
||||
|
||||
public Adatszotar<HetiRendTipusEnum> OrarendiNapHetirendje { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public bool Equals(TanevRendjeListResponse x, TanevRendjeListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(TanevRendjeListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Intezmeny.TestreszabasBeallitasok
|
||||
{
|
||||
public class TestreszabasBeallitasokResponse
|
||||
{
|
||||
public bool IsDiakRogzithetHaziFeladatot { get; set; }
|
||||
|
||||
public bool IsTanorakTemajaMegtekinthetoEllenorzoben { get; set; }
|
||||
|
||||
public bool IsOsztalyAtlagMegjeleniteseEllenorzoben { get; set; }
|
||||
|
||||
public int ErtekelesekMegjelenitesenekKesleltetesenekMerteke { get; set; }
|
||||
|
||||
public DateTime KovetkezoTelepitesDatuma { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Lep
|
||||
{
|
||||
public class EloadasResponse : IEqualityComparer<EloadasResponse>
|
||||
{
|
||||
public EloadasUid Uid { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public DateTime EloadasKezdete { get; set; }
|
||||
|
||||
public DateTime EloadasVege { get; set; }
|
||||
|
||||
public string EloadasNev { get; set; }
|
||||
|
||||
public string SzervezetNev { get; set; }
|
||||
|
||||
public string Helyszin { get; set; }
|
||||
|
||||
public bool Megjelent { get; set; }
|
||||
|
||||
public bool? GondviseloElfogadas { get; set; }
|
||||
|
||||
public bool Equals(EloadasResponse x, EloadasResponse y) => x == y || x.Uid.Equals(y.Uid);
|
||||
|
||||
public int GetHashCode(EloadasResponse obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.Ellenorzo.Domain.VN.Lep
|
||||
{
|
||||
public class GondviseloEngedelyezesRequest
|
||||
{
|
||||
public int EloadasId { get; set; }
|
||||
|
||||
public bool? Dontes { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.09.
|
||||
/// </summary>
|
||||
public static class EnumLogic
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
public static IEnumerable<(int Id, string Nev, string Leiras)> GetEnumWithDisplayNameAttribute(Type enumType)
|
||||
{
|
||||
foreach (object item in Enum.GetValues(enumType))
|
||||
{
|
||||
(int Id, string Nev, string Leiras) returnObject = ((int)item, item.ToString(), null);
|
||||
FieldInfo fieldInfo = item.GetType().GetField(returnObject.Nev);
|
||||
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
DisplayAttribute attributes = (DisplayAttribute)fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false).FirstOrDefault();
|
||||
|
||||
if (attributes != null)
|
||||
{
|
||||
returnObject.Leiras = attributes.GetName();
|
||||
}
|
||||
}
|
||||
|
||||
yield return returnObject;
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetDisplayNameAttribute<T>(T enumValue)
|
||||
{
|
||||
string nev = enumValue.ToString();
|
||||
if (string.IsNullOrWhiteSpace(nev))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
FieldInfo fieldInfo = typeof(T).GetField(nev);
|
||||
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
DisplayAttribute attributes = (DisplayAttribute)fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false).FirstOrDefault();
|
||||
|
||||
if (attributes != null)
|
||||
{
|
||||
return attributes.GetName();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Réti-Nagy Tamás Created On: 2019.10.
|
||||
/// </summary>
|
||||
public static class OsztalyCsoportLogic
|
||||
{
|
||||
public static bool IsAktivTagsag(DateTime ido, DateTime ervenyessegKezdete, DateTime? ervenyessegVege)
|
||||
=> ido >= ervenyessegKezdete && (ervenyessegVege == null || ido < ervenyessegVege);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.07.
|
||||
/// </summary>
|
||||
public static class UidLogic
|
||||
{
|
||||
public static T GetUid<T>(string uidRaw, Converter<string[], T> uidConverter) where T : class, IReadonlyUidRaw
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(uidRaw))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] compositeKey = uidRaw.Split(Constant.UidInnerDelimiter);
|
||||
|
||||
T uid = uidConverter.Invoke(compositeKey);
|
||||
return uid;
|
||||
}
|
||||
|
||||
public static string[] GetCompositeKeyElements(string uidRaw) => string.IsNullOrWhiteSpace(uidRaw) ? null : uidRaw.Split(Constant.UidInnerDelimiter);
|
||||
|
||||
public static string Concat(params object[] compositeKeyElements)
|
||||
{
|
||||
for (int i = 0; i < compositeKeyElements.Length; i++)
|
||||
{
|
||||
if (compositeKeyElements[i] == null)
|
||||
{
|
||||
compositeKeyElements[i] = Constant.UidNullValue;
|
||||
}
|
||||
else if (string.IsNullOrWhiteSpace(compositeKeyElements[i].ToString()))
|
||||
{
|
||||
compositeKeyElements[i] = Constant.UidNanValue;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Join(Constant.UidInnerDelimiter.ToString(), compositeKeyElements);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Mulasztas
|
||||
{
|
||||
public class MulasztasListRequest : IValidatableObject, IRequestUidFilter<MulasztasUid>, IModelValidacio<MulasztasListRequest>
|
||||
{
|
||||
public MulasztasListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public MulasztasListRequest(string uidRaw)
|
||||
{
|
||||
Uid = UidLogic.GetUid(uidRaw, UidConverter);
|
||||
}
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; }
|
||||
|
||||
public Dictionary<Predicate<MulasztasListRequest>, string> ModelValidaciok => new Dictionary<Predicate<MulasztasListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 21),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 3 hetes intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public MulasztasUid Uid { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
public static readonly Converter<string[], MulasztasUid> UidConverter = uidRaw => new MulasztasUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ora.TanitasiOra;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Mulasztas
|
||||
{
|
||||
public class MulasztasListResponse : IEqualityComparer<MulasztasListResponse>
|
||||
{
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public IgazolasAllapota IgazolasAllapota { get; set; }
|
||||
|
||||
public Adatszotar<IgazolasTipusEnum> IgazolasTipusa { get; set; }
|
||||
|
||||
public int? KesesPercben { get; set; }
|
||||
|
||||
public DateTime KeszitesDatuma { get; set; }
|
||||
|
||||
public Adatszotar<MulasztasMod> Mod { get; set; }
|
||||
|
||||
public TanitasiOraResponse Ora { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse RogzitoTanar { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public Adatszotar<MulasztasTipusEnum> Tipus { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public MulasztasUid Uid { get; set; }
|
||||
|
||||
public bool Equals(MulasztasListResponse x, MulasztasListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(MulasztasListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ora.TanitasiOra
|
||||
{
|
||||
public class TanitasiOraResponse
|
||||
{
|
||||
public DateTime KezdoDatum { get; set; }
|
||||
|
||||
public DateTime VegDatum { get; set; }
|
||||
|
||||
public byte? Oraszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Orarend
|
||||
{
|
||||
public class OrarendElemGetRequest : IValidatableObject, IModelValidacio<OrarendElemGetRequest>
|
||||
{
|
||||
public OrarendElemGetRequest(string orarendElemUid)
|
||||
{
|
||||
OrarendElemUid = new OrarendElemUid(orarendElemUid);
|
||||
}
|
||||
|
||||
public OrarendElemGetRequest(CalendarOraTypeEnum tipus, int id, DateTime datum)
|
||||
{
|
||||
OrarendElemUid = new OrarendElemUid(id, tipus, datum);
|
||||
}
|
||||
|
||||
public Dictionary<Predicate<OrarendElemGetRequest>, string> ModelValidaciok => new Dictionary<Predicate<OrarendElemGetRequest>, string>
|
||||
{
|
||||
{ x => x.OrarendElemUid != null && x.OrarendElemUid.Tipus != CalendarOraTypeEnum.OrarendiOra && x.OrarendElemUid.Tipus != CalendarOraTypeEnum.TanitasiOra && x.OrarendElemUid.Tipus != CalendarOraTypeEnum.UresOra, "Csak órarendi, tanítási és elmaradt óra kérhető le!" }
|
||||
};
|
||||
|
||||
[Required]
|
||||
public OrarendElemUid OrarendElemUid { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Orarend
|
||||
{
|
||||
public class OrarendElemListRequest : IValidatableObject, IModelValidacio<OrarendElemListRequest>
|
||||
{
|
||||
public Dictionary<Predicate<OrarendElemListRequest>, string> ModelValidaciok => new Dictionary<Predicate<OrarendElemListRequest>, string>
|
||||
{
|
||||
{ x => x.DatumIg < x.DatumTol, $"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!" },
|
||||
{ x => (x.DatumIg - x.DatumTol).Days > 31, $"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 1 hónap intervallum kérdezhető le!" },
|
||||
{ x => x.DatumTol < (DateTime)SqlDateTime.MinValue || x.DatumTol > (DateTime)SqlDateTime.MaxValue, $"A {nameof(DatumTol)} paraméter nem lehet kisebb, mint 1753. január 1. és nagyobb, mint 9999. december 31.!" },
|
||||
{ x => x.DatumIg < (DateTime)SqlDateTime.MinValue || x.DatumIg > (DateTime)SqlDateTime.MaxValue, $"A {nameof(DatumIg)} paraméter nem lehet kisebb, mint 1753. január 1. és nagyobb, mint 9999. december 31.!" }
|
||||
};
|
||||
|
||||
public DateTime DatumIg { get; set; }
|
||||
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Csatolmany;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.Terem;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Orarend
|
||||
{
|
||||
public class OrarendElemListResponse : IEqualityComparer<OrarendElemListResponse>
|
||||
{
|
||||
public OrarendElemUid Uid { get; set; }
|
||||
|
||||
public OrarendElemUid OrarendiOraUid { get; set; }
|
||||
|
||||
public int? Oraszam { get; set; }
|
||||
|
||||
public DateTime KezdetIdopont { get; set; }
|
||||
|
||||
public DateTime VegIdopont { get; set; }
|
||||
|
||||
public Adatszotar<TanoraAllapotaEnum> Allapot { get; set; }
|
||||
|
||||
public Adatszotar<MulasztasTipus> TanuloJelenlet { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
|
||||
public string TanevRendjeEsemenyNeve { private get; set; }
|
||||
|
||||
public string Nev => Uid.Tipus == CalendarOraTypeEnum.TanevRendjeEsemeny ? TanevRendjeEsemenyNeve : Tantargy.Nev;
|
||||
|
||||
public bool HasHaziFeladat { get; set; }
|
||||
|
||||
public List<CsatolmanySimplifiedResponse> Csatolmanyok { get; set; }
|
||||
|
||||
public HaziFeladatUid HaziFeladatUid { get; set; }
|
||||
|
||||
public OraiFeladatGroupUid FeladatGroupUid { get; set; }
|
||||
|
||||
public NyelviFeladatGroupUid NyelviFeladatGroupUid { get; set; }
|
||||
|
||||
public bool IsHaziFeladatMegoldva { get; set; }
|
||||
|
||||
public bool IsTanuloHaziFeladatEnabled { get; set; }
|
||||
|
||||
public bool IsTanevRendjeEsemeny { get; set; }
|
||||
|
||||
public int? OraEvesSorszama { get; set; }
|
||||
|
||||
public BejelentettSzamonkeresUid BejelentettSzamonkeresUid { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public TeremSimplifiedResponse Terem { get; set; }
|
||||
|
||||
public OsztalyCsoportResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse OratTartoTanar { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse HelyettesTanar { get; set; }
|
||||
|
||||
public bool IsDigitalisOra { get; set; }
|
||||
|
||||
public string DigitalisEszkozTipus { get; set; }
|
||||
|
||||
public string DigitalisPlatformTipus { get; set; }
|
||||
|
||||
public List<string> DigitalisTamogatoEszkozTipusList { get; set; }
|
||||
|
||||
public DateTime Letrehozas { get; set; }
|
||||
|
||||
public DateTime UtolsoModositas { get; set; }
|
||||
|
||||
public bool Equals(OrarendElemListResponse x, OrarendElemListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OrarendElemListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport.Osztaly
|
||||
{
|
||||
public class OsztalyTanuloiListRequest
|
||||
{
|
||||
public List<int> OsztalyIds { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportListRequest
|
||||
{
|
||||
public List<int> TanuloIds { get; set; }
|
||||
|
||||
public List<int> OsztalyfonokIds { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportListResponse : IEqualityComparer<OsztalyCsoportListResponse>
|
||||
{
|
||||
public Adatszotar<OktNevelesiKategoriaEnum> OktatasNevelesiKategoria { get; set; }
|
||||
|
||||
public int OktatasiNevelesiFeladatSortIndex { get; set; }
|
||||
|
||||
public Adatszotar<OktatasiNevelesiFeladatEnum> OktatasNevelesiFeladat { get; set; }
|
||||
|
||||
public Adatszotar<EvfolyamTipusEnum> EvfolyamTipus { get; set; }
|
||||
|
||||
public OsztalyCsoportUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool IsAktiv => Tagsagok.Any(t => t.IsAktiv);
|
||||
|
||||
public OsztalyCsoportTipus OsztalyCsoportTipus { get; set; }
|
||||
|
||||
public TanuloUid TanuloUid { get; set; }
|
||||
|
||||
#region Csoport
|
||||
public CsoportTipusEnum? CsoportTipus { get; set; }
|
||||
|
||||
public bool? IsTanoraiCeluCsoportTipus { get; set; }
|
||||
#endregion
|
||||
|
||||
public OsztalyfonokSimplifiedResponse Osztalyfonok { get; set; }
|
||||
|
||||
public OsztalyfonokHelyettesSimplifiedResponse OsztalyfonokHelyettes { get; set; }
|
||||
|
||||
public HashSet<OsztalyCsoportTagsagResponse> Tagsagok { get; set; }
|
||||
|
||||
public bool Equals(OsztalyCsoportListResponse x, OsztalyCsoportListResponse y) => x.Uid.Equals(x.Uid, y.Uid) && x.TanuloUid.Equals(x.TanuloUid, y.TanuloUid);
|
||||
|
||||
public int GetHashCode(OsztalyCsoportListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportResponse : IEqualityComparer<OsztalyCsoportResponse>
|
||||
{
|
||||
public OsztalyCsoportUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool Equals(OsztalyCsoportResponse x, OsztalyCsoportResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyCsoportResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportSimplifiedResponse : IEqualityComparer<OsztalyCsoportSimplifiedResponse>
|
||||
{
|
||||
public OsztalyCsoportUid Uid { get; set; }
|
||||
|
||||
public bool Equals(OsztalyCsoportSimplifiedResponse x, OsztalyCsoportSimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(OsztalyCsoportSimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportTagsagResponse : IEqualityComparer<OsztalyCsoportTagsagResponse>
|
||||
{
|
||||
public OsztalyCsoportTagsagResponse(DateTime ido, DateTime besorolasDatuma, DateTime? kisorolasDatuma)
|
||||
{
|
||||
BesorolasDatuma = besorolasDatuma;
|
||||
KisorolasDatuma = kisorolasDatuma;
|
||||
IsAktiv = OsztalyCsoportLogic.IsAktivTagsag(ido, besorolasDatuma, kisorolasDatuma);
|
||||
}
|
||||
|
||||
public OsztalyCsoportTagsagResponse()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DateTime BesorolasDatuma { get; private set; }
|
||||
|
||||
public DateTime? KisorolasDatuma { get; private set; }
|
||||
|
||||
public bool IsAktiv { get; private set; }
|
||||
|
||||
public bool Equals(OsztalyCsoportTagsagResponse x, OsztalyCsoportTagsagResponse y) => x.BesorolasDatuma == y.BesorolasDatuma && x.KisorolasDatuma == y.KisorolasDatuma;
|
||||
|
||||
public int GetHashCode(OsztalyCsoportTagsagResponse obj) => obj.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Tantargy
|
||||
{
|
||||
[Serializable]
|
||||
public class TantargyResponse : ISortable, IEqualityComparer<TantargyResponse>
|
||||
{
|
||||
public TantargyResponse(int id, string nev)
|
||||
{
|
||||
Nev = nev;
|
||||
Uid = new TantargyUid(id);
|
||||
}
|
||||
|
||||
public TantargyResponse(int id, string nev, Adatszotar<TargyKategoriaTipusEnum> kategoria)
|
||||
{
|
||||
Nev = nev;
|
||||
Kategoria = kategoria;
|
||||
Uid = new TantargyUid(id);
|
||||
}
|
||||
|
||||
public TantargyResponse(int id, string nev, Adatszotar<TargyKategoriaTipusEnum> kategoria, string kategoriaLeiras, bool isFotargy, int? fotargyId, string fotargyNev, int? sorSzam)
|
||||
{
|
||||
Uid = new TantargyUid(id);
|
||||
Nev = nev;
|
||||
Kategoria = new Adatszotar<TargyKategoriaTipusEnum>(kategoria.Uid.Id, kategoriaLeiras);
|
||||
SorSzam = sorSzam;
|
||||
IsFotargy = isFotargy;
|
||||
FotargyId = fotargyId;
|
||||
FotargyNev = fotargyNev;
|
||||
}
|
||||
|
||||
public TantargyResponse(int id, string nev, Adatszotar<TargyKategoriaTipusEnum> kategoria, string kategoriaLeiras)
|
||||
{
|
||||
Nev = nev;
|
||||
Kategoria = new Adatszotar<TargyKategoriaTipusEnum>(kategoria.Uid.Id, kategoriaLeiras);
|
||||
Uid = new TantargyUid(id);
|
||||
}
|
||||
|
||||
public TantargyResponse(string uid)
|
||||
{
|
||||
Uid = new TantargyUid(uid);
|
||||
}
|
||||
|
||||
public TantargyResponse(TantargyUid uid)
|
||||
{
|
||||
Uid = uid;
|
||||
}
|
||||
|
||||
public TantargyResponse(int id)
|
||||
{
|
||||
Uid = new TantargyUid(id);
|
||||
}
|
||||
|
||||
public TantargyResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public TantargyResponse(string uid, string nev, Adatszotar<TargyKategoriaTipusEnum> kategoria, int sortIndex = 0)
|
||||
{
|
||||
Uid = new TantargyUid(uid);
|
||||
Nev = nev;
|
||||
Kategoria = kategoria;
|
||||
SortIndex = sortIndex;
|
||||
}
|
||||
|
||||
public TantargyResponse(TantargyUid uid, string nev, Adatszotar<TargyKategoriaTipusEnum> kategoria, int sortIndex = 0)
|
||||
{
|
||||
Uid = uid;
|
||||
Nev = nev;
|
||||
Kategoria = kategoria;
|
||||
SortIndex = sortIndex;
|
||||
}
|
||||
|
||||
public TantargyResponse(int id, string nev, int? sorSzam, Adatszotar<TargyKategoriaTipusEnum> kategoria)
|
||||
{
|
||||
Uid = new TantargyUid(id);
|
||||
Nev = nev;
|
||||
Kategoria = kategoria;
|
||||
SorSzam = sorSzam;
|
||||
}
|
||||
|
||||
public Adatszotar<TargyKategoriaTipusEnum> Kategoria { get; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public TantargyUid Uid { get; }
|
||||
|
||||
public bool IsFotargy { get; set; }
|
||||
|
||||
public int? FotargyId { get; set; }
|
||||
|
||||
public string FotargyNev { get; set; }
|
||||
|
||||
public int? FotargyKategoriaId { get; set; }
|
||||
|
||||
public bool TantargyInTtf { get; set; }
|
||||
|
||||
public int? TantargyKategoriaOrderIndex { get; set; }
|
||||
|
||||
public int? FotargyTantargyKategoriaOrderIndex { get; set; }
|
||||
|
||||
public int SortIndex { get; set; }
|
||||
|
||||
public int? SorSzam { get; set; }
|
||||
|
||||
public bool Equals(TantargyResponse x, TantargyResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public bool Equals(TantargyResponse y) => Uid.Equals(y.Uid);
|
||||
|
||||
public int GetHashCode(TantargyResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Tantargy
|
||||
{
|
||||
public class TanuloAktualisanTanultTantargyListRequest
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
public List<TantargyUid> TantargyUids { get; set; }
|
||||
public HashSet<OsztalyCsoportListResponse> OsztalyCsoportok { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Telefon
|
||||
{
|
||||
public class TelefonListRequest
|
||||
{
|
||||
public List<int> FelhasznaloIds { get; set; }
|
||||
|
||||
public bool? IsPublic { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Telefon
|
||||
{
|
||||
public class TelefonListResponse : IEqualityComparer<TelefonListResponse>
|
||||
{
|
||||
public FelhasznaloUid FelhasznaloUid { get; set; }
|
||||
|
||||
public List<TelefonResponse> Telefonszamok { get; set; } = new List<TelefonResponse>();
|
||||
|
||||
public TelefonListResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public bool Equals(TelefonListResponse x, TelefonListResponse y) => x == y || x.FelhasznaloUid.Equals(x.FelhasznaloUid, y.FelhasznaloUid);
|
||||
|
||||
public int GetHashCode(TelefonListResponse obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue