init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
BIN
Kreta.WebApi/Naplo/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/Naplo/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,37 @@
|
|||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Core.IoC;
|
||||
using Kreta.Naplo.BusinessLogic.Propetries;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// Dependency resolver of current layer
|
||||
/// </summary>
|
||||
class DependencyContainer : Core.IoC.DependencyContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static IDependencyResolver Instance
|
||||
{
|
||||
get { return GetResolver(BusinessLogicLayer.Instance); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
RegisterSingleton<IHttpMessageInvokerFactory>(new HttpMessageInvokerFactory<HttpSingletonMessageInvoker>());
|
||||
|
||||
#region V2
|
||||
Register<Domain.V2.Service.ITanarService, V2.Service.TanarService>();
|
||||
Register<Domain.V2.Service.IEnumService, V2.Service.EnumService>();
|
||||
Register<Domain.V2.Service.ICommonService, V2.Service.CommonService>();
|
||||
Register<Domain.V2.Service.IOraService, V2.Service.OraService>();
|
||||
Register<Domain.V2.Service.IErtekelesService, V2.Service.ErtekelesService>();
|
||||
Register<Domain.V2.Service.IIskolaorService, V2.Service.IskolaorService>();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
<?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>{EB1FB976-86F1-497F-A854-3B7C56F3C2D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Naplo.BusinessLogic</RootNamespace>
|
||||
<AssemblyName>Kreta.Naplo.BusinessLogic</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<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>
|
||||
</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.Client, Version=1.3.5604.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Client.1.3.5604\lib\net452\Kreta.Core.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.IoC, Version=1.2.63491.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.IoC.1.2.63491\lib\net452\Kreta.Core.IoC.dll</HintPath>
|
||||
</Reference>
|
||||
<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="Kreta.Web.Logging.Abstractions, Version=1.0.12.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Web.Logging.Abstractions.1.0.12\lib\net48\Kreta.Web.Logging.Abstractions.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="SimpleInjector, Version=4.0.11.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\SimpleInjector.4.0.11\lib\net45\SimpleInjector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Caching" />
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\BusinessLogicLayer.cs" />
|
||||
<Compile Include="DependencyContainer.cs" />
|
||||
<Compile Include="Service.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="V2\Service\ErtekelesService.cs" />
|
||||
<Compile Include="V2\Service\CommonService.cs" />
|
||||
<Compile Include="V2\Service\IskolaorService.cs" />
|
||||
<Compile Include="V2\Service\OraService.cs" />
|
||||
<Compile Include="V2\Service\TanarService.cs" />
|
||||
<Compile Include="V2\Service\EnumService.cs" />
|
||||
<Compile Include="V2\VersionedService.cs" />
|
||||
<Compile Include="V3\Csatolmany\CsatolmanySubqueries.cs" />
|
||||
<Compile Include="V3\Dummy\DummyFacade.cs" />
|
||||
<Compile Include="V3\Dummy\DummySubqueries.cs" />
|
||||
<Compile Include="V3\Enum\EnumFacade.cs" />
|
||||
<Compile Include="V3\Enum\EnumSubqueries.cs" />
|
||||
<Compile Include="V3\Felmentes\FelmentesSubqueries.cs" />
|
||||
<Compile Include="V3\Igazolas\IgazolasFacade.cs" />
|
||||
<Compile Include="V3\Igazolas\IgazolasSubqueries.cs" />
|
||||
<Compile Include="V3\Intezmeny\IntezmenySubqueries.cs" />
|
||||
<Compile Include="V3\Iskolaor\IskolaorFacade.cs" />
|
||||
<Compile Include="V3\Iskolaor\IskolaorSubqueries.cs" />
|
||||
<Compile Include="V3\Logic\HelyettesitesLogic.cs" />
|
||||
<Compile Include="V3\Logic\ValidatorLogic.cs" />
|
||||
<Compile Include="V3\Naplo\NaploFacade.cs" />
|
||||
<Compile Include="V3\Naplo\NaploFacadeBase.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendFacade.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendSubqueries.cs" />
|
||||
<Compile Include="V3\HaziFeladat\HaziFeladatFacade.cs" />
|
||||
<Compile Include="V3\HaziFeladat\HaziFeladatSubqueries.cs" />
|
||||
<Compile Include="V3\Ora\OraFacade.cs" />
|
||||
<Compile Include="V3\Ora\OraSubqueries.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportFacade.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportSubqueries.cs" />
|
||||
<Compile Include="V3\Tanar\TanarFacade.cs" />
|
||||
<Compile Include="V3\Tanar\TanarSubqueries.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetFacade.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetSubqueries.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Framework\Kreta.Framework.csproj">
|
||||
<Project>{320EF478-7155-441D-B1E9-47EC3E57FB45}</Project>
|
||||
<Name>Kreta.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.BusinessLogic\Kreta.BusinessLogic.csproj">
|
||||
<Project>{8876fe0d-841e-422d-a5a0-59239cd98482}</Project>
|
||||
<Name>Kreta.BusinessLogic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Client\Kreta.Client.csproj">
|
||||
<Project>{4B28E52B-B531-403C-A827-2CC178FF8A4F}</Project>
|
||||
<Name>Kreta.Client</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418d3e-caf1-482c-9b18-85d147abd495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.DataAccessInterfaceGenerated\Kreta.DataAccess.Interfaces.csproj">
|
||||
<Project>{68318C3F-0779-4755-848E-B270F6BAC40B}</Project>
|
||||
<Name>Kreta.DataAccess.Interfaces</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.Naplo.Dao\Kreta.Naplo.Dao.csproj">
|
||||
<Project>{0B9D719F-127A-4269-A05D-F65C055705DA}</Project>
|
||||
<Name>Kreta.Naplo.Dao</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Domain\Kreta.Naplo.Domain.csproj">
|
||||
<Project>{9bff7535-e0f6-4437-af5f-540e1b4506b2}</Project>
|
||||
<Name>Kreta.Naplo.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Infrastrucure\Kreta.Naplo.Infrastrucure.csproj">
|
||||
<Project>{120e1b9d-daf1-4e96-a04e-9ac1dc551e8b}</Project>
|
||||
<Name>Kreta.Naplo.Infrastrucure</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Kreta.Core.IoC;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.Propetries
|
||||
{
|
||||
/// <summary>
|
||||
/// Application layer
|
||||
/// </summary>
|
||||
public class BusinessLogicLayer : ApplicationLayer
|
||||
{
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
static Lazy<BusinessLogicLayer> instance;
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static BusinessLogicLayer Instance
|
||||
{
|
||||
get { return instance.Value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static constructor
|
||||
/// </summary>
|
||||
static BusinessLogicLayer()
|
||||
{
|
||||
instance = new Lazy<BusinessLogicLayer>();
|
||||
}
|
||||
}
|
||||
}
|
138
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/Service.cs
Normal file
138
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/Service.cs
Normal file
|
@ -0,0 +1,138 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using Kreta.Core.Client.ClientProxy;
|
||||
using Kreta.Core.Client.Exceptions;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain;
|
||||
using Kreta.Naplo.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// Service base
|
||||
/// </summary>
|
||||
abstract class Service : HttpClientProxy, IService
|
||||
{
|
||||
/// <summary>
|
||||
/// Api key
|
||||
/// </summary>
|
||||
const string ApiKey = nameof(ApiKey);
|
||||
|
||||
/// <summary>
|
||||
/// The request default error message
|
||||
/// </summary>
|
||||
const string RequestDefaultErrorMessage = "Proxy error requesting data from eKreta (for details see innerexception and request\response property).";
|
||||
|
||||
/// <summary>
|
||||
/// The error during response deserialization
|
||||
/// </summary>
|
||||
const string ErrorDuringResponseDeserialization = "Proxy error during response deserialization when requesting data from eKreta web api (for details see innerexception and request\response property).";
|
||||
|
||||
/// <summary>
|
||||
/// The error during response deserialization
|
||||
/// </summary>
|
||||
const string ErrorDuringRequestSerialization = "Proxy error during request serialization when requesting data from eKreta web api (for details see innerexception and request\response property)";
|
||||
|
||||
/// <summary>
|
||||
/// Relative url
|
||||
/// </summary>
|
||||
protected string RelativeUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the context.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The context.
|
||||
/// </value>
|
||||
public ServiceContext Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Handles the HTTP request error.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <param name="response">The response.</param>
|
||||
/// <param name="requestUrl">RequestUrl</param>
|
||||
/// <param name="exception">The exception.</param>
|
||||
/// <exception cref="Kreta.Mobile.Infrastructure.Exceptions.ApiServiceCallException">null</exception>
|
||||
protected override void HandleHttpRequestError(HttpRequestMessage request, HttpResponseMessage response, Exception exception)
|
||||
{
|
||||
if (request != null && request.Headers.Contains(ApiKey))
|
||||
{
|
||||
request.Headers.Remove(nameof(ApiKey));
|
||||
request.Headers.Add((nameof(ApiKey)), Infrastructure.Constants.SecretLogValue);
|
||||
}
|
||||
|
||||
throw new HttpClientProxyException(RequestDefaultErrorMessage, exception, request, response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the deserialization error.
|
||||
/// </summary>
|
||||
/// <param name="response">The response.</param>
|
||||
/// <param name="exception">The exception.</param>
|
||||
/// <exception cref="Kreta.Mobile.Infrastructure.Exceptions.ApiServiceCallException"></exception>
|
||||
protected override void HandleDeserializationError(HttpRequestMessage request, HttpResponseMessage response, JsonException exception)
|
||||
{
|
||||
throw new HttpClientProxyException(ErrorDuringResponseDeserialization, exception, request, response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the serialization error.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <param name="exception">The exception.</param>
|
||||
/// <exception cref="Kreta.Mobile.Infrastructure.Exceptions.ApiServiceCallException"></exception>
|
||||
protected override void HandleSerializationError(HttpRequestMessage request, JsonException exception)
|
||||
{
|
||||
throw new HttpClientProxyException(ErrorDuringRequestSerialization, exception, request, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the request.
|
||||
/// </summary>
|
||||
/// <param name="httpMethod">The HTTP method.</param>
|
||||
/// <param name="relativeUrl">The relative URI.</param>
|
||||
/// <param name="parameters">The parameters.</param>
|
||||
/// <param name="data">The data.</param>
|
||||
/// <returns></returns>
|
||||
protected override HttpRequestMessage CreateRequest(HttpMethod httpMethod, string relativeUrl, HttpClientProxyParameterCollection parameters, object data)
|
||||
{
|
||||
//add parameters
|
||||
parameters.Add(new HttpClientProxyParameter(nameof(this.Context.UserId), this.Context.UserId));
|
||||
|
||||
var requestMessage = base.CreateRequest(httpMethod, relativeUrl, parameters, data);
|
||||
|
||||
//add header values
|
||||
requestMessage.Headers.Add(ApiKey, this.Context.ApiKey);
|
||||
requestMessage.Headers.Add(nameof(this.Context.InstituteCode), this.Context.InstituteCode);
|
||||
requestMessage.Headers.Add(nameof(this.Context.SchoolYearId), this.Context.SchoolYearId.ToString());
|
||||
requestMessage.Headers.Add(nameof(this.Context.UserId), this.Context.UserId.ToString());
|
||||
|
||||
requestMessage.Headers.Add(nameof(this.Context.UserRoles), this.Context.UserRoles != null ? string.Join(",", this.Context.UserRoles) : string.Empty);
|
||||
|
||||
string userAgentHeaderKey = requestMessage.Headers.FirstOrDefault(header => header.Key?.Equals(Constants.Http.Headers.UserAgent, StringComparison.OrdinalIgnoreCase) ?? false).Key;
|
||||
|
||||
if (userAgentHeaderKey != null)
|
||||
{
|
||||
requestMessage.Headers.Remove(userAgentHeaderKey);
|
||||
}
|
||||
|
||||
requestMessage.Headers.TryAddWithoutValidation(Constants.Http.Headers.UserAgent, this.Context.UserAgent ?? string.Empty);
|
||||
|
||||
return requestMessage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Service"/> class.
|
||||
/// </summary>
|
||||
/// <param name="invoker">Message invoker</param>
|
||||
/// <param name="relativeUrl">The relative URL.</param>
|
||||
public Service(IHttpMessageInvokerFactory invokerFactory, string relativeUrl) :
|
||||
base(invokerFactory, string.Empty)
|
||||
{
|
||||
this.RelativeUrl = relativeUrl ?? throw new ArgumentNullException(nameof(relativeUrl));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Orarend;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanulo;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Naplozas;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
using OrarendiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using TanitasiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
|
||||
internal class CommonService : VersionedService, ICommonService
|
||||
{
|
||||
public CommonService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "")
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<ResponseWrapper<List<OraGetResponse>>> GetOraListaAsync(OraGetRequest request)
|
||||
{
|
||||
return await GetAsync<ResponseWrapper<List<OraGetResponse>>>("Orarend/OraLista", request);
|
||||
}
|
||||
|
||||
public async Task<ResponseWrapper<List<object>>> ListJavasoltJelenletTemplateAsync(object request)
|
||||
{
|
||||
return await GetAsync<ResponseWrapper<List<object>>>("Ora/JavasoltJelenletTemplate", request);
|
||||
}
|
||||
|
||||
public async Task<List<object>> ListTanmenetAsync(TanmenetGetRequest request)
|
||||
{
|
||||
var size = request.Key.GetType().GetProperties().Length;
|
||||
var parameters = new KeyValuePair<string, object>?[request.Key.Length * size];
|
||||
|
||||
for (int i = 0; i < request.Key.Length; i++)
|
||||
{
|
||||
parameters[i * size] = new KeyValuePair<string, object>($"{nameof(TanmenetGetRequest.Key)}[{i}].{nameof(TanmenetKeyGetRequest.OsztalyCsoportId)}", request.Key[i].OsztalyCsoportId);
|
||||
parameters[(i * size) + 1] = new KeyValuePair<string, object>($"{nameof(TanmenetGetRequest.Key)}[{i}].{nameof(TanmenetKeyGetRequest.TantargyId)}", request.Key[i].TantargyId);
|
||||
parameters[(i * size) + 2] = new KeyValuePair<string, object>($"{nameof(TanmenetGetRequest.Key)}[{i}].{nameof(TanmenetKeyGetRequest.FeltoltoTanarId)}", request.Key[i].FeltoltoTanarId);
|
||||
}
|
||||
|
||||
return await GetAsync<List<object>>("Tanmenet", null, null, parameters);
|
||||
}
|
||||
|
||||
public async Task<List<object>> ListJavasoltJelenletAsync(OrarendiOra.JavasoltJelenletGetRequest request)
|
||||
{
|
||||
var size = request.Key.GetType().GetProperties().Length;
|
||||
var parameters = new KeyValuePair<string, object>?[request.Key.Length * size];
|
||||
|
||||
for (int i = 0; i < request.Key.Length; i++)
|
||||
{
|
||||
parameters[i * size] = new KeyValuePair<string, object>($"{nameof(OrarendiOra.JavasoltJelenletGetRequest.Key)}[{i}].{nameof(OrarendiOra.JavasoltJelenletKeyGetRequest.OrarendiOraId)}", request.Key[i].OrarendiOraId);
|
||||
parameters[(i * size) + 1] = new KeyValuePair<string, object>($"{nameof(OrarendiOra.JavasoltJelenletGetRequest.Key)}[{i}].{nameof(OrarendiOra.JavasoltJelenletKeyGetRequest.OraKezdetDatumaUtc)}", request.Key[i].OraKezdetDatumaUtc);
|
||||
parameters[(i * size) + 2] = new KeyValuePair<string, object>($"{nameof(OrarendiOra.JavasoltJelenletGetRequest.Key)}[{i}].{nameof(OrarendiOra.JavasoltJelenletKeyGetRequest.OraVegDatumaUtc)}", request.Key[i].OraVegDatumaUtc);
|
||||
}
|
||||
|
||||
return await GetAsync<List<object>>("Ora/OrarendiOra/JavasoltJelenlet", null, null, parameters);
|
||||
}
|
||||
|
||||
public async Task<List<object>> ListJavasoltJelenletAsync(TanitasiOra.JavasoltJelenletGetRequest request)
|
||||
{
|
||||
var size = request.Key.GetType().GetProperties().Length;
|
||||
var parameters = new KeyValuePair<string, object>?[request.Key.Length * size];
|
||||
|
||||
for (int i = 0; i < request.Key.Length; i++)
|
||||
{
|
||||
parameters[i * size] = new KeyValuePair<string, object>($"{nameof(TanitasiOra.JavasoltJelenletGetRequest.Key)}[{i}].{nameof(TanitasiOra.JavasoltJelenletKeyGetRequest.TanitasiOraId)}", request.Key[i].TanitasiOraId);
|
||||
}
|
||||
|
||||
return await GetAsync<List<object>>("Ora/TanitasiOra/JavasoltJelenlet", null, null, parameters);
|
||||
}
|
||||
public async Task<List<OraNaplozasResponse>> OraNaplozasAsync(List<OraNaplozasRequest> request)
|
||||
{
|
||||
return await PostAsync<List<OraNaplozasResponse>>("Orarend/OraNaplozas", request);
|
||||
}
|
||||
|
||||
public async Task<FeltoltottFajlResponse> PostFajlFeltoltesAsync(FeltoltottFajlRequest request)
|
||||
{
|
||||
return await PostAsync<FeltoltottFajlResponse>("OpenBoard/FajlFeltoltes", request);
|
||||
}
|
||||
|
||||
public async Task<FeltolthetoFajlokSzamaResponse> GetFeltolthetoFajlokSzamaAsync(FeltolthetoFajlokSzamaRequest request)
|
||||
{
|
||||
return await GetAsync<FeltolthetoFajlokSzamaResponse>("OpenBoard/FeltolthetoFajlokSzama", request);
|
||||
}
|
||||
|
||||
public async Task<List<ErtekelesGetResponse>> GetTanuloErtekeleseiAsync(ErtekelesGetRequest request)
|
||||
{
|
||||
return await GetAsync<List<ErtekelesGetResponse>>("Tanulo/Ertekeles", request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Enum;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
class EnumService : VersionedService, IEnumService
|
||||
{
|
||||
public async Task<ResponseWrapper<List<NaploEnumListItem>>> GetNaploEnumAsync(EnumRequest request)
|
||||
{
|
||||
return await GetAsync<ResponseWrapper<List<NaploEnumListItem>>>("NaploEnum", request);
|
||||
}
|
||||
|
||||
public EnumService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "Enum")
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
class ErtekelesService : VersionedService, IErtekelesService
|
||||
{
|
||||
public async Task<List<ErtekelesResponse>> PostOsztalyCsoportErtekelesAsync(List<OsztalyCsoportErtekelesRequest> request)
|
||||
{
|
||||
return await PostAsync<List<ErtekelesResponse>>("OsztalyCsoportErtekeles", request);
|
||||
}
|
||||
public ErtekelesService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "Ertekeles")
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanar;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
class IskolaorService : VersionedService, IIskolaorService
|
||||
{
|
||||
public IskolaorService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "")
|
||||
{
|
||||
}
|
||||
public async Task<ResponseWrapper<List<IskolaorResponse>>> GetIskolaorAsync(IskolaorRequest request)
|
||||
{
|
||||
return await GetAsync<ResponseWrapper<List<IskolaorResponse>>>("Iskolaor", request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanulo;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
class OraService : VersionedService, IOraService
|
||||
{
|
||||
public async Task<ResponseWrapper<List<MulasztasResponse>>> GetMulasztasAsync(MulasztasRequest request)
|
||||
=> await GetAsync<ResponseWrapper<List<MulasztasResponse>>>("Mulasztas", request);
|
||||
|
||||
public async Task<ResponseWrapper<List<FeljegyzesResponse>>> GetFeljegyzesAsync(FeljegyzesRequest request)
|
||||
=> await GetAsync<ResponseWrapper<List<FeljegyzesResponse>>>("Feljegyzes", request);
|
||||
|
||||
public async Task<ResponseWrapper<OsztalyTanuloiResponse>> GetOsztalyTanuloiAsync(OsztalyTanuloiRequest request)
|
||||
=> await GetAsync<ResponseWrapper<OsztalyTanuloiResponse>>("OsztalyTanuloi", request);
|
||||
public OraService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "Ora")
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System.Threading.Tasks;
|
||||
using Kreta.Core.Client.MessageInvoker;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanar;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2.Service
|
||||
{
|
||||
class TanarService : VersionedService, ITanarService
|
||||
{
|
||||
public async Task<ResponseWrapper<ProfilResponse>> GetProfilAsync(ProfilRequest request)
|
||||
{
|
||||
return await GetAsync<ResponseWrapper<ProfilResponse>>("Profil", request);
|
||||
}
|
||||
|
||||
public TanarService(IHttpMessageInvokerFactory invokerFactory) : base(invokerFactory, "Tanar")
|
||||
{ }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using Kreta.Core.Client.MessageInvoker;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V2
|
||||
{
|
||||
/// <summary>
|
||||
/// Versioned service
|
||||
/// </summary>
|
||||
class VersionedService : BusinessLogic.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// Get base url
|
||||
/// </summary>
|
||||
protected override string BaseUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return Infrastructure.Helpers.Http.CombineUrl(string.Format($"{this.Context.BaseUrl}/Naplo/V2", this.Context.InstituteCode), this.RelativeUrl);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TeacherClientProxy"/> class.
|
||||
/// </summary>
|
||||
/// <param name="invoker">Message invoker</param>
|
||||
/// <param name="relativeUrl">The relative URL.</param>
|
||||
public VersionedService(IHttpMessageInvokerFactory invokerFactory, string relativeUrl) : base(invokerFactory, relativeUrl) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Naplo.Dao.V3.Csatolmany;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Csatolmany;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Csatolmany
|
||||
{
|
||||
internal static class CsatolmanySubqueries
|
||||
{
|
||||
internal static Dictionary<OrarendElemUid, List<CsatolmanyResponse>> ListCsatolmanyok(DefaultConnectionParameters dcp, CsatolmanyListRequest request)
|
||||
{
|
||||
var result = new Dictionary<OrarendElemUid, List<CsatolmanyResponse>>(new OrarendElemUid());
|
||||
if (!request.OrarendElemek.Any())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
var oraFiles = new OraFileHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.GetOraFilesByDateRange(request.DatumTol, request.DatumIg, (int)OraFileTipusEnum.openboard).ToDaoList<OraFileResponseDao>();
|
||||
foreach (var orarendElem in request.OrarendElemek.Distinct(new OrarendElemSimplified()))
|
||||
{
|
||||
result.Add(new OrarendElemUid(orarendElem.Id, orarendElem.Tipus, orarendElem.Datum),
|
||||
oraFiles.Where(x => orarendElem.Datum == x.OraDatum &&
|
||||
((orarendElem.Tipus == CalendarOraTypeEnum.OrarendiOra && orarendElem.Id == x.OrarendiOraId) ||
|
||||
(orarendElem.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElem.Id == x.TanitasiOraId) ||
|
||||
(orarendElem.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElem.OrarendiOraId == x.OrarendiOraId) ||
|
||||
(orarendElem.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElem.OrarendiOraGroupId == x.OrarendiOraId)))
|
||||
.Select(x => new CsatolmanyResponse
|
||||
{
|
||||
Id = x.FileId,
|
||||
Nev = x.FileNev
|
||||
}).ToList());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Dummy
|
||||
{
|
||||
public class DummyFacade : NaploFacade
|
||||
{
|
||||
private readonly ITraceLogger TraceLogger;
|
||||
|
||||
public DummyFacade(MobileUser mobileUser, ITraceLogger traceLogger) : base(mobileUser)
|
||||
{
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
public List<object> TraceLoggerDummy()
|
||||
=> RunSubquery(() => DummySubqueries.TraceLoggerDummy(TraceLogger));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Dummy
|
||||
{
|
||||
internal static class DummySubqueries
|
||||
{
|
||||
internal static List<object> TraceLoggerDummy(ITraceLogger traceLogger)
|
||||
{
|
||||
traceLogger.Info("teszt");
|
||||
|
||||
return new List<object>
|
||||
{
|
||||
new { Teszt = "hi" }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Enum
|
||||
{
|
||||
public class EnumFacade : NaploFacade
|
||||
{
|
||||
public EnumFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public List<EnumResponse> GetNaploEnum(EnumRequest request)
|
||||
=> RunSubquery(() => EnumSubqueries.GetNaploEnum(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Naplo.Domain.V3.Adatszotar;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Enum
|
||||
{
|
||||
internal static class EnumSubqueries
|
||||
{
|
||||
internal static List<EnumResponse> GetNaploEnum(DefaultConnectionParameters dcp, EnumRequest request)
|
||||
{
|
||||
var engedelyezettEnumok = new List<string>()
|
||||
{
|
||||
"ErtekelesMod",
|
||||
"ErtekelesTipus",
|
||||
"FeljegyzesTipus",
|
||||
"MulasztasTipus",
|
||||
"OsztalyzatTipus",
|
||||
"IgazolasTipus",
|
||||
"CalendarOraTypeEnum",
|
||||
"TanoraAllapotaEnum"
|
||||
};
|
||||
|
||||
if (!engedelyezettEnumok.Contains(request.EnumTipus))
|
||||
{
|
||||
throw new BlException(ErrorResource.NemEngedelyezettVagyNemLetezoEnum, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
if (request.EnumTipus.Contains("CalendarOraTypeEnum"))
|
||||
{
|
||||
return ManualEnumToList<Enums.ManualEnums.CalendarOraTypeEnum>(dcp.TanevId);
|
||||
}
|
||||
|
||||
if (request.EnumTipus.Contains("TanoraAllapotaEnum"))
|
||||
{
|
||||
return ManualEnumToList<Enums.ManualEnums.TanoraAllapotaEnum>(dcp.TanevId);
|
||||
}
|
||||
|
||||
if (!System.Enum.TryParse(request.EnumTipus == "FeljegyzesTipus" ? "EsemenyTipus" : request.EnumTipus, out GeneratedAdatszotarTipusEnum enumErtek))
|
||||
{
|
||||
throw new BlException(BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
var enumList = new List<EnumResponse>();
|
||||
|
||||
var adatszotar = EnumExtensions.GetAdatszotarDictElemekForTipus(dcp.TanevId, enumErtek, null, true);
|
||||
foreach (var adatszotarElem in adatszotar)
|
||||
{
|
||||
enumList.Add(new EnumResponse
|
||||
{
|
||||
Id = adatszotarElem.Key,
|
||||
Nev = GetEnumNev(enumErtek, adatszotarElem.Key),
|
||||
Leiras = adatszotarElem.Value
|
||||
});
|
||||
}
|
||||
|
||||
return enumList;
|
||||
}
|
||||
|
||||
private static string GetEnumNev(GeneratedAdatszotarTipusEnum enumErtek, int enumId)
|
||||
{
|
||||
switch (enumErtek)
|
||||
{
|
||||
case GeneratedAdatszotarTipusEnum.ErtekelesMod:
|
||||
return new Adatszotar<ErtekelesModEnum>(enumId).Uid.Nev;
|
||||
case GeneratedAdatszotarTipusEnum.ErtekelesTipus:
|
||||
return new Adatszotar<ErtekelesTipusEnum>(enumId).Uid.Nev;
|
||||
case GeneratedAdatszotarTipusEnum.EsemenyTipus:
|
||||
return new Adatszotar<EsemenyTipusEnum>(enumId).Uid.Nev;
|
||||
case GeneratedAdatszotarTipusEnum.MulasztasTipus:
|
||||
return new Adatszotar<MulasztasTipusEnum>(enumId).Uid.Nev;
|
||||
case GeneratedAdatszotarTipusEnum.OsztalyzatTipus:
|
||||
return new Adatszotar<OsztalyzatTipusEnum>(enumId).Uid.Nev;
|
||||
case GeneratedAdatszotarTipusEnum.IgazolasTipus:
|
||||
return new Adatszotar<IgazolasTipusEnum>(enumId).Uid.Nev;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private static List<EnumResponse> ManualEnumToList<T>(int tanevId) where T : System.Enum
|
||||
{
|
||||
var enums = new List<EnumResponse>();
|
||||
int enumId = 0;
|
||||
|
||||
foreach (var item in System.Enum.GetValues(typeof(T)))
|
||||
{
|
||||
enumId = (int)item;
|
||||
enums.Add(new EnumResponse
|
||||
{
|
||||
Id = enumId,
|
||||
Nev = item.ToString(),
|
||||
Leiras = enumId.GetDisplayName<T>(tanevId)
|
||||
});
|
||||
}
|
||||
|
||||
return enums;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Naplo.Dao.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V3.Felmentes;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Felmentes
|
||||
{
|
||||
public static class FelmentesSubqueries
|
||||
{
|
||||
internal static IEnumerable<(int tanuloId, int? tantargyId, TanuloMentessegResponse mentessegResponse)> GetFelmentesekWithTanuloAdatok(DefaultConnectionParameters dcp, FelmentesRequest request)
|
||||
{
|
||||
var osztalyCsoportTanuloi = new OsztalyCsoportHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.GetOsztalyCsoportTanulokEsFelmenteseik(request.OsztalyCsoportId, request.Datum, request.TanuloId, request.TantargyId).ToDaoList<JelenletResponseDao>();
|
||||
|
||||
|
||||
return GetTanulokWithFelmentesek(osztalyCsoportTanuloi).Select(x => (x.TanuloId, x.TantargyId, new TanuloMentessegResponse
|
||||
{
|
||||
TanoraLatogatasaAloliFelmentes = x.IsOraMentesites ?? false,
|
||||
ErtekelesAloliFelmentes = x.IsErtekelesMentesseg ?? false,
|
||||
SzovegesenErtekelheto = x.IsSzovegesenErtekelheto ?? true,
|
||||
FelmentesOka = x.MentessegOka,
|
||||
IsMaganTanulo = (x.IsMaganTanulo ?? false) &&
|
||||
(x.MaganTanulosagKezdetDatuma.HasValue ? x.MaganTanulosagKezdetDatuma <= request.Datum : true) &&
|
||||
(x.MaganTanulosagVegeDatuma.HasValue ? x.MaganTanulosagVegeDatuma >= request.Datum : true),
|
||||
IsJogviszonySzunetelteto = x.IsJogviszonySzunetelteto ?? false,
|
||||
IsSzakmaiGyakorlatonLevo = x.IsSzakmaiGyakorlatonLevo ?? false
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
private static IEnumerable<JelenletResponseDao> GetTanulokWithFelmentesek(List<JelenletResponseDao> osztalyCsoportTanuloi)
|
||||
{
|
||||
foreach (var felmentesek in osztalyCsoportTanuloi.GroupBy(x => (x.TanuloId, x.TantargyId)))
|
||||
{
|
||||
if (felmentesek.Any())
|
||||
{
|
||||
var felmentes = felmentesek.First();
|
||||
|
||||
if (felmentesek.Count() > 1)
|
||||
{
|
||||
AggregateFelmentesek(felmentesek, felmentes);
|
||||
}
|
||||
|
||||
yield return felmentes;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggregálni kell a felmentéseket a következő logika alapján
|
||||
/// lényegében a két felmentést kell uniózni, ami az időpont esetében egyértelmű (legkorábbitól a legkésőbbig), a CB esetében meg vagy kapcsolatotot jelent, azaz ami legalább egynél be van pipálva
|
||||
/// </summary>
|
||||
/// <param name="felmentesek">felmentes lista ha több is szerepel</param>
|
||||
/// <param name="felmentes">felmentes elem</param>
|
||||
private static void AggregateFelmentesek(IGrouping<(int TanuloId, int? TantargyId), JelenletResponseDao> felmentesek, JelenletResponseDao felmentes)
|
||||
{
|
||||
var aggeregateFelmentes = felmentesek.Aggregate((currentValue, sequenceValue) => new JelenletResponseDao
|
||||
{
|
||||
IsOraMentesites = currentValue.IsOraMentesites.GetValueOrDefault() || sequenceValue.IsOraMentesites.GetValueOrDefault(),
|
||||
IsErtekelesMentesseg = currentValue.IsErtekelesMentesseg.GetValueOrDefault() || sequenceValue.IsErtekelesMentesseg.GetValueOrDefault(),
|
||||
IsSzovegesenErtekelheto = currentValue.IsSzovegesenErtekelheto.GetValueOrDefault() || sequenceValue.IsSzovegesenErtekelheto.GetValueOrDefault(),
|
||||
MentessegOka = currentValue.MentessegOka + $" | {sequenceValue.MentessegOka}"
|
||||
|
||||
});
|
||||
|
||||
felmentes.IsOraMentesites = aggeregateFelmentes.IsOraMentesites;
|
||||
felmentes.IsErtekelesMentesseg = aggeregateFelmentes.IsErtekelesMentesseg;
|
||||
felmentes.IsSzovegesenErtekelheto = aggeregateFelmentes.IsSzovegesenErtekelheto;
|
||||
felmentes.MentessegOka = aggeregateFelmentes.MentessegOka;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Net.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.HaziFeladat;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatFacade : NaploFacade
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public HaziFeladatFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HaziFeladatFacade(MobileUser mobileUser, IFileServiceHelper fileServiceHelper) : base(mobileUser)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
}
|
||||
|
||||
public HaziFeladatFacade(MobileUser mobileUser, ICoreApiClient coreApiClient) : base(mobileUser)
|
||||
{
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
public HaziFeladatFacade(MobileUser mobileUser, IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient) : base(mobileUser)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
public HaziFeladatResponse GetHaziFeladat(int id)
|
||||
=> RunSubquery(() => HaziFeladatSubqueries.GetHaziFeladat(id, DefaultConnectionParameters));
|
||||
|
||||
public int SaveHaziFeladat(HaziFeladatCreateRequest request)
|
||||
=> RunSubquery(() => HaziFeladatSubqueries.SaveHaziFeladat(request, DefaultConnectionParameters, _fileServiceHelper, _coreApiClient));
|
||||
|
||||
public void UpdateHaziFeladat(int id, HaziFeladatUpdateRequest request)
|
||||
=> RunSubquery(() => HaziFeladatSubqueries.UpdateHaziFeladat(id, request, DefaultConnectionParameters, _fileServiceHelper, _coreApiClient));
|
||||
|
||||
public void DeleteHaziFeladat(int id)
|
||||
=> RunSubquery(() => HaziFeladatSubqueries.DeleteHaziFeladat(id, DefaultConnectionParameters, _coreApiClient));
|
||||
|
||||
public void HaziFeladatCsatolmanyTorles(int id)
|
||||
=> RunSubquery(() => HaziFeladatSubqueries.HaziFeladatCsatolmanyTorles(id, DefaultConnectionParameters, _fileServiceHelper));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Logic;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Csatolmany;
|
||||
using Kreta.Naplo.Domain.V3.HaziFeladat;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.HaziFeladat
|
||||
{
|
||||
internal static class HaziFeladatSubqueries
|
||||
{
|
||||
internal static HaziFeladatResponse GetHaziFeladat(int id, DefaultConnectionParameters dcp)
|
||||
{
|
||||
var haziFeladat = new DktFeladatHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetTanarHaziFeladatDetail(id);
|
||||
|
||||
//felesleges html tagek kitörlése kódból- KRETA2-4145
|
||||
//TODO: felesleges lesz ha ha már db-ben se lesznek már ilyenek benne
|
||||
haziFeladat.Szoveg = RichTextLogic.RemoveSpecificHtmlTags(haziFeladat.Szoveg, RichTextLogic.RemovableHtmlTags);
|
||||
|
||||
return new HaziFeladatResponse
|
||||
{
|
||||
Id = haziFeladat.Id.Value,
|
||||
Szoveg = string.IsNullOrWhiteSpace(haziFeladat.Szoveg) ? null : haziFeladat.Szoveg,
|
||||
HataridoDatuma = haziFeladat.Hatarido,
|
||||
TantargyId = haziFeladat.TantargyId,
|
||||
TantargyNev = haziFeladat.Tantargy,
|
||||
Csatolmanyok = haziFeladat.Csatolmanyok.Select(x => new CsatolmanyResponse { Id = x.Key, Nev = x.Value }),
|
||||
};
|
||||
}
|
||||
|
||||
internal static int SaveHaziFeladat(HaziFeladatCreateRequest request, DefaultConnectionParameters dcp, IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var tanarHaziFeladatCo = new TanarHaziFeladatCO()
|
||||
{
|
||||
Szoveg = CommonUtils.CreateLinksInText(request.Szoveg),
|
||||
Hatarido = request.BeadasiHatarido,
|
||||
FeladasDatuma = request.OraDatum.Date,
|
||||
Idopont = request.OraDatum,
|
||||
Oraszam = request.Oraszam,
|
||||
TantargyId = request.TantargyId,
|
||||
OsztalyCsoportId = request.OsztalyCsoportId,
|
||||
IsTanarRogzitette = true,
|
||||
RogzitoId = dcp.FelhasznaloId,
|
||||
IntezmenyId = dcp.IntezmenyId,
|
||||
TanevId = dcp.TanevId
|
||||
};
|
||||
|
||||
return new DktFeladatHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.SaveOrUpdateTanarHaziFeladat(tanarHaziFeladatCo, dcp.DalHandler.TanarDal().GetTanarId(request.OraDatum, request.Oraszam, request.OsztalyCsoportId, request.TantargyId), fileServiceHelper, coreApiClient);
|
||||
}
|
||||
|
||||
internal static void UpdateHaziFeladat(int id, HaziFeladatUpdateRequest request, DefaultConnectionParameters dcp, IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var tanarHaziFeladatCo = new TanarHaziFeladatCO()
|
||||
{
|
||||
Id = id,
|
||||
Szoveg = CommonUtils.CreateLinksInText(request.Szoveg),
|
||||
Hatarido = request.HataridoDatuma,
|
||||
CsatolmanyId = request.CsatolmanyId,
|
||||
IsTanarRogzitette = true,
|
||||
RogzitoId = dcp.FelhasznaloId,
|
||||
IntezmenyId = dcp.IntezmenyId,
|
||||
TanevId = dcp.TanevId
|
||||
};
|
||||
|
||||
new DktFeladatHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.SaveOrUpdateTanarHaziFeladat(tanarHaziFeladatCo, dcp.FelhasznaloId, fileServiceHelper, coreApiClient);
|
||||
}
|
||||
|
||||
internal static void DeleteHaziFeladat(int id, DefaultConnectionParameters dcp, ICoreApiClient coreApiClient)
|
||||
{
|
||||
var hazi = dcp.DalHandler.DKT_FeladatDal().Get(id);
|
||||
|
||||
if (hazi.Torolt)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
if (hazi.AlkalmazottId == dcp.FelhasznaloId || hazi.RogzitoAlkalmazottId == dcp.FelhasznaloId || hazi.HelyettesitoAlkalmazottId == dcp.FelhasznaloId)
|
||||
{
|
||||
new DktFeladatHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).DeleteHazi(id, coreApiClient);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void HaziFeladatCsatolmanyTorles(int id, DefaultConnectionParameters dcp, IFileServiceHelper fileServiceHelper)
|
||||
{
|
||||
var dktFileHelper = new DktFileHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), fileServiceHelper);
|
||||
if (!dktFileHelper.IsFelhasznaloToltotteFel(dcp.DalHandler, id))
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
|
||||
dktFileHelper.DeleteCsatolmany(id, true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Igazolas;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Igazolas
|
||||
{
|
||||
public class IgazolasFacade : NaploFacade
|
||||
{
|
||||
public IgazolasFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<IgazolasResponse> GetIgazolas(int tanuloId)
|
||||
=> RunSubquery(() => IgazolasSubqueries.GetIgazolas(DefaultConnectionParameters, tanuloId));
|
||||
|
||||
public void CreateIgazolas(IgazolasCreateRequest request)
|
||||
=> RunSubquery(() => IgazolasSubqueries.CreateIgazolas(DefaultConnectionParameters, request));
|
||||
|
||||
public void DeleteIgazolas(int id)
|
||||
=> RunSubquery(() => IgazolasSubqueries.DeleteIgazolas(DefaultConnectionParameters, id));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Logic;
|
||||
using Kreta.Naplo.Dao.V3.Igazolas;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Igazolas;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Igazolas
|
||||
{
|
||||
public class IgazolasSubqueries
|
||||
{
|
||||
internal static IEnumerable<IgazolasResponse> GetIgazolas(DefaultConnectionParameters dcp, int tanuloId)
|
||||
{
|
||||
var igazolasok = new IgazolasHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetIgazolasByTanuloId(tanuloId).ToDaoList<IgazolasResponseDao>();
|
||||
|
||||
return igazolasok.Select(igazolas =>
|
||||
new IgazolasResponse
|
||||
{
|
||||
Id = igazolas.Id,
|
||||
Kezdete = igazolas.Kezdete,
|
||||
Vege = igazolas.Vege,
|
||||
Tipusa = igazolas.Tipusa,
|
||||
Megjegyzes = igazolas.Megjegyzes,
|
||||
Rogzito = igazolas.Rogzito,
|
||||
Torolheto = AuthorizationHelper.Igazolas.TanarHasAccess(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), igazolas.Id)
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
internal static void CreateIgazolas(DefaultConnectionParameters dcp, IgazolasCreateRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
if (!AuthorizationHelper.Tanulo.TanarHasAccess(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), new List<int> { request.TanuloId }, request.OsztalyCsoportId, false))
|
||||
{
|
||||
throw new BlException(ErrorResource.AFelhasznalonakNincsMegfeleloJogosultsagaAFunkcioHasznalatahoz, BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
|
||||
if (request.IgazolasKezdete <= new SystemSettingsHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetIgazolasokNaplozarasDatuma())
|
||||
{
|
||||
throw new BlException(IgazolasResource.AzIgazolasKezdoNapjaNemEshetLezartIdoszakra, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
new IgazolasHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).SaveOrUpdateIgazolas(new IgazolasCO()
|
||||
{
|
||||
TanuloId = request.TanuloId,
|
||||
OsztCsop = request.OsztalyCsoportId,
|
||||
ErvKezdete = request.IgazolasKezdete,
|
||||
ErvVege = request.IgazolasVege,
|
||||
RogzitoId = dcp.FelhasznaloId,
|
||||
RogzDatum = DateTime.Now,
|
||||
IgazolasTipus = request.IgazolasTipus,
|
||||
Megjegyzes = request.IgazolasMegjegyzes
|
||||
});
|
||||
}
|
||||
|
||||
internal static void DeleteIgazolas(DefaultConnectionParameters dcp, int id)
|
||||
{
|
||||
var torolheto = AuthorizationHelper.Igazolas.TanarHasAccess(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), id);
|
||||
|
||||
if (torolheto)
|
||||
{
|
||||
new IgazolasHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).DeleteIgazolasById(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Runtime.Caching;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Naplo.Dao.V3.Naplo;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Intezmeny
|
||||
{
|
||||
internal static class IntezmenySubqueries
|
||||
{
|
||||
internal static IntezmenyAdatokDao GetIntezmenyAdatokFromCache(string intezmenyAzonosito)
|
||||
{
|
||||
var cache = MemoryCache.Default;
|
||||
var cacheKey = $"{intezmenyAzonosito}_mobileIntezmenyAdatok";
|
||||
|
||||
if (!(cache[cacheKey] is IntezmenyAdatokDao intezmenyAdatok))
|
||||
{
|
||||
intezmenyAdatok = new IntezmenyAdatokDao();
|
||||
|
||||
Dal.MobileConnection.Run(
|
||||
intezmenyAzonosito,
|
||||
null,
|
||||
h =>
|
||||
{
|
||||
intezmenyAdatok = h.IntezmenyDal().GetIntezmenyIdAktivTanevIdByAzonosito(intezmenyAzonosito).Tables[0].Rows[0].ToDao<IntezmenyAdatokDao>();
|
||||
});
|
||||
|
||||
var policy = new CacheItemPolicy
|
||||
{
|
||||
AbsoluteExpiration = new DateTimeOffset(DateTime.Now.AddMinutes(20))
|
||||
};
|
||||
|
||||
cache.Set(cacheKey, intezmenyAdatok, policy);
|
||||
}
|
||||
|
||||
return intezmenyAdatok;
|
||||
}
|
||||
|
||||
internal static void RemoveIntezemenyAdatokCache(string intezmenyAzonosito)
|
||||
{
|
||||
_ = MemoryCache.Default.Remove($"{intezmenyAzonosito}_mobileIntezmenyAdatok");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Iskolaor;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Iskolaor
|
||||
{
|
||||
public class IskolaorFacade : NaploFacade
|
||||
{
|
||||
public IskolaorFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public List<IskolaorResponse> ListIskolaor()
|
||||
=> RunSubquery(() => IskolaorSubqueries.ListIskolaor(DefaultConnectionParameters));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Iskolaor;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Iskolaor
|
||||
{
|
||||
public class IskolaorSubqueries
|
||||
{
|
||||
public static List<IskolaorResponse> ListIskolaor(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var iskolaorAlkalmazottakList = new AlkalmazottHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetIskolaor();
|
||||
|
||||
return iskolaorAlkalmazottakList.Select(iskolaor =>
|
||||
new IskolaorResponse
|
||||
{
|
||||
Uid = iskolaor.IdpEgyediAzonosito,
|
||||
Nev = iskolaor.Nev,
|
||||
FeladatEllatasiHelyId = iskolaor.FeladatEllatasiHelyId,
|
||||
FeladatEllatasiHelyNev = iskolaor.MukodesiHelyNeve + " - " + iskolaor.OktatasiNevelesiFeladatTipusId.GetItemNameFromCache(dcp.TanevId, dcp.IntezmenyAzonosito),
|
||||
EmailCim = iskolaor.AlapertelmezettEmailCim,
|
||||
Telefonszam = iskolaor.AlapertelmezettTelefonszam
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System.Data;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Logic
|
||||
{
|
||||
public static class HelyettesitesLogic
|
||||
{
|
||||
public class Tanar
|
||||
{
|
||||
public Tanar(int tanarId, int tanevId, int intezmenyId, string intezmenyAzonosito, OktNevelesiKategoriaEnum? oktatasNevelesKategoriaEnum = null)
|
||||
{
|
||||
TanarHelyettesiteseiDt = new HelyettesitesHelper(new MobileConnectionType(tanarId, intezmenyId, intezmenyAzonosito, tanevId))
|
||||
.GetHelyettesitesekListajaGrid(new Kreta.BusinessLogic.HelperClasses.HelyettesitesekListajaSearchCO
|
||||
{
|
||||
HelyettesitoTanarSearch = tanarId,
|
||||
FeladatKategoriaId = oktatasNevelesKategoriaEnum.HasValue ? (int)oktatasNevelesKategoriaEnum : default
|
||||
|
||||
}).Tables[0];
|
||||
}
|
||||
|
||||
private DataTable TanarHelyettesiteseiDt { get; set; }
|
||||
|
||||
public bool IsHelyettesito(int osztalyCsoportId, int tantargyId)
|
||||
=> TanarHelyettesiteseiDt.Select($"OsztalyCsoportId = {osztalyCsoportId} AND TantargyId = {tantargyId}").Length > 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Domain;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Logic
|
||||
{
|
||||
internal class ValidatorLogic
|
||||
{
|
||||
private readonly List<ValidationResult> _errorList = new List<ValidationResult>();
|
||||
|
||||
private readonly bool _isValid = true;
|
||||
|
||||
internal ValidatorLogic(object instance)
|
||||
{
|
||||
var context = new ValidationContext(instance, serviceProvider: null, items: null);
|
||||
_isValid = Validator.TryValidateObject(instance, context, _errorList, true);
|
||||
}
|
||||
|
||||
public static implicit operator string(ValidatorLogic validator) => validator.GetFirstUserFriendlyError();
|
||||
|
||||
internal BlException ConvertToValidationException()
|
||||
{
|
||||
var exception = new BlException(BlExceptionType.ModelValidacio);
|
||||
var count = 1;
|
||||
foreach (var error in _errorList)
|
||||
{
|
||||
var name = error.MemberNames.FirstOrDefault() ?? "custom_" + count;
|
||||
exception.ErrorList.Add(new DetailedErrorItem(name, error.ErrorMessage, BlExceptionType.ModelValidacio));
|
||||
count++;
|
||||
}
|
||||
|
||||
return exception;
|
||||
}
|
||||
|
||||
internal string GetFirstUserFriendlyError()
|
||||
=> _errorList.Count > 0 ? _errorList[0].ErrorMessage : string.Empty;
|
||||
|
||||
internal void ThrowExceptionIfModelIsNotvalid()
|
||||
{
|
||||
if (!_isValid)
|
||||
{
|
||||
throw ConvertToValidationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using Kreta.Naplo.Domain.V3.Common;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Naplo
|
||||
{
|
||||
public class NaploFacade : NaploFacadeBase
|
||||
{
|
||||
public NaploFacade(MobileUser mobileUser) : base(mobileUser) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Intezmeny;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Naplo
|
||||
{
|
||||
public class NaploFacadeBase
|
||||
{
|
||||
public NaploFacadeBase(MobileUser mobileUser)
|
||||
{
|
||||
var intezmenyAzonosito = CommonUtils.GetOrganizationIdentifier();
|
||||
|
||||
DefaultConnectionParameters = new DefaultConnectionParameters(mobileUser, IntezmenySubqueries.GetIntezmenyAdatokFromCache(intezmenyAzonosito), intezmenyAzonosito);
|
||||
|
||||
if (!mobileUser.InstituteCode.Equals(DefaultConnectionParameters.IntezmenyAzonosito, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
throw new BlException(BlExceptionType.IntezmenyAzonositoUtkozes);
|
||||
}
|
||||
|
||||
if (mobileUser.SchoolYearId != DefaultConnectionParameters.TanevId)
|
||||
{
|
||||
IntezmenySubqueries.RemoveIntezemenyAdatokCache(DefaultConnectionParameters.IntezmenyAzonosito);
|
||||
throw new BlException(BlExceptionType.IntezmenyMarTanevetValtott);
|
||||
}
|
||||
}
|
||||
|
||||
protected DefaultConnectionParameters DefaultConnectionParameters { get; }
|
||||
|
||||
protected T RunSubquery<T>(Func<T> subquery)
|
||||
{
|
||||
return DataAccessManual.Dal.MobileConnection.Run(DefaultConnectionParameters.IntezmenyAzonosito, DefaultConnectionParameters.TanevId, h =>
|
||||
{
|
||||
DefaultConnectionParameters.DalHandler = h;
|
||||
return subquery();
|
||||
}, DefaultConnectionParameters.FelhasznaloId);
|
||||
}
|
||||
|
||||
protected void RunSubquery(Action subquery)
|
||||
{
|
||||
DataAccessManual.Dal.MobileConnection.Run(DefaultConnectionParameters.IntezmenyAzonosito, DefaultConnectionParameters.TanevId, h =>
|
||||
{
|
||||
DefaultConnectionParameters.DalHandler = h;
|
||||
subquery();
|
||||
}, DefaultConnectionParameters.FelhasznaloId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Ora;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Ora
|
||||
{
|
||||
public class OraFacade : NaploFacade
|
||||
{
|
||||
public OraFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public List<OraFeljegyzesResponse> GetOraFeljegyzesek(OraFeljegyzesRequest request)
|
||||
=> RunSubquery(() => OraSubqueries.GetOraFeljegyzesek(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Naplo.Dao.V3.Ora;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Ora;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Ora
|
||||
{
|
||||
public class OraSubqueries
|
||||
{
|
||||
public static List<OraFeljegyzesResponse> GetOraFeljegyzesek(DefaultConnectionParameters dcp, OraFeljegyzesRequest request)
|
||||
{
|
||||
var result = new List<OraFeljegyzesResponse>();
|
||||
|
||||
var tanoraHelper = new TanoraHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId));
|
||||
if (!tanoraHelper.IsValidTanoraId(request.TanoraId))
|
||||
{
|
||||
throw new BlException(BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
var tanulokFeljegyzesek = tanoraHelper.GetTanuloFeljegyzesek(request.TanoraId).ToDaoList<FeljegyzesResponseDao>().GroupBy(f => f.TanuloId);
|
||||
|
||||
foreach (var tanuloFeljegyzesek in tanulokFeljegyzesek)
|
||||
{
|
||||
result.Add(new OraFeljegyzesResponse
|
||||
{
|
||||
TanuloId = tanuloFeljegyzesek.Key,
|
||||
FeljegyzesLista = tanuloFeljegyzesek.Select(f => new FeljegyzesResponse
|
||||
{
|
||||
Id = f.Id,
|
||||
Tipus = f.Tipus
|
||||
}).ToList()
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static HashSet<TanuloJelenletResponse> GetTanuloJelenlet(DefaultConnectionParameters dcp, TanuloJelenletRequest request)
|
||||
{
|
||||
return dcp.DalHandler.MulasztasDal()
|
||||
.GetTanuloJelenletDataSet(dcp.TanevId, request.TanoraId)
|
||||
.ToDaoList<MulasztasResponseDao>()
|
||||
.Select(m => new TanuloJelenletResponse
|
||||
{
|
||||
TanuloId = m.TanuloId,
|
||||
MulasztasTipus = m.Tipus ?? (int)MulasztasTipusEnum.jelenlet,
|
||||
Keses = m.Keses
|
||||
}).ToHashSet();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Orarend
|
||||
{
|
||||
public class OrarendFacade : NaploFacade
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public OrarendFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public OrarendFacade(MobileUser mobileUser, IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient) : base(mobileUser)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
public OrarendElemResponse GetOrarendElem(OrarendElemRequest request) => RunSubquery(() => OrarendSubqueries.GetOrarendElem(DefaultConnectionParameters, request));
|
||||
|
||||
public HashSet<OrarendElemResponse> GetOrarend(OrarendRequest request) => RunSubquery(() => OrarendSubqueries.GetOrarend(DefaultConnectionParameters, request));
|
||||
|
||||
public string OraNaplozas(OraNaplozasRequest request) => RunSubquery(() => OrarendSubqueries.OraNaplozas(DefaultConnectionParameters, request, _fileServiceHelper, _coreApiClient));
|
||||
|
||||
public string OraNaplozasTorles(OraNaplozasTorlesRequest request) => RunSubquery(() => OrarendSubqueries.OraNaplozasTorles(DefaultConnectionParameters, request));
|
||||
|
||||
public IEnumerable<TanuloJelenletResponse> GetTanuloJelenlet(TanuloJelenletRequest request) => RunSubquery(() => OrarendSubqueries.GetTanuloJelenlet(DefaultConnectionParameters, request));
|
||||
|
||||
public IEnumerable<HetirendListResponse> ListHetirend(HetirendListRequest request) => RunSubquery(() => OrarendSubqueries.ListHetirend(DefaultConnectionParameters, request));
|
||||
|
||||
public BejelentettSzamonkeresekResponse GetBejelentettSzamonkeres(int id) => RunSubquery(() => OrarendSubqueries.GetBejelentettSzamonkeres(DefaultConnectionParameters, id));
|
||||
|
||||
public void DeleteBejelentettSzamonkeres(int id) => RunSubquery(() => OrarendSubqueries.DeleteBejelentettSzamonkeres(DefaultConnectionParameters, id));
|
||||
|
||||
public void PostSzamonkeres(SzamonkeresRequest request) => RunSubquery(() => OrarendSubqueries.PostSzamonkeres(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,508 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.BusinessLogic.Logic.Naplozas;
|
||||
using Kreta.BusinessLogic.Logic.Naplozas.Validacio;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.DataAccessManual.ParameterClasses;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Enums.ManualEnums.SystemSettings;
|
||||
using Kreta.Framework.Entities;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Csatolmany;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Felmentes;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Logic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Ora;
|
||||
using Kreta.Naplo.Dao.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Csatolmany;
|
||||
using Kreta.Naplo.Domain.V3.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V3.Felmentes;
|
||||
using Kreta.Naplo.Domain.V3.Logic;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.Domain.V3.UniqueIdentifier;
|
||||
using Kreta.Naplo.Domain.V3.Utility;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Orarend
|
||||
{
|
||||
internal static class OrarendSubqueries
|
||||
{
|
||||
internal static HashSet<OrarendElemResponse> GetOrarend(DefaultConnectionParameters dcp, OrarendRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
return ListOrarendElemek(dcp, request.DatumTol, request.DatumIg);
|
||||
}
|
||||
|
||||
internal static OrarendElemResponse GetOrarendElem(DefaultConnectionParameters dcp, OrarendElemRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
return ListOrarendElemek(dcp, request.OrarendElemUid.Datum, request.OrarendElemUid.Datum.AddDays(1), request.OrarendElemUid.Id, request.OrarendElemUid.Tipus)
|
||||
.FirstOrDefault() ?? throw new BlException(ErrorResource.AzOratIdokozbenToroltekKerjukFrissitsen, BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
internal static HashSet<OrarendElemResponse> ListOrarendElemek(DefaultConnectionParameters dcp, DateTime datumTol, DateTime datumIg, int? orarendElemId = null, CalendarOraTypeEnum? orarendElemTipus = null)
|
||||
{
|
||||
var orarendElemek = new HashSet<OrarendElemResponse>();
|
||||
var eventList = new OrarendHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.GetOrarendElemekMobilNaplo(datumTol, datumIg, dcp.FelhasznaloId);
|
||||
|
||||
if (orarendElemId != null)
|
||||
{
|
||||
if (orarendElemTipus == CalendarOraTypeEnum.OrarendiOra)
|
||||
{
|
||||
eventList = new List<OrarendCO.ExtendedEvent>()
|
||||
{
|
||||
eventList.FirstOrDefault(e => (e.oraType == CalendarOraTypeEnum.OrarendiOra || e.oraType == CalendarOraTypeEnum.TanitasiOra) && e.OrarendiOraId == orarendElemId && e.datum == datumTol)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
eventList = new List<OrarendCO.ExtendedEvent>()
|
||||
{
|
||||
eventList.FirstOrDefault(e => e.oraType == orarendElemTipus && e.id == orarendElemId && e.datum == datumTol)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (eventList.Any() && eventList.First() == null)
|
||||
{
|
||||
return orarendElemek;
|
||||
}
|
||||
|
||||
var oraFiles = CsatolmanySubqueries.ListCsatolmanyok(dcp, new CsatolmanyListRequest
|
||||
{
|
||||
DatumTol = datumTol,
|
||||
DatumIg = datumIg,
|
||||
OrarendElemek = eventList.Where(o => o.oraType != CalendarOraTypeEnum.TanevRendjeEsemeny).Select(o => new OrarendElemSimplified(o.id, o.OrarendiOraId ?? 0, o.OrarendiOraGroupId ?? 0, o.oraType, o.datum.Value))
|
||||
});
|
||||
|
||||
var kezdoIdopont = new SystemSettingsHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetSystemSettingValue<TimeSpan>(RendszerBeallitasTipusEnum.Az_elektronikus_naplo_megjelenesenek_kezdoidopontja);
|
||||
var lezartOsztalyokEsBontottCsoportjaik = new NaplozarasLogic(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetLezartOsztalyokEsBontottCsoportjaik();
|
||||
var naplozarasDatum = new OrarendHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetNaplozarasDate(null);
|
||||
|
||||
foreach (var tanarOra in eventList)
|
||||
{
|
||||
if (tanarOra.oraType == CalendarOraTypeEnum.TanevRendjeEsemeny)
|
||||
{
|
||||
orarendElemek.Add(
|
||||
new OrarendElemResponse
|
||||
{
|
||||
Uid = new OrarendElemUid(tanarOra.id, tanarOra.oraType, tanarOra.start.Value),
|
||||
Nev = tanarOra.title,
|
||||
Kezdete = tanarOra.start.Value.Add(kezdoIdopont).AddMinutes(-1),
|
||||
Vege = tanarOra.end.Value.Add(kezdoIdopont).AddMinutes(-1),
|
||||
Allapot = (int)TanoraAllapotaEnum.TanevRendjeEsemeny,
|
||||
Csatolmanyok = new List<CsatolmanyResponse>()
|
||||
});
|
||||
}
|
||||
else if (!tanarOra.allDay)
|
||||
{
|
||||
var oraResponse = new OrarendElemResponse
|
||||
{
|
||||
Uid = new OrarendElemUid(tanarOra.id, tanarOra.oraType, tanarOra.datum.Value),
|
||||
Nev = tanarOra.TantargyTeljesNev,
|
||||
HasOrarendiOra = tanarOra.OrarendiOraGroupId.HasValue,
|
||||
OsztalyCsoportId = tanarOra.TanevRendOsztalyCsoportId,
|
||||
OsztalyCsoportNev = tanarOra.OsztalyCsoport,
|
||||
TantargyId = tanarOra.TantargyId,
|
||||
TantargyNev = tanarOra.TantargyTeljesNev,
|
||||
Terem = tanarOra.Terem,
|
||||
Kezdete = tanarOra.start.Value,
|
||||
Vege = tanarOra.end.Value,
|
||||
Tema = tanarOra.Tema,
|
||||
Oraszam = tanarOra.hanyadikora,
|
||||
Allapot = (int)tanarOra.OraAllapota,
|
||||
TanarUid = tanarOra.TanarIdpUniqueId,
|
||||
TanarNev = tanarOra.TanarNev,
|
||||
HelyettesitoTanarUid = tanarOra.HelyettesitoTanarIdpUniqueId,
|
||||
HelyettesitoTanarNev = tanarOra.HelyettesNev,
|
||||
EvesOraSorszam = tanarOra.EvesOraSorszam,
|
||||
HaziFeladatId = tanarOra.HaziFeladatId,
|
||||
BejelentettSzamonkeresId = tanarOra.BejelentettSzamonkeresId,
|
||||
BejelentettSzamonkeresMod = tanarOra.BejelentettSzamonkeresMod,
|
||||
BejelentettSzamonkeresTema = tanarOra.BejelentettSzamonkeresTema,
|
||||
ElozoNaplozottOraDatum = tanarOra.ElozoNaplozottOraDatum,
|
||||
ElozoNaplozottOraTema = tanarOra.ElozoNaplozottOraTema,
|
||||
Naplozart = lezartOsztalyokEsBontottCsoportjaik.Contains(tanarOra.TanevRendOsztalyCsoportId) || tanarOra.datum.Value <= naplozarasDatum
|
||||
};
|
||||
|
||||
oraResponse.Csatolmanyok = oraFiles[oraResponse.Uid];
|
||||
if (!tanarOra.CsengetesiRendId.HasValue)
|
||||
{
|
||||
oraResponse.Oraszam = null;
|
||||
}
|
||||
|
||||
orarendElemek.Add(oraResponse);
|
||||
}
|
||||
}
|
||||
|
||||
return orarendElemek;
|
||||
}
|
||||
|
||||
public static string OraNaplozas(DefaultConnectionParameters dcp, OraNaplozasRequest request, IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
if (request.IsElmaradt)
|
||||
{
|
||||
if (new SystemSettingsHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Elmaradt_tanitasi_ora_rogzitesenek_tiltasa))
|
||||
{
|
||||
throw new BlException("Az órát az intézményi beállítások alapján nem lehet elmaradtra naplózni", BlExceptionType.FunkcioKikapcsolva);
|
||||
}
|
||||
}
|
||||
|
||||
var naploValidacioParameters = new NaploValidacioParameters(from: request.OrarendElemUid.Datum, to: request.OrarendElemUid.Datum.AddDays(1),
|
||||
new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), felhasznaloSzerepkor: null);
|
||||
var naploValidator = new NaploValidacio(naploValidacioParameters);
|
||||
|
||||
try
|
||||
{
|
||||
var logicCo = new NaplozasMobilCo();
|
||||
request.ConvertTo(logicCo);
|
||||
var tanitasiOraId = new NaplozasLogic(naploValidator, logicCo).SaveNaplozas(fileServiceHelper, coreApiClient).TanitasiOraId;
|
||||
|
||||
return UidLogic.Concat(tanitasiOraId, CalendarOraTypeEnum.TanitasiOra, request.OrarendElemUid.Datum.ToIso8601Utc().ToIso8601UtcString());
|
||||
}
|
||||
catch (ValidationException exception)
|
||||
{
|
||||
throw new BlException(exception.Message, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
catch (BlException exception)
|
||||
{
|
||||
throw new BlException(exception.Message, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
catch (EntityNotFoundException)
|
||||
{
|
||||
throw new BlException(ErrorResource.NaplozasSikertelenAzOraMarNemLetezikAKivalasztottNapon, BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new BlException(ErrorResource.SikertelenMentes, exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static string OraNaplozasTorles(DefaultConnectionParameters dcp, OraNaplozasTorlesRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
try
|
||||
{
|
||||
var naploValidacioParameters = new NaploValidacioParameters(from: request.OrarendElemUid.Datum, to: request.OrarendElemUid.Datum.AddDays(1),
|
||||
new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), felhasznaloSzerepkor: null);
|
||||
var naploValidator = new NaploValidacio(naploValidacioParameters);
|
||||
var logicCo = new NaplozasMobilCo();
|
||||
request.ConvertTo(logicCo);
|
||||
new NaplozasLogic(naploValidator, logicCo).NaplozasValidacio();
|
||||
|
||||
var tanoraHelper = new TanoraHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler));
|
||||
var tanitasiOra = dcp.DalHandler.TanitasiOra().Get(request.OrarendElemUid.Id);
|
||||
|
||||
if (tanitasiOra.TanarId != dcp.FelhasznaloId && tanitasiOra.HelyettesitoTanarId != dcp.FelhasznaloId)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
|
||||
tanoraHelper.NaplozasTorlese(request.OrarendElemUid.Id, true);
|
||||
var orarendiOra = tanoraHelper.GetOrarendiOraIdForTanitasiOra(tanitasiOra);
|
||||
if (orarendiOra != null)
|
||||
{
|
||||
return UidLogic.Concat(orarendiOra.ID, CalendarOraTypeEnum.OrarendiOra, request.OrarendElemUid.Datum.ToIso8601Utc().ToIso8601UtcString());
|
||||
}
|
||||
else
|
||||
{
|
||||
return UidLogic.Concat(-1, CalendarOraTypeEnum.OrarendiOra, request.OrarendElemUid.Datum.ToIso8601Utc().ToIso8601UtcString());
|
||||
}
|
||||
}
|
||||
catch (ValidationException exception)
|
||||
{
|
||||
throw new BlException(exception.Message, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
catch (BlException exception) when (exception.ExceptionType is BlExceptionType.ModelValidacio)
|
||||
{
|
||||
throw new BlException(exception.Message, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new BlException(ErrorResource.SikertelenTorles, exception);
|
||||
}
|
||||
}
|
||||
|
||||
internal static IEnumerable<TanuloJelenletResponse> GetTanuloJelenlet(DefaultConnectionParameters dcp, TanuloJelenletRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
var connection = new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId);
|
||||
|
||||
(var oraKezdete, var oraVege, var osztalyCsoportId, var tantargyId) = GetOraAlapadatok(dcp, request);
|
||||
|
||||
var parhuzamosOranNaplozott = new MulasztasHelper(connection).ListParhuzamosOranNaplozottMulasztasTanuloId(oraKezdete, oraVege, request.OrarendElemUid.Id);
|
||||
var mulasztasok = OraSubqueries.GetTanuloJelenlet(dcp, new Domain.V3.Ora.TanuloJelenletRequest(request.OrarendElemUid.Id));
|
||||
|
||||
var osztalyCsoportTanuloi = FelmentesSubqueries.GetFelmentesekWithTanuloAdatok(dcp, new FelmentesRequest { OsztalyCsoportId = osztalyCsoportId, Datum = oraKezdete, TantargyId = tantargyId });
|
||||
var isMulasztasokParhuzamosOraKezelesUtkozesVizsgalatEnabled = new SystemSettingsHelper(connection).GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.A_foglalkozasok_mulasztasi_adatai_megadasanal_a_parhuzamos_orakkal_valo_utkozes_vizsgalata);
|
||||
var igazolasLista = dcp.DalHandler.IgazolasDal().GetIgazolasokByDate(request.OrarendElemUid.Datum, dcp.TanevId, dcp.IntezmenyId).ToDaoList<JelenletIgazolasResponseDao>().Select(x => x.TanuloId);
|
||||
var magantanuloMulasztasSystemSetting = (SystemSettingMagantanuloMulasztas)new SystemSettingsHelper(connection).GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Magantanulo_oralatogatas_aloli_mentessegenek_kezelese);
|
||||
var isNemGyakorlatiTantargyonResztKellVennie = magantanuloMulasztasSystemSetting != SystemSettingMagantanuloMulasztas.CsakGyakorlaton && !new TantargyHelper(connection).IsGyakorlatiTantargy(tantargyId);
|
||||
var alapertelmezettJelenlet = new SystemSettingsHelper(connection).GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.alapertelmezett_statusz_naplozasok_eseteben);
|
||||
var elozoOranHianyzoAjanlasa = new FelhasznaloHelper(connection).GetProfilTipus(dcp.FelhasznaloId, "HianyzokAutoKitoltes");
|
||||
var elozoOranhianyzottTanuloIdList = elozoOranHianyzoAjanlasa ? dcp.DalHandler.Tanulo().GetElozoOranHianyzottTanulok(oraKezdete, osztalyCsoportId) : new List<int>();
|
||||
var tantargybolElozoOranHianyzottTanuloIdList = dcp.DalHandler.OrarendiOra().GetElozoOranHianyzottTanulo(tantargyId, osztalyCsoportId, oraKezdete, dcp.TanevId, dcp.IntezmenyId);
|
||||
|
||||
return CheckTanuloJelenlet(osztalyCsoportTanuloi, mulasztasok, igazolasLista, parhuzamosOranNaplozott, elozoOranhianyzottTanuloIdList, tantargybolElozoOranHianyzottTanuloIdList, tantargyId, isMulasztasokParhuzamosOraKezelesUtkozesVizsgalatEnabled, magantanuloMulasztasSystemSetting, isNemGyakorlatiTantargyonResztKellVennie, alapertelmezettJelenlet);
|
||||
}
|
||||
|
||||
internal static IEnumerable<HetirendListResponse> ListHetirend(DefaultConnectionParameters dcp, HetirendListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
return dcp.DalHandler.NaptariHet().GetNaptariHetList(dcp.TanevId, new NaptariHetAndOrarendOverlapFilter
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = request.OrarendElemKezdoNapDatuma,
|
||||
OrarendElemVegNapDatuma = request.OrarendElemVegNapDatuma
|
||||
})
|
||||
.ToDaoList<NaptariHetResponseDao>()
|
||||
.Select(x => new HetirendListResponse
|
||||
{
|
||||
Id = x.Id,
|
||||
HetSorszama = x.HetSorszama,
|
||||
KezdoNapDatuma = x.KezdoNapDatuma,
|
||||
VegNapDatuma = x.VegNapDatuma,
|
||||
Hetirend = x.HetirendNev ?? ((int)HetiRendTipusEnum.MindegyikHet).GetDisplayName<HetiRendTipusEnum>(dcp.TanevId)
|
||||
});
|
||||
}
|
||||
|
||||
internal static BejelentettSzamonkeresekResponse GetBejelentettSzamonkeres(DefaultConnectionParameters dcp, int id)
|
||||
{
|
||||
var szamonkeres = dcp.DalHandler.SzamonkeresElorejelzes().GetBejelentettSzamonkeresekGrid(
|
||||
dcp.IntezmenyId,
|
||||
dcp.TanevId,
|
||||
new SzamonkeresElorejelzesSearchPco
|
||||
{
|
||||
SzamonkeresIds = new List<int>() { id },
|
||||
}, null).ToDaoList<BejelentettSzamonkeresResponseDao>().FirstOrDefault();
|
||||
|
||||
if (szamonkeres == null)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
return new BejelentettSzamonkeresekResponse
|
||||
{
|
||||
Id = szamonkeres.Id,
|
||||
Tema = szamonkeres.Tema,
|
||||
ErtekelesMod = szamonkeres.ErtekelesMod,
|
||||
OraSzam = szamonkeres.OraSzam,
|
||||
TantargyId = szamonkeres.TantargyId,
|
||||
TantargyNev = szamonkeres.TantargyNev,
|
||||
TanarUid = szamonkeres.TanarUid,
|
||||
TanarNev = szamonkeres.TanarNev
|
||||
};
|
||||
}
|
||||
|
||||
internal static void DeleteBejelentettSzamonkeres(DefaultConnectionParameters dcp, int id)
|
||||
{
|
||||
var szamonkeres = dcp.DalHandler.SzamonkeresElorejelzes().Get(id);
|
||||
if (szamonkeres.Torolt) throw new BlException(ErrorResource.ASzamonkeresIdokozbenMarTorolveLett, BlExceptionType.NemLetezoEntitas);
|
||||
if (szamonkeres.RogzitoId != dcp.FelhasznaloId) throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
dcp.DalHandler.SzamonkeresElorejelzes().Delete(id);
|
||||
}
|
||||
|
||||
internal static void PostSzamonkeres(DefaultConnectionParameters dcp, SzamonkeresRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var connection = new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId);
|
||||
var systemSettingsHelper = new SystemSettingsHelper(connection);
|
||||
var limitFigyelmeztetesiTiltasiBeallitas = systemSettingsHelper.GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Limit_Figyelmeztetesi_Tiltasi_Beallitas);
|
||||
var ertekelesModokBeallitasaNapiLimithez = systemSettingsHelper.GetSystemSettingValue<List<int>>(RendszerBeallitasTipusEnum.Ertekeles_Modok_Beallitasa_Napi_Limithez);
|
||||
var napiSzamonkeresiLimit = systemSettingsHelper.GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Napi_Szamonkeresi_Limit);
|
||||
var orarendiOra = dcp.DalHandler.OrarendiOra().Get(request.OrarendElemUid.Id);
|
||||
var orarendiOraGroupId = orarendiOra.OrarendiOraGroupId.Value;
|
||||
var szamonkeresElorejelzesCO = new SzamonkeresElorejelzesCO
|
||||
{
|
||||
OrarendiOraGroupId = orarendiOraGroupId,
|
||||
Datum = request.OrarendElemUid.Datum,
|
||||
Megnevezes = request.Tema,
|
||||
SzamonkeresModId = request.ErtekelesMod
|
||||
};
|
||||
|
||||
if (dcp.DalHandler.SzamonkeresElorejelzes().HasSzamonkeresForOrarendiOraGroupId(dcp.TanevId, orarendiOraGroupId))
|
||||
{
|
||||
throw new BlException(OrarendResource.SzamonkeresMarRogzitveAzAdottOrahoz, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
var szamonkeresElorejelzesHelper = new SzamonkeresElorejelzesHelper(connection);
|
||||
var tanulokSzamonkeresElorejelzesei = szamonkeresElorejelzesHelper.GetTanulokSzamonkeresElorejelzesei(new SzamonkeresElorejelzesSearchCO
|
||||
{
|
||||
OraGroupId = orarendiOraGroupId,
|
||||
Datum = request.OrarendElemUid.Datum,
|
||||
NapiSzamonkeresLimit = napiSzamonkeresiLimit,
|
||||
OsztalyCsoportId = orarendiOra.OsztalyCsoportId,
|
||||
ErtekelesModokLimithez = ertekelesModokBeallitasaNapiLimithez
|
||||
});
|
||||
if (ertekelesModokBeallitasaNapiLimithez.Contains(request.ErtekelesMod) && napiSzamonkeresiLimit > 0 && ertekelesModokBeallitasaNapiLimithez.Count > 0 && limitFigyelmeztetesiTiltasiBeallitas < 3)
|
||||
{
|
||||
switch (limitFigyelmeztetesiTiltasiBeallitas)
|
||||
{
|
||||
case 1:
|
||||
if (tanulokSzamonkeresElorejelzesei != null && tanulokSzamonkeresElorejelzesei.Tables.Count > 0 && tanulokSzamonkeresElorejelzesei.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
throw new BlException(string.Format(OrarendResource.AMegengedettMennyiseguSzamonkeresMarRogzitesreKerültAzAdottNapra, napiSzamonkeresiLimit), BlExceptionType.ModelValidacio);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (tanulokSzamonkeresElorejelzesei != null && tanulokSzamonkeresElorejelzesei.Tables.Count > 0 && tanulokSzamonkeresElorejelzesei.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
if (request.ForceSave)
|
||||
{
|
||||
szamonkeresElorejelzesHelper.SaveSzamonkeresElorejelzes(szamonkeresElorejelzesCO, dcp.FelhasznaloId, dcp.IntezmenyId);
|
||||
return;
|
||||
}
|
||||
throw new BlException(string.Format(OrarendResource.AMegengedettMennyiseguSzamonkeresMarRogzitesreKerültAzAdottNapraBiztosanRogzitiIgyIsASzamonkerest, napiSzamonkeresiLimit), HttpStatusCode.Conflict);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
szamonkeresElorejelzesHelper.SaveSzamonkeresElorejelzes(szamonkeresElorejelzesCO, dcp.FelhasznaloId, dcp.IntezmenyId);
|
||||
}
|
||||
|
||||
internal static IEnumerable<FelmentesResponse> GetFelmentes(DefaultConnectionParameters dcp, int tantargyId)
|
||||
{
|
||||
return dcp.DalHandler.Tanulo().GetTanulokFelmentesei(new List<int>(), dcp.TanevId, isFromSzervezet: true, tantargyId: tantargyId).ToDaoList<FelmentesResponseDao>()
|
||||
.Select(f => new FelmentesResponse
|
||||
{
|
||||
TanuloId = f.TanuloId,
|
||||
TantargyNev = f.TantargyNev,
|
||||
ErtekelesAloliFelmentes = f.ErtekelesMentesites,
|
||||
TanoraLatogatasaAloliFelmentes = f.OraMentesites,
|
||||
SzovegesenErtekelheto = f.SzovegesenErtekelheto,
|
||||
FelmentesOka = f.FelmentesOka,
|
||||
FelmentesKezdete = f.FelmentesKezdete,
|
||||
FelmentesVege = f.FelmentesVege
|
||||
});
|
||||
}
|
||||
|
||||
private static (DateTime, DateTime, int, int) GetOraAlapadatok(DefaultConnectionParameters dcp, TanuloJelenletRequest request)
|
||||
{
|
||||
var oraKezdete = request.OrarendElemUid.Datum;
|
||||
var oraVege = request.OrarendElemUid.Datum;
|
||||
var osztalyCsoportId = 0;
|
||||
var tantargyId = 0;
|
||||
|
||||
if (request.OrarendElemUid.Tipus == CalendarOraTypeEnum.OrarendiOra)
|
||||
{
|
||||
var orarendiOra = dcp.DalHandler.OrarendiOra().Get(request.OrarendElemUid.Id);
|
||||
oraKezdete = oraKezdete.AddHours(orarendiOra.OraKezdete.Value.Hour).AddMinutes(orarendiOra.OraKezdete.Value.Minute);
|
||||
oraVege = oraVege.AddHours(orarendiOra.OraVege.Value.Hour).AddMinutes(orarendiOra.OraVege.Value.Minute);
|
||||
osztalyCsoportId = orarendiOra.OsztalyCsoportId;
|
||||
tantargyId = orarendiOra.TantargyId;
|
||||
}
|
||||
|
||||
else if (request.OrarendElemUid.Tipus == CalendarOraTypeEnum.TanitasiOra)
|
||||
{
|
||||
var tanitasiOra = dcp.DalHandler.TanitasiOra().Get(request.OrarendElemUid.Id);
|
||||
oraKezdete = tanitasiOra.OraKezdete;
|
||||
oraVege = tanitasiOra.OraVege;
|
||||
osztalyCsoportId = tanitasiOra.OsztalyCsoportId;
|
||||
tantargyId = tanitasiOra.TantargyId;
|
||||
}
|
||||
|
||||
return (oraKezdete, oraVege, osztalyCsoportId, tantargyId);
|
||||
}
|
||||
|
||||
private static IEnumerable<TanuloJelenletResponse> CheckTanuloJelenlet(IEnumerable<(int tanuloId, int? tantargyId, TanuloMentessegResponse mentessegResponse)> osztalyCsoportTanuloi,
|
||||
HashSet<Domain.V3.Ora.TanuloJelenletResponse> mulasztasok,
|
||||
IEnumerable<int> igazolasLista,
|
||||
List<int> parhuzamosOranNaplozott,
|
||||
List<int> elozoOranHianyzottTanuloIdList,
|
||||
List<int> tantargybolElozoOranHianyzottTanuloIdList,
|
||||
int tantargyId,
|
||||
bool isMulasztasokParhuzamosOraKezelesUtkozesVizsgalatEnabled,
|
||||
SystemSettingMagantanuloMulasztas magantanuloMulasztasSystemSetting,
|
||||
bool isNemGyakorlatiTantargyonResztKellVennie,
|
||||
int alapertelmezettJelenlet)
|
||||
{
|
||||
var response = new List<TanuloJelenletResponse>();
|
||||
foreach (var tanulo in osztalyCsoportTanuloi)
|
||||
{
|
||||
var isEnabledHianyzas = true;
|
||||
var allapot = alapertelmezettJelenlet;
|
||||
var figyelmeztetoSzovegList = new List<string>();
|
||||
|
||||
if (elozoOranHianyzottTanuloIdList.Contains(tanulo.tanuloId))
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.hianyzas;
|
||||
}
|
||||
if (tantargybolElozoOranHianyzottTanuloIdList.Contains(tanulo.tanuloId))
|
||||
{
|
||||
figyelmeztetoSzovegList.Add(NaploApiResource.ElozoOranHianyzott);
|
||||
}
|
||||
if (igazolasLista.Contains(tanulo.tanuloId))
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.hianyzas;
|
||||
figyelmeztetoSzovegList.Add(OrarendResource.ATanulonakVanRogzitveIgazolasa);
|
||||
}
|
||||
if (isMulasztasokParhuzamosOraKezelesUtkozesVizsgalatEnabled && parhuzamosOranNaplozott.Contains(tanulo.tanuloId))
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.ures;
|
||||
isEnabledHianyzas = false;
|
||||
figyelmeztetoSzovegList.Add(OrarendResource.ParhuzamosOranMarNaploztak);
|
||||
}
|
||||
if (tanulo.mentessegResponse.IsMaganTanulo && magantanuloMulasztasSystemSetting != SystemSettingMagantanuloMulasztas.KotelezoMegjelenie && isNemGyakorlatiTantargyonResztKellVennie)
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.ures;
|
||||
isEnabledHianyzas = false;
|
||||
figyelmeztetoSzovegList.Add(OrarendResource.Magantanulo);
|
||||
}
|
||||
if (tanulo.mentessegResponse.TanoraLatogatasaAloliFelmentes && tanulo.tantargyId == tantargyId)
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.ures;
|
||||
isEnabledHianyzas = false;
|
||||
figyelmeztetoSzovegList.Add(tanulo.mentessegResponse.FelmentesOka);
|
||||
}
|
||||
if (tanulo.mentessegResponse.ErtekelesAloliFelmentes && tanulo.tantargyId == tantargyId)
|
||||
{
|
||||
figyelmeztetoSzovegList.Add(tanulo.mentessegResponse.FelmentesOka);
|
||||
}
|
||||
if (tanulo.mentessegResponse.IsSzakmaiGyakorlatonLevo)
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.ures;
|
||||
}
|
||||
if (tanulo.mentessegResponse.IsJogviszonySzunetelteto)
|
||||
{
|
||||
allapot = (int)MulasztasTipusEnum.ures;
|
||||
isEnabledHianyzas = false;
|
||||
}
|
||||
|
||||
var mulasztas = mulasztasok.Where(x => x.TanuloId == tanulo.tanuloId).FirstOrDefault();
|
||||
|
||||
if (mulasztas != null)
|
||||
{
|
||||
allapot = mulasztas.MulasztasTipus;
|
||||
}
|
||||
|
||||
response.Add(new TanuloJelenletResponse(tanulo.tanuloId, allapot, mulasztas?.Keses, string.Join(" | ", figyelmeztetoSzovegList), isEnabledHianyzas));
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportFacade : NaploFacade
|
||||
{
|
||||
public OsztalyCsoportFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public void CreateOsztalyCsoportErtekeles(List<OsztalyCsoportErtekelesRequest> request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.CreateOsztalyCsoportErtekeles(DefaultConnectionParameters, request));
|
||||
|
||||
public HashSet<OsztalyCsoportErtekelesekResponse> GetOsztalyCsoportErtekelesek(OsztalyCsoportErtekelesekRequest request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetOsztalyCsoportErtekelesek(DefaultConnectionParameters, request));
|
||||
public void TanuloErtekelesMentes(int id, TanuloErtekelesMentesRequest request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.TanuloErtekelesMentes(DefaultConnectionParameters, id, request));
|
||||
|
||||
public void DeleteOsztalyCsoportErtekeles(int id)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.DeleteOsztalyCsoportErtekeles(DefaultConnectionParameters, id));
|
||||
|
||||
public IEnumerable<OsztalyCsoportTanuloResponse> GetOsztalyCsoportTanuloi(OsztalyCsoportTanuloRequest request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetOsztalyCsoportTanuloi(DefaultConnectionParameters, request));
|
||||
|
||||
public OsztalyCsoportTanuloAdatokResponse GetOsztalyCsoportTanuloAdatok(int id)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetOsztalyCsoportTanuloAdatok(DefaultConnectionParameters, id));
|
||||
|
||||
public IEnumerable<MondatbankResponse> GetMondatbank(MondatbankRequest request) => RunSubquery(()
|
||||
=> OsztalyCsoportSubqueries.GetMondatbank(DefaultConnectionParameters, request));
|
||||
|
||||
public IEnumerable<OsztalyokCsoportokResponse> GetOsztalyokCsoportok()
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetOsztalyokCsoportok(DefaultConnectionParameters));
|
||||
|
||||
public IEnumerable<TanuloErtekelesekResponse> GetTanuloErtekelesei(TanuloErtekelesekRequest request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetTanuloErtekelesei(DefaultConnectionParameters, request));
|
||||
|
||||
public IEnumerable<BejelentettSzamonkeresekResponse> GetBejelentettSzamonkeresek(BejelentettSzamonkeresekRequest request)
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.GetBejelentettSzamonkeresek(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,410 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V3.Co.Ertekeles;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Logic.TanuloErtekeles;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
using Kreta.DataAccessManual.ParameterClasses;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Framework.Entities;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Logic;
|
||||
using Kreta.Naplo.Dao.V3.Orarend;
|
||||
using Kreta.Naplo.Dao.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.Dao.V3.Tanulo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.OsztalyCsoport
|
||||
{
|
||||
public static class OsztalyCsoportSubqueries
|
||||
{
|
||||
internal static void CreateOsztalyCsoportErtekeles(DefaultConnectionParameters dcp, List<OsztalyCsoportErtekelesRequest> request)
|
||||
{
|
||||
if (request.Any(r => !r.TanuloLista.Any()))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.NincsKitoltveEgyetlenErtekelesSem, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
if (IsRequestContainsDuplicatedItem(request))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.ErtekelesDuplikalt, BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
|
||||
foreach ((var datum, var osztalyCsoportId) in request.Select(x => (x.Datum, x.OsztalyCsoportId)).Distinct())
|
||||
{
|
||||
if (!new NaplozarasLogic(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.IsErtekelhetZarastolFuggetlenul(datum, osztalyCsoportId))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.ErtekelesNemAdhatoNaplozarasMiatt, BlExceptionType.NaploZaras);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var osztalyCsoportErtekeles in request)
|
||||
{
|
||||
var tanuloListaCo = osztalyCsoportErtekeles.TanuloLista.Select(x => new TanuloForOsztalyCsoportErtekelesRequestCo
|
||||
{
|
||||
Ertekeles = new ErtekelesRequestCo
|
||||
{
|
||||
OsztalyzatTipus = x.Ertekeles.OsztalyzatTipus.Uid.Id,
|
||||
Szazalek = x.Ertekeles.Szazalek,
|
||||
Szoveg = x.Ertekeles.Szoveg
|
||||
},
|
||||
TanuloId = x.TanuloId
|
||||
}).ToList();
|
||||
|
||||
var co = new OsztalyCsoportErtekelesRequestCo
|
||||
{
|
||||
Datum = osztalyCsoportErtekeles.Datum.Date,
|
||||
Mod = osztalyCsoportErtekeles.Mod.Uid.Id,
|
||||
Tema = osztalyCsoportErtekeles.Tema,
|
||||
OsztalyCsoportId = osztalyCsoportErtekeles.OsztalyCsoportId,
|
||||
TantargyId = osztalyCsoportErtekeles.TantargyId,
|
||||
TanuloLista = tanuloListaCo
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
new TanuloErtekelesHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.SaveTanuloErtekelesListMobil(dcp.FelhasznaloId, co);
|
||||
}
|
||||
catch (BlException exception)
|
||||
{
|
||||
throw new BlException(exception.Message, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
catch (EntityNotFoundException)
|
||||
{
|
||||
throw new BlException(ErrorResource.AzElemNemTalalhatoVagyToroltek, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static IEnumerable<OsztalyCsoportTanuloResponse> GetOsztalyCsoportTanuloi(DefaultConnectionParameters dcp, OsztalyCsoportTanuloRequest request)
|
||||
{
|
||||
return dcp.DalHandler.TanuloCsoport().OsztalyTanuloi(dcp.TanevId, new List<int>() { request.OsztalyCsoportId }, datum: request.Datum ?? DateTime.Now)
|
||||
.ToDaoList<OsztalyCsoportTanuloResponseDao>()
|
||||
.Select(x => new OsztalyCsoportTanuloResponse { TanuloId = x.Id, TanuloNev = x.Nev, TanuloSzuletesiDatum = x.SzuletesiDatum, TanuloAnyjaNeve = x.AnyjaNeve });
|
||||
}
|
||||
|
||||
private static bool IsRequestContainsDuplicatedItem(List<OsztalyCsoportErtekelesRequest> request)
|
||||
{
|
||||
var requestUniqueItems = new HashSet<(DateTime datum, int tantargyId, string tema, int tanuloErtekelesHashCode)>();
|
||||
|
||||
foreach (var item in request)
|
||||
{
|
||||
var tanuloErtekelesHashCode = item.TanuloLista.Select(x => $"{x.TanuloId} + {x.Ertekeles.OsztalyzatTipus} + {x.Ertekeles.Szazalek} + {x.Ertekeles.Szoveg}")
|
||||
.Aggregate((a, b) => a + b).GetHashCode();
|
||||
|
||||
if (!requestUniqueItems.Add((item.Datum, item.TantargyId, item.Tema, tanuloErtekelesHashCode)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static HashSet<OsztalyCsoportErtekelesekResponse> GetOsztalyCsoportErtekelesek(DefaultConnectionParameters dcp, OsztalyCsoportErtekelesekRequest request)
|
||||
{
|
||||
if (!new NaplozarasLogic(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.IsErtekelhetZarastolFuggetlenul(request.Datum, request.OsztalyCsoportId))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.ErtekelesNemAdhatoNaplozarasMiatt, BlExceptionType.NaploZaras);
|
||||
}
|
||||
|
||||
var response = new HashSet<OsztalyCsoportErtekelesekResponse>();
|
||||
|
||||
var osztalyCsoportTanuloi = GetOsztalyCsoportTanuloi(dcp, new OsztalyCsoportTanuloRequest { OsztalyCsoportId = request.OsztalyCsoportId });
|
||||
if (request.TanuloId.HasValue)
|
||||
{
|
||||
osztalyCsoportTanuloi = osztalyCsoportTanuloi.Where(t => t.TanuloId == request.TanuloId.Value);
|
||||
}
|
||||
var ertekelesekDaoList = dcp.DalHandler.TanuloErtekelesDal().GetErtekelesekDataSet(request.TantargyId, request.OsztalyCsoportId, request.TanuloId)
|
||||
.ToDaoList<TanuloErtekelesekResponseDao>();
|
||||
var ertekelesek = FilterErtekelesek(dcp.TanevId, ertekelesekDaoList, ErtekelesLekeresTipusEnum.NemBizonyitvanyErtekelesTipus);
|
||||
var mentessegekDaoList = dcp.DalHandler.Tanulo().GetMentessegDataSet(request.TantargyId, request.TanuloId, request.Datum).ToDaoList<TanuloMentessegResponseDao>();
|
||||
|
||||
if (ertekelesek.Any())
|
||||
{
|
||||
var tanuloOrderedGroupedErtekelesek = ertekelesek.GroupBy(e => e.TanuloId);
|
||||
var tanuloIds = ertekelesek.Select(e => e.TanuloId).Distinct().ToList();
|
||||
var tantargyiAtlagokDaoList = dcp.DalHandler.TanuloErtekelesDal().GetTantargyiAtlagListDataSet(dcp.TanevId, new List<int> { request.TantargyId }, tanuloIds)
|
||||
.ToDaoList<TantargyiAtlagResponseDao>();
|
||||
|
||||
foreach (var tanuloOrderedGroupedErtekeles in tanuloOrderedGroupedErtekelesek)
|
||||
{
|
||||
var legujabbErtekeles = tanuloOrderedGroupedErtekeles.First();
|
||||
var tanuloMentesseg = mentessegekDaoList.Where(tm => tm.TanuloId == legujabbErtekeles.TanuloId);
|
||||
response.Add(new OsztalyCsoportErtekelesekResponse
|
||||
{
|
||||
TanuloId = legujabbErtekeles.TanuloId,
|
||||
TanuloErtekelesFelmentes = new TanuloMentessegResponse
|
||||
{
|
||||
TanoraLatogatasaAloliFelmentes = tanuloMentesseg.FirstOrDefault()?.TanoraLatogatasaAloliFelmentes ?? false,
|
||||
ErtekelesAloliFelmentes = tanuloMentesseg.FirstOrDefault()?.ErtekelesAloliFelmentes ?? false,
|
||||
SzovegesenErtekelheto = tanuloMentesseg.FirstOrDefault()?.SzovegesenErtekelheto ?? false,
|
||||
FelmentesOka = tanuloMentesseg.FirstOrDefault()?.FelmentesOka
|
||||
},
|
||||
TanuloTantargyiAtlag = tantargyiAtlagokDaoList.Where(ta => ta.TanuloId == legujabbErtekeles.TanuloId).Select(ta => ta.SulyozottAtlag).FirstOrDefault(),
|
||||
TanuloErtekelesSzam = tanuloOrderedGroupedErtekeles.Count(),
|
||||
TanuloUtolsoErtekeles = new ErtekelesResponse
|
||||
{
|
||||
OsztalyzatTipus = legujabbErtekeles.ErtekelesOsztalyzatId,
|
||||
Szazalek = legujabbErtekeles.ErtekelesSzazalek,
|
||||
Szoveg = legujabbErtekeles.ErtekelesSzoveg,
|
||||
TipusId = legujabbErtekeles.TipusId
|
||||
},
|
||||
TanuloUtolsoErtekelesDatum = legujabbErtekeles.ErtekelesDatum
|
||||
});
|
||||
}
|
||||
}
|
||||
var tanulokErtekelesekNelkul = osztalyCsoportTanuloi.Where(t => !response.Select(g => g.TanuloId).Contains(t.TanuloId));
|
||||
foreach (var tanuloErtekelesNelkul in tanulokErtekelesekNelkul)
|
||||
{
|
||||
var tanuloMentesseg = mentessegekDaoList.Where(tm => tm.TanuloId == tanuloErtekelesNelkul.TanuloId);
|
||||
_ = response.Add(new OsztalyCsoportErtekelesekResponse
|
||||
{
|
||||
TanuloId = tanuloErtekelesNelkul.TanuloId,
|
||||
TanuloErtekelesFelmentes = new TanuloMentessegResponse
|
||||
{
|
||||
TanoraLatogatasaAloliFelmentes = tanuloMentesseg.FirstOrDefault()?.TanoraLatogatasaAloliFelmentes ?? false,
|
||||
ErtekelesAloliFelmentes = tanuloMentesseg.FirstOrDefault()?.ErtekelesAloliFelmentes ?? false,
|
||||
SzovegesenErtekelheto = tanuloMentesseg.FirstOrDefault()?.SzovegesenErtekelheto ?? false,
|
||||
FelmentesOka = tanuloMentesseg.FirstOrDefault()?.FelmentesOka
|
||||
},
|
||||
TanuloTantargyiAtlag = null,
|
||||
TanuloErtekelesSzam = 0,
|
||||
TanuloUtolsoErtekeles = null,
|
||||
TanuloUtolsoErtekelesDatum = null
|
||||
});
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private static List<TanuloErtekelesekResponseDao> FilterErtekelesek(int tanevId, List<TanuloErtekelesekResponseDao> ertekelesekDaoList, ErtekelesLekeresTipusEnum ertekelesTipus)
|
||||
{
|
||||
var egyszerAdhatoTanuloErtekelesTipusIdList = EnumExtensions.GetErtekelesTipusDictionaryItems(tanevId, true).Select(x => x.Id).ToList();
|
||||
switch (ertekelesTipus)
|
||||
{
|
||||
case ErtekelesLekeresTipusEnum.NemBizonyitvanyErtekelesTipus:
|
||||
return ertekelesekDaoList.Where(e => egyszerAdhatoTanuloErtekelesTipusIdList.All(b => b != e.TipusId)).ToList();
|
||||
case ErtekelesLekeresTipusEnum.BizonyitvanyErtekelesTipus:
|
||||
return ertekelesekDaoList.Where(e => egyszerAdhatoTanuloErtekelesTipusIdList.Any(b => b == e.TipusId)).ToList();
|
||||
case ErtekelesLekeresTipusEnum.MindenErtekelesTipus:
|
||||
return ertekelesekDaoList;
|
||||
default:
|
||||
return ertekelesekDaoList;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void TanuloErtekelesMentes(DefaultConnectionParameters dcp, int id, TanuloErtekelesMentesRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var connectionType = new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler);
|
||||
var tanuloErtekelesCo = new TanuloErtekelesHelper(connectionType).GetTanuloErtekelesCoById(id);
|
||||
|
||||
if (tanuloErtekelesCo != null && tanuloErtekelesCo.ErtekeloId == dcp.FelhasznaloId)
|
||||
{
|
||||
if ((tanuloErtekelesCo.OsztalyCsoportId.HasValue && new NaplozarasLogic(connectionType).GetLezartOsztalyokEsBontottCsoportjaik().Contains(tanuloErtekelesCo.OsztalyCsoportId.Value))
|
||||
|| tanuloErtekelesCo.Datum <= new OrarendHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetNaplozarasDate(null))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.AKivalasztottOsztalyNaplojaLezartNemModosithatErtekelestAzOsztalyTanuloinaknak, BlExceptionType.NaploZaras);
|
||||
}
|
||||
|
||||
var tanuloErtekelesCoList = new List<TanuloErtekelesCo>();
|
||||
tanuloErtekelesCo.Datum = request.ErtekelesDatum;
|
||||
tanuloErtekelesCo.ErtekelesModId = request.ErtekelesModId;
|
||||
tanuloErtekelesCo.ErtekelesTema = request.ErtekelesTema;
|
||||
tanuloErtekelesCo.ErtekelesOsztalyzatId = request.ErtekelesOsztalyzatId;
|
||||
tanuloErtekelesCo.ErtekelesSzoveg = tanuloErtekelesCo.ErtekelesSzovegFormazott = request.ErtekelesSzoveg;
|
||||
tanuloErtekelesCo.ErtekelesSzazalek = request.ErtekelesSzazalek;
|
||||
tanuloErtekelesCoList.Add(tanuloErtekelesCo);
|
||||
tanuloErtekelesCoList = new TanuloErtekelesValidacioMobil(connectionType).Validate(dcp.DalHandler, tanuloErtekelesCoList, out List<ValidationExceptionItem> errors);
|
||||
|
||||
if (errors.Any())
|
||||
{
|
||||
throw TanuloErtekelesLogicMobil.GetValidationException(errors);
|
||||
}
|
||||
|
||||
new TanuloErtekelesHelper(connectionType).SaveTanuloErtekelesList(dcp.FelhasznaloId, tanuloErtekelesCoList);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DeleteOsztalyCsoportErtekeles(DefaultConnectionParameters dcp, int id)
|
||||
{
|
||||
var connectionType = new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler);
|
||||
var tanuloErtekelesCo = new TanuloErtekelesHelper(connectionType).GetTanuloErtekelesCoById(id);
|
||||
var naplozarasLogic = new NaplozarasLogic(connectionType);
|
||||
|
||||
if (tanuloErtekelesCo != null && tanuloErtekelesCo.ErtekeloId == dcp.FelhasznaloId)
|
||||
{
|
||||
if (naplozarasLogic.IsCsakErtekelesZarasaVagyErtekelesEsNaploZarasaBeallitas() &&
|
||||
tanuloErtekelesCo.Datum <= new OrarendHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetNaplozarasDate(null))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.AzErtekelesNemTorolhetoErtekelesZarasMiatt, BlExceptionType.NaploZaras);
|
||||
}
|
||||
if (tanuloErtekelesCo.OsztalyCsoportId.HasValue && naplozarasLogic.GetLezartOsztalyokEsBontottCsoportjaik().Contains(tanuloErtekelesCo.OsztalyCsoportId.Value))
|
||||
{
|
||||
throw new BlException(TanuloErtekelesResource.AKivalasztottOsztalyNaplojaLezartNemTorolhetErtekelestAzOsztalyTanuloinaknak, BlExceptionType.NaploZaras);
|
||||
}
|
||||
new TanuloErtekelesHelper(connectionType).DeleteTanuloErtekelesById(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
internal static OsztalyCsoportTanuloAdatokResponse GetOsztalyCsoportTanuloAdatok(DefaultConnectionParameters dcp, int id)
|
||||
{
|
||||
var response = new OsztalyCsoportTanuloAdatokResponse();
|
||||
var tanuloAdatok = dcp.DalHandler.Tanulo().GetOsztalyCsoportTanuloAdatokDataSet(id).ToDaoList<OsztalyCsoportTanuloAdatokResponseDao>();
|
||||
var tanuloGondviselok = dcp.DalHandler.Tanulo().GetGondviselok(id, dcp.TanevId).ToDaoList<OsztalyCsoportGondviseloResponseDao>();
|
||||
|
||||
return tanuloAdatok.Select(t => new OsztalyCsoportTanuloAdatokResponse
|
||||
{
|
||||
TanuloId = t.TanuloId,
|
||||
TanuloNev = t.TanuloNev,
|
||||
TanuloSzuletesiDatum = t.TanuloSzuletesiDatum,
|
||||
TanuloAnyjaNeve = t.TanuloAnyjaNeve,
|
||||
OsztalyCsoportok = tanuloAdatok.Select(o => new OsztalyCsoportResponse
|
||||
{
|
||||
OsztalyCsoportId = o.OsztalyCsoportId,
|
||||
OsztalyCsoportNev = o.OsztalyCsoportNev
|
||||
}).ToList(),
|
||||
Gondviselok = tanuloGondviselok.Select(g => new OsztalyCsoportGondviseloResponse
|
||||
{
|
||||
Id = g.GondviseloId,
|
||||
Nev = g.GondviseloNev,
|
||||
RokonsagiFok = g.GondviseloRokonsagiFok?.GetDisplayName<RokonsagiFokEnum>(dcp.TanevId),
|
||||
Telefonszam = g.GondviseloTelefonszam,
|
||||
Email = g.GondviseloEmail,
|
||||
IsTorvenyesKepviselo = g.IsTorvenyesKepviselo
|
||||
}).ToList()
|
||||
}).First();
|
||||
}
|
||||
|
||||
internal static IEnumerable<MondatbankResponse> GetMondatbank(DefaultConnectionParameters dcp, MondatbankRequest request)
|
||||
{
|
||||
var osztalyCsoport = dcp.DalHandler.OsztalyCsoport().Get(request.OsztalyCsoportId);
|
||||
return dcp.DalHandler.TanuloErtekelesMondatbankDal().GetTanuloErtekelesMondatbankData(dcp.TanevId, (int)ErtekelesTipusEnum.evkozi_jegy_ertekeles, (int)ErtMondatbankTipusEnum.Tantargy, request.TantargyId, osztalyCsoport.EvfolyamTipusa).ToDaoList<MondatbankResponseDao>()
|
||||
.Select(m => new MondatbankResponse
|
||||
{
|
||||
RovidNev = m.RovidNev,
|
||||
Nev = RichTextLogic.RemoveHtmlForMobile(m.Nev)
|
||||
});
|
||||
}
|
||||
|
||||
internal static IEnumerable<OsztalyokCsoportokResponse> GetOsztalyokCsoportok(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var osztalyCsoportAdatok = dcp.DalHandler.OsztalyCsoport().GetOsztalyCsoportAdatokDataSet().ToDaoList<OsztalyCsoportAdatokResponseDao>();
|
||||
var tanitottOsztalyokCsoportok = dcp.DalHandler.Foglalkozas().GetTanarFoglalkozasok(dcp.FelhasznaloId, dcp.TanevId)
|
||||
.Tables[0].Rows.Cast<DataRow>().Select(row => SDAConvert.ToInt32(row["OCSID"])).ToList();
|
||||
|
||||
return osztalyCsoportAdatok.Select(ocs => new OsztalyokCsoportokResponse
|
||||
{
|
||||
OsztalyCsoportId = ocs.OsztalyCsoportId,
|
||||
OsztalyCsoportNev = ocs.OsztalyCsoportNev,
|
||||
IsTanitom = tanitottOsztalyokCsoportok.Contains(ocs.OsztalyCsoportId),
|
||||
OsztalyfonokCsoportvezetoUid = ocs.OsztalyfonokCsoportvezetoUid,
|
||||
OsztalyfonokCsoportvezetoNev = ocs.OsztalyfonokCsoportvezetoNev,
|
||||
OsztalyfonokHelyettesUid = ocs.OsztalyfonokHelyettesUid,
|
||||
OsztalyfonokHelyettesNev = ocs.OsztalyfonokHelyettesNev
|
||||
});
|
||||
}
|
||||
|
||||
internal static IEnumerable<TanuloErtekelesekResponse> GetTanuloErtekelesei(DefaultConnectionParameters dcp, TanuloErtekelesekRequest request)
|
||||
{
|
||||
var ertekelesek = dcp.DalHandler.TanuloErtekelesDal().GetTanuloErtekeleseiDataSet(request.TanuloId, request.TantargyId, request.OsztalyCsoportId).ToDaoList<TanuloErtekeleseiResponseDao>();
|
||||
var lezartOsztalyokEsBontottCsoportjaik = new NaplozarasLogic(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetLezartOsztalyokEsBontottCsoportjaik();
|
||||
var naplozart = lezartOsztalyokEsBontottCsoportjaik.Contains(request.OsztalyCsoportId);
|
||||
var naplozarasDatum = new DateTime();
|
||||
if (!naplozart)
|
||||
{
|
||||
naplozarasDatum = new OrarendHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetNaplozarasDate(null);
|
||||
}
|
||||
|
||||
return ertekelesek.Select(ertekeles => new TanuloErtekelesekResponse
|
||||
{
|
||||
ErtekelesId = ertekeles.ErtekelesId,
|
||||
TantargyId = ertekeles.TantargyId,
|
||||
TantargyNev = ertekeles.TantargyNev,
|
||||
Ertekeles = ertekeles.ErtekelesSzazalek.HasValue ? $"{ertekeles.ErtekelesSzazalek}%" : !string.IsNullOrEmpty(ertekeles.ErtekelesSzoveg) ? ertekeles.ErtekelesSzoveg : ertekeles.ErtekelesOsztalyzatNev,
|
||||
ErtekelesOsztalyzatId = ertekeles.ErtekelesOsztalyzatId,
|
||||
ErtekelesOsztalyzatNev = !string.IsNullOrEmpty(ertekeles.ErtekelesOsztalyzatNev) ? ertekeles.ErtekelesOsztalyzatNev : null,
|
||||
ErtekelesSzoveg = ertekeles.ErtekelesSzovegFormazott ?? ertekeles.ErtekelesSzoveg,
|
||||
ErtekelesSzazalek = ertekeles.ErtekelesSzazalek,
|
||||
ErtekelesFajtaId = ertekeles.ErtekelesSzazalek.HasValue ? (int)TanuloErtekelesFajtaEnum.Szazalekos : !string.IsNullOrEmpty(ertekeles.ErtekelesSzoveg) ? (int)TanuloErtekelesFajtaEnum.Szoveges : (int)TanuloErtekelesFajtaEnum.Osztalyzat,
|
||||
ErtekelesFajtaNev = ertekeles.ErtekelesSzazalek.HasValue ? TanuloErtekelesFajtaEnum.Szazalekos.ToDisplayName() : !string.IsNullOrEmpty(ertekeles.ErtekelesSzoveg) ? TanuloErtekelesFajtaEnum.Szoveges.ToDisplayName() : TanuloErtekelesFajtaEnum.Osztalyzat.ToDisplayName(),
|
||||
ErtekelesModId = ertekeles.ErtekelesModId,
|
||||
ErtekelesModNev = ertekeles.ErtekelesModNev,
|
||||
ErtekelesTipusId = ertekeles.ErtekelesTipusId,
|
||||
ErtekelesTipusNev = ertekeles.ErtekelesTipusNev,
|
||||
ErtekelesTema = ertekeles.ErtekelesTema,
|
||||
ErtekelesDatum = ertekeles.ErtekelesDatum,
|
||||
ErtekelesSuly = ertekeles.ErtekelesSuly,
|
||||
ErtekelesRogzitesDatum = ertekeles.ErtekelesRogzitesDatum,
|
||||
TanarUid = ertekeles.TanarUid,
|
||||
OsztalyCsoportId = ertekeles.OsztalyCsoportId,
|
||||
FeladatEllatasiHelyId = ertekeles.FeladatEllatasiHelyId,
|
||||
FeladatEllatasiHelyNev = ertekeles.MukodesiHelyNev + " - " + ertekeles.OktatasiNevelesiFeladatTipusId.GetItemNameFromCache(dcp.TanevId, dcp.IntezmenyAzonosito),
|
||||
Naplozart = naplozart || ertekeles.ErtekelesDatum <= naplozarasDatum
|
||||
});
|
||||
}
|
||||
|
||||
internal static IEnumerable<BejelentettSzamonkeresekResponse> GetBejelentettSzamonkeresek(DefaultConnectionParameters dcp, BejelentettSzamonkeresekRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
var response = new HashSet<BejelentettSzamonkeresekResponse>();
|
||||
var szamonkeresek = dcp.DalHandler.SzamonkeresElorejelzes().GetSzamonkeresElorejelzesDetailDataSet(
|
||||
dcp.IntezmenyId,
|
||||
dcp.TanevId,
|
||||
new SzamonkeresElorejelzesSearchPco
|
||||
{
|
||||
OraGroupId = 0,
|
||||
OsztalyCsoportId = request.OsztalyCsoportId,
|
||||
Datum = request.Datum
|
||||
}, true).ToDaoList<BejelentettSzamonkeresekResponseDao>();
|
||||
|
||||
foreach (var szamonkeres in szamonkeresek)
|
||||
{
|
||||
var bejelentettSzamonkeres = new BejelentettSzamonkeresekResponse
|
||||
{
|
||||
Id = szamonkeres.Id,
|
||||
Tema = szamonkeres.Tema,
|
||||
ErtekelesMod = szamonkeres.ErtekelesMod,
|
||||
OraSzam = szamonkeres.OraSzam,
|
||||
TantargyId = szamonkeres.TantargyId,
|
||||
TantargyNev = szamonkeres.TantargyNev,
|
||||
TanarUid = szamonkeres.TanarUid,
|
||||
TanarNev = szamonkeres.TanarNev
|
||||
};
|
||||
|
||||
response.Add(bejelentettSzamonkeres);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Tanar;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Tanar
|
||||
{
|
||||
public class TanarFacade : NaploFacade
|
||||
{
|
||||
public TanarFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public ProfilResponse GetProfil()
|
||||
=> RunSubquery(() => TanarSubqueries.GetProfil(DefaultConnectionParameters));
|
||||
|
||||
public BeallitasokResponse GetBeallitasok()
|
||||
=> RunSubquery(() => TanarSubqueries.GetBeallitasok(DefaultConnectionParameters));
|
||||
|
||||
public void PostBeallitasok(BeallitasokRequest request)
|
||||
=> RunSubquery(() => TanarSubqueries.PostBeallitasok(DefaultConnectionParameters, request));
|
||||
|
||||
public IEnumerable<TantargyFelosztasResponse> GetTantargyFelosztas()
|
||||
=> RunSubquery(() => TanarSubqueries.GetTantargyFelosztas(DefaultConnectionParameters));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Tanar;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Tanar
|
||||
{
|
||||
internal static class TanarSubqueries
|
||||
{
|
||||
internal static ProfilResponse GetProfil(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var dataRow = new TanarHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetProfil(dcp.UserIdpUniqueId);
|
||||
|
||||
return new ProfilResponse
|
||||
{
|
||||
Uid = dcp.UserIdpUniqueId,
|
||||
Nev = SDAConvert.ToString(dataRow["Nev"]),
|
||||
IntezmenyNev = SDAConvert.ToString(dataRow["IntezmenyNev"]),
|
||||
FeladatEllatasiHelyId = SDAConvert.ToInt32(dataRow["FeladatEllatasiHelyId"]),
|
||||
FeladatEllatasiHelyNev = SDAConvert.ToString(dataRow["MukodesiHelyNev"]) + " - " + SDAConvert.ToInt32(dataRow["OktatasiNevelesiFeladatTipusId"]).GetItemNameFromCache(dcp.TanevId, dcp.IntezmenyAzonosito),
|
||||
PublikusEmailCim = SDAConvert.ToString(dataRow["PublikusEmailCim"]),
|
||||
PublikusTelefonszam = SDAConvert.ToString(dataRow["PublikusTelefonszam"]),
|
||||
MunkahelyiEmailCim = SDAConvert.ToString(dataRow["MunkahelyiEmailCim"]),
|
||||
MunkahelyiTelefonszam = SDAConvert.ToString(dataRow["MunkahelyiTelefonszam"])
|
||||
};
|
||||
}
|
||||
|
||||
internal static BeallitasokResponse GetBeallitasok(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var systemSettingsHelper = new SystemSettingsHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId));
|
||||
|
||||
return new BeallitasokResponse
|
||||
{
|
||||
ElozoOranHianyzoAjanlasa = new FelhasznaloHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).GetProfilTipus(dcp.FelhasznaloId, "HianyzokAutoKitoltes"),
|
||||
NapiSzamonkeresLimit = systemSettingsHelper.GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Napi_Szamonkeresi_Limit),
|
||||
LimitaltSzamonkeresekTipusai = systemSettingsHelper.GetSystemSettingValue<List<int>>(RendszerBeallitasTipusEnum.Ertekeles_Modok_Beallitasa_Napi_Limithez)
|
||||
};
|
||||
}
|
||||
|
||||
internal static void PostBeallitasok(DefaultConnectionParameters dcp, BeallitasokRequest request)
|
||||
{
|
||||
new FelhasznaloHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId)).SetProfilTipus(dcp.FelhasznaloId, "HianyzokAutoKitoltes", request.ElozoOranHianyzoAjanlasa);
|
||||
}
|
||||
|
||||
internal static IEnumerable<TantargyFelosztasResponse> GetTantargyFelosztas(DefaultConnectionParameters dcp)
|
||||
{
|
||||
return new TantargyFelosztasHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.GetTantargyFelosztasCoList(new TantargyFelosztasKeresesCo { Tanar = dcp.FelhasznaloId })
|
||||
.Select(x => new TantargyFelosztasResponse
|
||||
{
|
||||
OsztalyCsoportId = x.OsztalyCsoportId,
|
||||
OsztalyCsoportNev = x.OsztalyCsoportNev,
|
||||
TantargyId = x.TantargyId,
|
||||
TantargyNev = x.TantargyNev,
|
||||
FeladatellatasiHelyId = x.FeladatEllatasihelyId,
|
||||
FeladatellatasiHely = x.MukodesiHelyNev + " - " + x.OktatasiNevelesiFeladatTipusId.GetItemNameFromCache(dcp.TanevId, dcp.IntezmenyAzonosito)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Naplo;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Tanmenet;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Tanmenet
|
||||
{
|
||||
public class TanmenetFacade : NaploFacade
|
||||
{
|
||||
public TanmenetFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<TanmenetItemListResponse> ListTanmenet(TanmenetRequest request)
|
||||
=> RunSubquery(() => TanmenetSubqueries.ListTanmenet(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Logic;
|
||||
using Kreta.Naplo.Dao.V3.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Tanmenet;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Tanmenet
|
||||
{
|
||||
internal static class TanmenetSubqueries
|
||||
{
|
||||
public static IEnumerable<TanmenetItemListResponse> ListTanmenet(DefaultConnectionParameters dcp, TanmenetRequest request)
|
||||
{
|
||||
var tanar = new HelyettesitesLogic.Tanar(dcp.FelhasznaloId, dcp.TanevId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, null);
|
||||
|
||||
if (request.TanarUid != dcp.UserIdpUniqueId && !tanar.IsHelyettesito(request.OsztalyCsoportId, request.TantargyId))
|
||||
{
|
||||
throw new BlException("Nincs jogosultsága, csak a saját vagy helyettesítési tanmenet kérdezhető le!", BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
|
||||
var response = new List<TanmenetListResponse>();
|
||||
|
||||
return dcp.DalHandler.Tanmenet().GetTanmenetek(request.TantargyId, request.OsztalyCsoportId, userIdpUniqueId: request.TanarUid)
|
||||
.ToDaoList<TanmenetResponseDao>()
|
||||
.Select(tanmenet => new TanmenetItemListResponse { Id = tanmenet.Id, EvesOraszam = tanmenet.EvesOraszam, Tema = tanmenet.Tema });
|
||||
}
|
||||
}
|
||||
}
|
63
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/app.config
Normal file
63
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/app.config
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.1.0" newVersion="5.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.FileExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.5.1.0" newVersion="6.5.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.5.1.0" newVersion="6.5.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CacheManager.Core" publicKeyToken="5b450b4fb65c4cdb" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
17
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/packages.config
Normal file
17
Kreta.WebApi/Naplo/Kreta.Naplo.BusinessLogic/packages.config
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Kreta.Core.Client" version="1.3.5604" targetFramework="net48" />
|
||||
<package id="Kreta.Core.IoC" version="1.2.63491" targetFramework="net48" />
|
||||
<package id="Kreta.Core.Validation" version="2.0.16" targetFramework="net48" />
|
||||
<package id="Kreta.Web.Logging.Abstractions" version="1.0.12" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.675" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="SimpleInjector" version="4.0.11" targetFramework="net48" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
|
||||
</packages>
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Kreta.Naplo.Configuration
|
||||
{
|
||||
public class CorsConfiguration : ConfigurationSection, ICorsConfiguration
|
||||
{
|
||||
const string SectionName = "CorsConfiguration";
|
||||
|
||||
static Lazy<CorsConfiguration> instance;
|
||||
|
||||
public static CorsConfiguration Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance.Value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(IsEnabled), IsRequired = true)]
|
||||
public bool IsEnabled => (bool)this[nameof(IsEnabled)];
|
||||
|
||||
[ConfigurationProperty(nameof(Urls), IsRequired = true)]
|
||||
public string Urls => (string)this[nameof(Urls)];
|
||||
|
||||
[ConfigurationProperty(nameof(Headers), IsRequired = true)]
|
||||
public string Headers => (string)this[nameof(Headers)];
|
||||
|
||||
[ConfigurationProperty(nameof(Methods), IsRequired = true)]
|
||||
public string Methods => (string)this[nameof(Methods)];
|
||||
|
||||
[ConfigurationProperty(nameof(SupportsCredentials), IsRequired = true)]
|
||||
public bool SupportsCredentials => (bool)this[nameof(SupportsCredentials)];
|
||||
|
||||
static CorsConfiguration()
|
||||
{
|
||||
instance = new Lazy<CorsConfiguration>(() =>
|
||||
{
|
||||
var section = (CorsConfiguration)ConfigurationManager.GetSection(SectionName);
|
||||
|
||||
if (section == null)
|
||||
{
|
||||
throw new ConfigurationErrorsException($"{SectionName} configuration section was not found");
|
||||
}
|
||||
|
||||
return section;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.Naplo.Configuration
|
||||
{
|
||||
public interface ICorsConfiguration
|
||||
{
|
||||
bool IsEnabled { get; }
|
||||
string Urls { get; }
|
||||
string Headers { get; }
|
||||
string Methods { get; }
|
||||
bool SupportsCredentials { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<?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>{521A86F6-B3BE-47FF-9A91-7E21DC0CDB43}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Naplo.Configuration</RootNamespace>
|
||||
<AssemblyName>Kreta.Naplo.Configuration</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<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>
|
||||
</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.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Configuration.1.3.20119.1\lib\net452\Kreta.Core.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ICorsConfiguration.cs" />
|
||||
<Compile Include="CorsConfiguration.cs" />
|
||||
<Compile Include="Kreta\IKretaNaploApiConfiguration.cs" />
|
||||
<Compile Include="Kreta\KretaNaploApiConfiguration.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,16 @@
|
|||
namespace Kreta.Naplo.Configuration.Kreta
|
||||
{
|
||||
/// <summary>
|
||||
/// Authorization configuration section interface
|
||||
/// </summary>
|
||||
public interface IKretaNaploApiConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the kreta API key.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The kreta API key.
|
||||
/// </value>
|
||||
string ApiKey { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using Validators = Kreta.Core.Configuration.Validators;
|
||||
|
||||
namespace Kreta.Naplo.Configuration.Kreta
|
||||
{
|
||||
/// <summary>
|
||||
/// Authorization configuration section
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Configuration.ConfigurationSection" />
|
||||
public class KretaNaploApiConfiguration : ConfigurationSection, IKretaNaploApiConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of section
|
||||
/// </summary>
|
||||
const string SectionName = "KretaNaploApi";
|
||||
|
||||
/// <summary>
|
||||
/// The instance
|
||||
/// </summary>
|
||||
static Lazy<KretaNaploApiConfiguration> instance;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the instance.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The instance.
|
||||
/// </value>
|
||||
public static KretaNaploApiConfiguration Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance.Value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the kreta API key.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The kreta API key.
|
||||
/// </value>
|
||||
/// <remarks>.NET ConfigurationProperty constructor is buggy: it sets the default value of string type to string.Empty (not null), then
|
||||
/// calls all validator for default value too. So in normal way you can't configure e.g. "MinLength" constaint, wihtout explicitly set "Default"
|
||||
/// to a string with length larger than "MinLength". The workaround is to write a custom valitor and set "DefaultValue" to a special
|
||||
/// string that theese validators knows, in order to skip validations when ConfigurationProperty calls them for default values.
|
||||
/// This is a known issue in .NET framework.</remarks>
|
||||
[ConfigurationProperty(nameof(ApiKey), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.StringValidator(false, MinLength = 36, MaxLength = 256)]
|
||||
public string ApiKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(ApiKey)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base URL.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The base URL.
|
||||
/// </value>
|
||||
/// <remarks>.NET ConfigurationProperty constructor is buggy: it sets the default value of string type to string.Empty (not null), then
|
||||
/// calls all validator for default value too. So in normal way you can't configure e.g. "MinLength" constaint, wihtout explicitly set "Default"
|
||||
/// to a string with length larger than "MinLength". The workaround is to write a custom valitor and set "DefaultValue" to a special
|
||||
/// string that theese validators knows, in order to skip validations when ConfigurationProperty calls them for default values.
|
||||
/// This is a known issue in .NET framework.</remarks>
|
||||
[ConfigurationProperty(nameof(BaseUrl), IsRequired = true, DefaultValue = Validators.StringValidator.SkipValidationForDefaultValue)]
|
||||
[Validators.UrlValidator(Validators.UrlType.HttpBaseUrl)]
|
||||
public string BaseUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[nameof(BaseUrl)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="KretaNaploApiConfiguration"/> class.
|
||||
/// </summary>
|
||||
static KretaNaploApiConfiguration()
|
||||
{
|
||||
instance = new Lazy<KretaNaploApiConfiguration>(() =>
|
||||
{
|
||||
var section = (KretaNaploApiConfiguration)ConfigurationManager.GetSection(SectionName);
|
||||
|
||||
if (section == null)
|
||||
{
|
||||
throw new ConfigurationErrorsException($"{SectionName} configuration section was not found");
|
||||
}
|
||||
|
||||
return section;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Kreta.Core.Configuration" version="1.3.20119.1" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.688" targetFramework="net48" developmentDependency="true" />
|
||||
</packages>
|
76
Kreta.WebApi/Naplo/Kreta.Naplo.Dao/Kreta.Naplo.Dao.csproj
Normal file
76
Kreta.WebApi/Naplo/Kreta.Naplo.Dao/Kreta.Naplo.Dao.csproj
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?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>{0B9D719F-127A-4269-A05D-F65C055705DA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Naplo.Dao</RootNamespace>
|
||||
<AssemblyName>Kreta.Naplo.Dao</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>
|
||||
</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="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<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="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="V3\Csatolmany\OraFileResponseDao.cs" />
|
||||
<Compile Include="V3\Igazolas\IgazolasResponseDao.cs" />
|
||||
<Compile Include="V3\Intezmeny\IntezmenyAdatokDao.cs" />
|
||||
<Compile Include="V3\Orarend\BejelentettSzamonkeresResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\BejelentettSzamonkeresekResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\FelmentesResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\JelenletIgazolasResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\JelenletResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\MulasztasResponseDao.cs" />
|
||||
<Compile Include="V3\Orarend\NaptariHetResponseDao.cs" />
|
||||
<Compile Include="V3\Ora\FeljegyzesResponseDao.cs" />
|
||||
<Compile Include="V3\Ora\MulasztasResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\MondatbankResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportAdatokResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportGondviseloResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportTanuloAdatokResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\TanuloErtekeleseiResponseDao.cs" />
|
||||
<Compile Include="V3\Tanulo\TantargyiAtlagResponseDao.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportTanuloResponseDao.cs" />
|
||||
<Compile Include="V3\Tanulo\TanuloErtekelesekResponseDao.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetResponseDao.cs" />
|
||||
<Compile Include="V3\Tanulo\TanuloMentessegResponseDao.cs" />
|
||||
<Compile Include="V3\Tanulo\TanuloResponseDao.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418D3E-CAF1-482C-9B18-85D147ABD495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Kreta.Naplo.Dao")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Kreta.Naplo.Dao")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0b9d719f-127a-4269-a05d-f65c055705da")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Csatolmany
|
||||
{
|
||||
public class OraFileResponseDao
|
||||
{
|
||||
[ColumnName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("FileId")]
|
||||
public int FileId { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime OraDatum { get; set; }
|
||||
|
||||
[ColumnName("FileNev")]
|
||||
public string FileNev { get; set; }
|
||||
|
||||
[ColumnName("OrarendiOraId")]
|
||||
public int? OrarendiOraId { get; set; }
|
||||
|
||||
[ColumnName("TanitasiOraId")]
|
||||
public int? TanitasiOraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Igazolas
|
||||
{
|
||||
public class IgazolasResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Kezdete")]
|
||||
public DateTime Kezdete { get; set; }
|
||||
|
||||
[ColumnName("Vege")]
|
||||
public DateTime Vege { get; set; }
|
||||
|
||||
[ColumnName("IgazolasTipusa")]
|
||||
public int Tipusa { get; set; }
|
||||
|
||||
[ColumnName("Megjegyzes")]
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
[ColumnName("Rogzito")]
|
||||
public string Rogzito { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Naplo
|
||||
{
|
||||
public class IntezmenyAdatokDao
|
||||
{
|
||||
[ColumnName("IntezmenyId")]
|
||||
public int IntezmenyId { get; set; }
|
||||
|
||||
[ColumnName("AktivTanevId")]
|
||||
public int TanevId { get; set; }
|
||||
|
||||
[ColumnName("TanevSorszam")]
|
||||
public int TanevSorszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Ora
|
||||
{
|
||||
public class FeljegyzesResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Tipus")]
|
||||
public int Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Ora
|
||||
{
|
||||
public class MulasztasResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("Tipus")]
|
||||
public int? Tipus { get; set; }
|
||||
|
||||
[ColumnName("Keses")]
|
||||
public int? Keses { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class BejelentettSzamonkeresResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("SzamonkeresMegnevezes")]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId")]
|
||||
public int ErtekelesMod { get; set; }
|
||||
|
||||
[ColumnName("Oraszam")]
|
||||
public int? OraSzam { get; set; }
|
||||
|
||||
[ColumnName("TargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TanarUid")]
|
||||
public Guid TanarUid { get; set; }
|
||||
|
||||
[ColumnName("TanarNev")]
|
||||
public string TanarNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class BejelentettSzamonkeresekResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("SzamonkeresMegnevezes")]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[ColumnName("SzamonkeresModId")]
|
||||
public int ErtekelesMod { get; set; }
|
||||
|
||||
[ColumnName("Oraszam")]
|
||||
public int? OraSzam { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("Tantargy")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TanarUid")]
|
||||
public Guid TanarUid { get; set; }
|
||||
|
||||
[ColumnName("Tanar")]
|
||||
public string TanarNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class FelmentesResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TantargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesMentesites")]
|
||||
public bool ErtekelesMentesites { get; set; }
|
||||
|
||||
[ColumnName("OraMentesites")]
|
||||
public bool OraMentesites { get; set; }
|
||||
|
||||
[ColumnName("SzovegesenErtekelheto")]
|
||||
public bool SzovegesenErtekelheto { get; set; }
|
||||
|
||||
[ColumnName("FelmentesOka")]
|
||||
public string FelmentesOka { get; set; }
|
||||
|
||||
[ColumnName("Kezdete")]
|
||||
public DateTime? FelmentesKezdete { get; set; }
|
||||
|
||||
[ColumnName("Vege")]
|
||||
public DateTime? FelmentesVege { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class JelenletIgazolasResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class JelenletResponseDao
|
||||
{
|
||||
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int? TantargyId { get; set; }
|
||||
|
||||
[ColumnName("IsMaganTanulo")]
|
||||
public bool? IsMaganTanulo { get; set; }
|
||||
|
||||
[ColumnName("MaganTanulosagKezdetDatuma")]
|
||||
public DateTime? MaganTanulosagKezdetDatuma { get; set; }
|
||||
|
||||
[ColumnName("MaganTanulosagVegeDatuma")]
|
||||
public DateTime? MaganTanulosagVegeDatuma { get; set; }
|
||||
|
||||
[ColumnName("IsJogviszonySzunetelteto")]
|
||||
public bool? IsJogviszonySzunetelteto { get; set; }
|
||||
|
||||
[ColumnName("IsSzakmaiGyakorlatonLevo")]
|
||||
public bool? IsSzakmaiGyakorlatonLevo { get; set; }
|
||||
|
||||
[ColumnName("FelmentesId")]
|
||||
public int? FelmentesId { get; set; }
|
||||
|
||||
[ColumnName("FelmentesKezdeteDatum")]
|
||||
public DateTime? FelmentesKezdeteDatum { get; set; }
|
||||
|
||||
[ColumnName("FelmentesVegeDatum")]
|
||||
public DateTime? FelmentesVegeDatum { get; set; }
|
||||
|
||||
[ColumnName("IsOraMentesites")]
|
||||
public bool? IsOraMentesites { get; set; }
|
||||
|
||||
[ColumnName("MentessegOka")]
|
||||
public string MentessegOka { get; set; }
|
||||
|
||||
[ColumnName("IsErtekelesMentesseg")]
|
||||
public bool? IsErtekelesMentesseg { get; set; }
|
||||
|
||||
[ColumnName("IsSzovegesenErtekelheto")]
|
||||
public bool? IsSzovegesenErtekelheto { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class MulasztasResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TanuloNev")]
|
||||
public string TanuloNev { get; set; }
|
||||
|
||||
[ColumnName("Megjegyzes")]
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
[ColumnName("Tipus")]
|
||||
public int? Tipus { get; set; }
|
||||
|
||||
[ColumnName("Keses")]
|
||||
public int? Keses { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Orarend
|
||||
{
|
||||
public class NaptariHetResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("HetSorszama")]
|
||||
public int HetSorszama { get; set; }
|
||||
|
||||
[ColumnName("HetKezdoNapja")]
|
||||
public DateTime KezdoNapDatuma { get; set; }
|
||||
|
||||
[ColumnName("HetUtolsoNapja")]
|
||||
public DateTime VegNapDatuma { get; set; }
|
||||
|
||||
[ColumnName("Hetirend")]
|
||||
public int? HetirendId { get; set; }
|
||||
|
||||
[ColumnName("Hetirend_DNAME")]
|
||||
public string HetirendNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class MondatbankResponseDao
|
||||
{
|
||||
[ColumnName("RovidNev")]
|
||||
public string RovidNev { get; set; }
|
||||
|
||||
[ColumnName("Szoveg")]
|
||||
public string Nev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportAdatokResponseDao
|
||||
{
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportNev")]
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokCsoportvezetoUid")]
|
||||
public Guid? OsztalyfonokCsoportvezetoUid { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokCsoportvezetoNev")]
|
||||
public string OsztalyfonokCsoportvezetoNev { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokHelyettesUid")]
|
||||
public Guid? OsztalyfonokHelyettesUid { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokHelyettesNev")]
|
||||
public string OsztalyfonokHelyettesNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportGondviseloResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int GondviseloId { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string GondviseloNev { get; set; }
|
||||
|
||||
[ColumnName("RokonsagFoka")]
|
||||
public int? GondviseloRokonsagiFok { get; set; }
|
||||
|
||||
[ColumnName("TelefonSzam")]
|
||||
public string GondviseloTelefonszam { get; set; }
|
||||
|
||||
[ColumnName("EmailCim")]
|
||||
public string GondviseloEmail { get; set; }
|
||||
|
||||
[ColumnName("IsTorvenyesKepviselo")]
|
||||
public bool IsTorvenyesKepviselo { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportTanuloAdatokResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TanuloNev")]
|
||||
public string TanuloNev { get; set; }
|
||||
|
||||
[ColumnName("TanuloSzuletesiDatum")]
|
||||
public DateTime TanuloSzuletesiDatum { get; set; }
|
||||
|
||||
[ColumnName("TanuloAnyjaNeve")]
|
||||
public string TanuloAnyjaNeve { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportNev")]
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportTanuloResponseDao
|
||||
{
|
||||
[ColumnName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("SzuletesiDatum")]
|
||||
public DateTime SzuletesiDatum { get; set; }
|
||||
|
||||
[ColumnName("AnyjaNeve")]
|
||||
public string AnyjaNeve { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.OsztalyCsoport
|
||||
{
|
||||
public class TanuloErtekeleseiResponseDao
|
||||
{
|
||||
[ColumnName("ErtekelesId")]
|
||||
public int ErtekelesId { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TantargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId")]
|
||||
public int? ErtekelesOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId_DNAME")]
|
||||
public string ErtekelesOsztalyzatNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzoveg")]
|
||||
public string ErtekelesSzoveg { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzovegFormazott")]
|
||||
public string ErtekelesSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzazalek")]
|
||||
public int? ErtekelesSzazalek { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId")]
|
||||
public int? ErtekelesModId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId_DNAME")]
|
||||
public string ErtekelesModNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesTipusId")]
|
||||
public int ErtekelesTipusId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesTipusId_DNAME")]
|
||||
public string ErtekelesTipusNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesTema")]
|
||||
public string ErtekelesTema { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesDatum")]
|
||||
public DateTime ErtekelesDatum { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSuly")]
|
||||
public int? ErtekelesSuly { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesRogzitesDatum")]
|
||||
public DateTime ErtekelesRogzitesDatum { get; set; }
|
||||
|
||||
[ColumnName("TanarUid")]
|
||||
public Guid TanarUid { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("FeladatEllatasiHelyId")]
|
||||
public int FeladatEllatasiHelyId { get; set; }
|
||||
|
||||
[ColumnName("MukodesiHelyNev")]
|
||||
public string MukodesiHelyNev { get; set; }
|
||||
|
||||
[ColumnName("OktatasiNevelesiFeladatTipusId")]
|
||||
public int OktatasiNevelesiFeladatTipusId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Tanmenet
|
||||
{
|
||||
public class TanmenetResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Oraszam")]
|
||||
public int EvesOraszam { get; set; }
|
||||
|
||||
[ColumnName("Tema")]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[ColumnName("Megjegyzes")]
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("RovidNev")]
|
||||
public string RovidNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Tanulo
|
||||
{
|
||||
public class TantargyiAtlagResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("SulyozottAtlag")]
|
||||
public decimal? SulyozottAtlag { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Tanulo
|
||||
{
|
||||
public class TanuloErtekelesekResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId")]
|
||||
public int? ErtekelesOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzoveg")]
|
||||
public string ErtekelesSzoveg { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzazalek")]
|
||||
public int? ErtekelesSzazalek { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesDatum")]
|
||||
public DateTime ErtekelesDatum { get; set; }
|
||||
|
||||
[ColumnName("TipusId")]
|
||||
public int TipusId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Tanulo
|
||||
{
|
||||
public class TanuloMentessegResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesMentesites")]
|
||||
public bool? ErtekelesAloliFelmentes { get; set; }
|
||||
|
||||
[ColumnName("OraMentesites")]
|
||||
public bool? TanoraLatogatasaAloliFelmentes { get; set; }
|
||||
|
||||
[ColumnName("SzovegesenErtekelheto")]
|
||||
public bool? SzovegesenErtekelheto { get; set; }
|
||||
|
||||
[ColumnName("FelmentesOka")]
|
||||
public string FelmentesOka { get; set; }
|
||||
|
||||
[ColumnName("Kezdete")]
|
||||
public DateTime? Kezdete { get; set; }
|
||||
|
||||
[ColumnName("Vege")]
|
||||
public DateTime? Vege { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Naplo.Dao.V3.Tanulo
|
||||
{
|
||||
public class TanuloResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TanuloNyomtatasiNev")]
|
||||
public string TanuloNev { get; set; }
|
||||
|
||||
[ColumnName("TanuloSzuletesiDatum")]
|
||||
public string SzuletesiDatum { get; set; }
|
||||
|
||||
[ColumnName("TanuloAnyjaNev")]
|
||||
public string AnyaNev { get; set; }
|
||||
}
|
||||
}
|
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/.DS_Store
vendored
Normal file
Binary file not shown.
13
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/IService.cs
Normal file
13
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/IService.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
namespace Kreta.Naplo.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// Service interface
|
||||
/// </summary>
|
||||
public interface IService
|
||||
{
|
||||
/// <summary>
|
||||
/// Service context
|
||||
/// </summary>
|
||||
ServiceContext Context { get; set; }
|
||||
}
|
||||
}
|
274
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/Kreta.Naplo.Domain.csproj
Normal file
274
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/Kreta.Naplo.Domain.csproj
Normal file
|
@ -0,0 +1,274 @@
|
|||
<?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>{9BFF7535-E0F6-4437-AF5F-540E1B4506B2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Naplo.Domain</RootNamespace>
|
||||
<AssemblyName>Kreta.Naplo.Domain</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<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>
|
||||
</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.Composition" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="IService.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServiceContext.cs" />
|
||||
<Compile Include="V2\Converter\EnumConverter.cs" />
|
||||
<Compile Include="V2\Converter\GetModelConverter.cs" />
|
||||
<Compile Include="V2\Converter\PostModelConverter.cs" />
|
||||
<Compile Include="V2\Model\CustomEnum\NaploEnumList.cs" />
|
||||
<Compile Include="V2\Model\CustomEnum\NaploEnumListItem.cs" />
|
||||
<Compile Include="V2\Model\CustomEnum\NaploEnum.cs" />
|
||||
<Compile Include="V2\Model\Get\Enum\EnumRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\OpenBoard\FeltolthetoFajlokSzamaRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\OpenBoard\FeltolthetoFajlokSzamaResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Orarend\TanarSimplifiedGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Orarend\OraGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Orarend\OraGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\JavasoltJelenletTemplate\JavasoltJelenletTemplateGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\JavasoltJelenletTemplate\JavasoltJelenletTemplateGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\JavasoltJelenletTemplate\JavasoltJelenletTemplateItemGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\TanitasiOra\JavasoltJelenlet\JavasoltJelenletGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\TanitasiOra\JavasoltJelenlet\JavasoltJelenletGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\TanitasiOra\JavasoltJelenlet\JavasoltJelenletKeyGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\TanitasiOra\JavasoltJelenlet\JavasoltJelenletSzuroGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\TanitasiOra\JavasoltJelenlet\JavasoltJelenletTanuloGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\OrarendiOra\JavasoltJelenlet\JavasoltJelenletGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\OrarendiOra\JavasoltJelenlet\JavasoltJelenletTanuloGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\OrarendiOra\JavasoltJelenlet\JavasoltJelenletGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\OrarendiOra\JavasoltJelenlet\JavasoltJelenletSzuroGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Ora\OrarendiOra\JavasoltJelenlet\JavasoltJelenletKeyGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanar\IskolaorRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanar\IskolaorResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanar\ProfilRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanar\ProfilResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanmenet\TanmenetKeyGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanmenet\TanmenetGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanmenet\TanmenetItemGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanmenet\TanmenetGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\ErtekelesFajta.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\ErtekelesGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\ErtekelesGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\MulasztasRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\FeljegyzesResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\MulasztasResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\FeljegyzesRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\OsztalyTanuloiRequest.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\OsztalyTanuloiResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\TanugyiAdatokGetResponse.cs" />
|
||||
<Compile Include="V2\Model\Get\Tanulo\TanuloResponse.cs" />
|
||||
<Compile Include="V2\Interface\IGetRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Ertekeles\ErtekelesResponse.cs" />
|
||||
<Compile Include="V2\Model\Post\Ertekeles\ErtekelesRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Ertekeles\OsztalyCsoportErtekelesRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Ertekeles\TanuloForOsztalyCsoportErtekelesRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\OpenBoard\FeltoltottFajlResponse.cs" />
|
||||
<Compile Include="V2\Model\Post\OpenBoard\FeltoltottFajlRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Naplozas\MulasztasForOraNaplozasRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Naplozas\OraNaplozasRequest.cs" />
|
||||
<Compile Include="V2\Model\Post\Naplozas\OraNaplozasResponse.cs" />
|
||||
<Compile Include="V2\Model\Post\Naplozas\TanuloForOraNaplozasRequest.cs" />
|
||||
<Compile Include="V2\Model\ResponseWrapper.cs" />
|
||||
<Compile Include="V2\Service\IEnumService.cs" />
|
||||
<Compile Include="V2\Service\IErtekelesService.cs" />
|
||||
<Compile Include="V2\Service\ICommonService.cs" />
|
||||
<Compile Include="V2\Service\IIskolaorService.cs" />
|
||||
<Compile Include="V2\Service\IOraService.cs" />
|
||||
<Compile Include="V2\Service\ITanarService.cs" />
|
||||
<Compile Include="V3\Adatszotar\Adatszotar.cs" />
|
||||
<Compile Include="V3\Common\ApiSecurity.cs" />
|
||||
<Compile Include="V3\Common\DefaultConnectionParameters.cs" />
|
||||
<Compile Include="V3\Common\MobileUser.cs" />
|
||||
<Compile Include="V3\Constant.cs" />
|
||||
<Compile Include="V3\Csatolmany\CsatolmanyListRequest.cs" />
|
||||
<Compile Include="V3\Csatolmany\CsatolmanyResponse.cs" />
|
||||
<Compile Include="V3\Enum\Adatszotar.cs" />
|
||||
<Compile Include="V3\Enum\EnumRequest.cs" />
|
||||
<Compile Include="V3\Enum\EnumResponse.cs" />
|
||||
<Compile Include="V3\Enum\ErtekelesLekeresTipusEnum.cs" />
|
||||
<Compile Include="V3\Enum\FelhasznaloSzerepkor.cs" />
|
||||
<Compile Include="V3\Enum\MockUserName.cs" />
|
||||
<Compile Include="V3\Ertekeles\ErtekelesRequest.cs" />
|
||||
<Compile Include="V3\Ertekeles\ErtekelesResponse.cs" />
|
||||
<Compile Include="V3\Felmentes\FelmentesRequest.cs" />
|
||||
<Compile Include="V3\Igazolas\IgazolasCreateRequest.cs" />
|
||||
<Compile Include="V3\Igazolas\IgazolasResponse.cs" />
|
||||
<Compile Include="V3\Orarend\SzamonkeresRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\BejelentettSzamonkeresekRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\BejelentettSzamonkeresekResponse.cs" />
|
||||
<Compile Include="V3\Orarend\FelmentesResponse.cs" />
|
||||
<Compile Include="V3\Orarend\HetirendListRequest.cs" />
|
||||
<Compile Include="V3\Orarend\HetirendListResponse.cs" />
|
||||
<Compile Include="V3\Orarend\OraNaplozasTorlesRequest.cs" />
|
||||
<Compile Include="V3\Ora\FeljegyzesResponse.cs" />
|
||||
<Compile Include="V3\Ora\OraFeljegyzesRequest.cs" />
|
||||
<Compile Include="V3\Ora\OraFeljegyzesResponse.cs" />
|
||||
<Compile Include="V3\Ora\TanuloJelenletRequest.cs" />
|
||||
<Compile Include="V3\Ora\TanuloJelenletResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\MondatbankRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\MondatbankResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportTanuloRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportErtekelesRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportGondviseloResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportTanuloAdatokResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyokCsoportokResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\TanuloErtekelesekRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\TanuloErtekelesekResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\TanuloErtekelesMentesRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\TanuloForOsztalyCsoportErtekelesRequest.cs" />
|
||||
<Compile Include="V3\Ertekeles\TanuloMentessegResponse.cs" />
|
||||
<Compile Include="V3\HaziFeladat\HaziFeladatUpdateRequest.cs" />
|
||||
<Compile Include="V3\HaziFeladat\HaziFeladatCreateRequest.cs" />
|
||||
<Compile Include="V3\HaziFeladat\HaziFeladatResponse.cs" />
|
||||
<Compile Include="V3\Indexers\UidsCollection.cs" />
|
||||
<Compile Include="V3\Interfaces\IModelValidacio.cs" />
|
||||
<Compile Include="V3\Interfaces\IReadonlyUidRaw.cs" />
|
||||
<Compile Include="V3\Interfaces\IRequestUidFilter.cs" />
|
||||
<Compile Include="V3\Interfaces\IRequestUidsFilter.cs" />
|
||||
<Compile Include="V3\Interfaces\ISortable.cs" />
|
||||
<Compile Include="V3\Intezmeny\IntezmenyAdatok.cs" />
|
||||
<Compile Include="V3\Iskolaor\IskolaorResponse.cs" />
|
||||
<Compile Include="V3\Logic\UidLogic.cs" />
|
||||
<Compile Include="V3\Orarend\MulasztasForOraNaplozasRequest.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendElemSimplified.cs" />
|
||||
<Compile Include="V3\Orarend\TanuloForOraNaplozasListRequest.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendElemRequest.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendElemResponse.cs" />
|
||||
<Compile Include="V3\Orarend\OraNaplozasRequest.cs" />
|
||||
<Compile Include="V3\Orarend\OrarendRequest.cs" />
|
||||
<Compile Include="V3\Tanar\BeallitasokRequest.cs" />
|
||||
<Compile Include="V3\Tanar\TantargyFelosztasResponse.cs" />
|
||||
<Compile Include="V3\Tanar\BeallitasokResponse.cs" />
|
||||
<Compile Include="V3\Tanar\ProfilResponse.cs" />
|
||||
<Compile Include="V3\Orarend\TanuloJelenletRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportErtekelesekRequest.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportTanuloResponse.cs" />
|
||||
<Compile Include="V3\OsztalyCsoport\OsztalyCsoportErtekelesekResponse.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetItemListResponse.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetListResponse.cs" />
|
||||
<Compile Include="V3\Tanmenet\TanmenetRequest.cs" />
|
||||
<Compile Include="V3\Orarend\TanuloJelenletResponse.cs" />
|
||||
<Compile Include="V3\UniqueIdentifier\AdatszotarUid.cs" />
|
||||
<Compile Include="V3\UniqueIdentifier\IntezmenyUid.cs" />
|
||||
<Compile Include="V3\UniqueIdentifier\OrarendElemUid.cs" />
|
||||
<Compile Include="V3\Utility\Extensions.cs" />
|
||||
<Compile Include="V3\Utility\ValidationAttributes\EnumToDescriptionAttribute.cs" />
|
||||
<Compile Include="V3\Utility\ValidationAttributes\ShortDateTimeAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Kreta.BusinessLogic\Kreta.BusinessLogic.csproj">
|
||||
<Project>{8876fe0d-841e-422d-a5a0-59239cd98482}</Project>
|
||||
<Name>Kreta.BusinessLogic</Name>
|
||||
</ProjectReference>
|
||||
<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.Naplo.Dao\Kreta.Naplo.Dao.csproj">
|
||||
<Project>{0B9D719F-127A-4269-A05D-F65C055705DA}</Project>
|
||||
<Name>Kreta.Naplo.Dao</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Infrastrucure\Kreta.Naplo.Infrastrucure.csproj">
|
||||
<Project>{120e1b9d-daf1-4e96-a04e-9ac1dc551e8b}</Project>
|
||||
<Name>Kreta.Naplo.Infrastrucure</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="V3\Tanulo\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
93
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/ServiceContext.cs
Normal file
93
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/ServiceContext.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.Infrastructure;
|
||||
|
||||
namespace Kreta.Naplo.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// Service contect
|
||||
/// </summary>
|
||||
public class ServiceContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Institute code
|
||||
/// </summary>
|
||||
public string InstituteCode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// User identitier
|
||||
/// </summary>
|
||||
public int UserId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// User roles
|
||||
/// </summary>
|
||||
public IEnumerable<string> UserRoles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Base url
|
||||
/// </summary>
|
||||
public string BaseUrl { get; }
|
||||
public int SchoolYearId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Api key
|
||||
/// </summary>
|
||||
public string ApiKey { get; }
|
||||
|
||||
/// <summary>
|
||||
/// User agent
|
||||
/// </summary>
|
||||
public string UserAgent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Constuctor
|
||||
/// </summary>
|
||||
/// <param name="instituteCode">Institute code</param>
|
||||
/// <param name="userId">User Id</param>
|
||||
/// <param name="userRoles">User roles</param>
|
||||
/// <param name="baseUrl">Base url</param>
|
||||
/// <param name="apiKey">Api key</param>
|
||||
/// <param name="userAgent">User Agent</param>
|
||||
public ServiceContext(string instituteCode, int userId, IEnumerable<string> userRoles, string baseUrl, string apiKey, string userAgent, int schoolYearId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(instituteCode))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(InstituteCode)} cannot be null or white space");
|
||||
}
|
||||
|
||||
this.InstituteCode = instituteCode;
|
||||
|
||||
if (userId < Constants.MinimumPrimaryKeyValue)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(userId)} must be greater or equal than {Constants.MinimumPrimaryKeyValue}");
|
||||
}
|
||||
|
||||
if (schoolYearId < Constants.MinimumPrimaryKeyValue)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(schoolYearId)} must be greater or equal than {Constants.MinimumPrimaryKeyValue}");
|
||||
}
|
||||
this.SchoolYearId = schoolYearId;
|
||||
|
||||
this.UserId = userId;
|
||||
|
||||
this.UserRoles = userRoles ?? throw new ArgumentNullException(nameof(userRoles));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(baseUrl))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(baseUrl)} cannot be null or white space");
|
||||
}
|
||||
|
||||
this.BaseUrl = baseUrl;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(apiKey))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(apiKey)} cannot be null or white space");
|
||||
}
|
||||
|
||||
this.ApiKey = apiKey;
|
||||
|
||||
UserAgent = userAgent ?? throw new ArgumentNullException(nameof(userAgent));
|
||||
}
|
||||
}
|
||||
}
|
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/V2/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/V2/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Converter
|
||||
{
|
||||
/// <summary>
|
||||
/// This registers the converter functions called CoToModel and ModelToCo, but it's not mandatory to do.
|
||||
/// </summary>
|
||||
public static class EnumConverter
|
||||
{
|
||||
public static NaploEnumList CoToModel<T>(NaploEnumListCo<T> co) where T : struct, IConvertible => NaploEnumList.Create(co);
|
||||
public static NaploEnumListItem CoToModel(NaploEnumListItemCo co) => co;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanar;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Orarend;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanar;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanulo;
|
||||
using OrarendiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using OrarendiOraCo = Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using TanitasiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
using TanitasiOraCo = Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Converter
|
||||
{
|
||||
/// <summary>
|
||||
/// This registers the converter functions called CoToModel and ModelToCo, but it's not mandatory to do.
|
||||
/// </summary>
|
||||
public static class GetModelConverter
|
||||
{
|
||||
public static ProfilResponse CoToModel(ProfilResponseCo co) => co;
|
||||
private static IskolaorResponse CoToModel(IskolaorResponseCo co) => co;
|
||||
public static List<IskolaorResponse> CoToModel(List<IskolaorResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static OraGetResponse CoToModel(OraGetResponseCo co) => co;
|
||||
public static List<OraGetResponse> CoToModel(List<OraGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
public static TanuloResponse CoToModel(TanuloResponseCo co) => co;
|
||||
public static OsztalyTanuloiResponse CoToModel(OsztalyTanuloiResponseCo co) => co;
|
||||
private static MulasztasResponse CoToModel(MulasztasResponseCo co) => co;
|
||||
public static List<MulasztasResponse> CoToModel(List<MulasztasResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static FeljegyzesResponse CoToModel(FeljegyzesResponseCo co) => co;
|
||||
public static List<FeljegyzesResponse> CoToModel(List<FeljegyzesResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static FeljegyzesInfoResponse CoToModel(FeljegyzesInfoResponseCo co) => co;
|
||||
public static List<FeljegyzesInfoResponse> CoToModel(List<FeljegyzesInfoResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static TanmenetItemGetResponse CoToModel(TanmenetItemGetResponseCo co) => co;
|
||||
public static List<TanmenetItemGetResponse> CoToModel(List<TanmenetItemGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static TanmenetGetResponse CoToModel(TanmenetGetResponseCo co) => co;
|
||||
public static List<TanmenetGetResponse> CoToModel(List<TanmenetGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static OrarendiOra.JavasoltJelenletGetResponse CoToModel(OrarendiOraCo.JavasoltJelenletGetResponseCo co) => co;
|
||||
public static List<OrarendiOra.JavasoltJelenletGetResponse> CoToModel(List<OrarendiOraCo.JavasoltJelenletGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static OrarendiOra.JavasoltJelenletSzuroGetResponse CoToModel(OrarendiOraCo.JavasoltJelenletSzuroGetResponseCo co) => co;
|
||||
public static List<OrarendiOra.JavasoltJelenletSzuroGetResponse> CoToModel(List<OrarendiOraCo.JavasoltJelenletSzuroGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static TanitasiOra.JavasoltJelenletGetResponse CoToModel(TanitasiOraCo.JavasoltJelenletGetResponseCo co) => co;
|
||||
public static List<TanitasiOra.JavasoltJelenletGetResponse> CoToModel(List<TanitasiOraCo.JavasoltJelenletGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static TanitasiOra.JavasoltJelenletSzuroGetResponse CoToModel(TanitasiOraCo.JavasoltJelenletSzuroGetResponseCo co) => co;
|
||||
public static List<TanitasiOra.JavasoltJelenletSzuroGetResponse> CoToModel(List<TanitasiOraCo.JavasoltJelenletSzuroGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static JavasoltJelenletTemplateGetResponse CoToModel(JavasoltJelenletTemplateGetResponseCo co) => co;
|
||||
public static List<JavasoltJelenletTemplateGetResponse> CoToModel(List<JavasoltJelenletTemplateGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static JavasoltJelenletTemplateItemGetResponse CoToModel(JavasoltJelenletTemplateItemGetResponseCo co) => co;
|
||||
public static List<JavasoltJelenletTemplateItemGetResponse> CoToModel(List<JavasoltJelenletTemplateItemGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static OrarendiOra.JavasoltJelenletTanuloGetResponse CoToModel(OrarendiOraCo.JavasoltJelenletTanuloGetResponseCo co) => co;
|
||||
public static List<OrarendiOra.JavasoltJelenletTanuloGetResponse> CoToModel(List<OrarendiOraCo.JavasoltJelenletTanuloGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static TanitasiOra.JavasoltJelenletTanuloGetResponse CoToModel(TanitasiOraCo.JavasoltJelenletTanuloGetResponseCo co) => co;
|
||||
public static List<TanitasiOra.JavasoltJelenletTanuloGetResponse> CoToModel(List<TanitasiOraCo.JavasoltJelenletTanuloGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
public static FeltolthetoFajlokSzamaResponse CoToModel(FeltolthetoFajlokSzamaResponseCo co) => co;
|
||||
|
||||
private static NaploEnumListItem CoToModel(NaploEnumListItemCo co) => co;
|
||||
public static List<NaploEnumListItem> CoToModel(List<NaploEnumListItemCo> co) => co.ConvertAll(CoToModel);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Naplozas;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanulo;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Naplozas;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.OpenBoard;
|
||||
using OrarendiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using OrarendiOraCo = Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using TanitasiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
using TanitasiOraCo = Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Converter
|
||||
{
|
||||
/// <summary>
|
||||
/// This registers the converter functions called CoToModel and ModelToCo, but it's not mandatory to do.
|
||||
/// </summary>
|
||||
public static class PostModelConverter
|
||||
{
|
||||
#region Request
|
||||
public static TanuloForOraNaplozasRequestCo ModelToCo(TanuloForOraNaplozasRequest model) => model;
|
||||
public static List<TanuloForOraNaplozasRequestCo> ModelToCo(List<TanuloForOraNaplozasRequest> model) => model.ConvertAll(ModelToCo);
|
||||
public static OraNaplozasRequestCo ModelToCo(OraNaplozasRequest model) => model;
|
||||
public static List<OraNaplozasRequestCo> ModelToCo(List<OraNaplozasRequest> model) => model.ConvertAll(ModelToCo);
|
||||
public static OsztalyCsoportErtekelesRequestCo ModelToCo(OsztalyCsoportErtekelesRequest model) => model;
|
||||
public static List<OsztalyCsoportErtekelesRequestCo> ModelToCo(List<OsztalyCsoportErtekelesRequest> model) => model.ConvertAll(ModelToCo);
|
||||
private static TanuloForOsztalyCsoportErtekelesRequestCo ModelToCo(TanuloForOsztalyCsoportErtekelesRequest model) => model;
|
||||
public static List<TanuloForOsztalyCsoportErtekelesRequestCo> ModelToCo(List<TanuloForOsztalyCsoportErtekelesRequest> model) => model.ConvertAll(ModelToCo);
|
||||
private static TanmenetGetRequestCo ModelToCo(TanmenetGetRequest model) => model;
|
||||
public static List<TanmenetGetRequestCo> ModelToCo(List<TanmenetGetRequest> model) => model.ConvertAll(ModelToCo);
|
||||
public static FeltoltottFajlRequestCo ModelToCo(FeltoltottFajlRequest model) => model;
|
||||
public static FeltolthetoFajlokSzamaRequestCo ModelToCo(FeltolthetoFajlokSzamaRequest model) => model;
|
||||
public static ErtekelesGetRequestCo ModelToCo(ErtekelesGetRequest model) => model;
|
||||
|
||||
private static TanmenetKeyGetRequestCo ModelToCo(TanmenetKeyGetRequest model) => model;
|
||||
public static TanmenetKeyGetRequestCo[] ModelToCo(TanmenetKeyGetRequest[] model) => Array.ConvertAll(model, ModelToCo);
|
||||
private static OrarendiOraCo.JavasoltJelenletKeyGetRequestCo ModelToCo(OrarendiOra.JavasoltJelenletKeyGetRequest model) => model;
|
||||
public static OrarendiOraCo.JavasoltJelenletKeyGetRequestCo[] ModelToCo(OrarendiOra.JavasoltJelenletKeyGetRequest[] model) => Array.ConvertAll(model, ModelToCo);
|
||||
private static TanitasiOraCo.JavasoltJelenletKeyGetRequestCo ModelToCo(TanitasiOra.JavasoltJelenletKeyGetRequest model) => model;
|
||||
public static TanitasiOraCo.JavasoltJelenletKeyGetRequestCo[] ModelToCo(TanitasiOra.JavasoltJelenletKeyGetRequest[] model) => Array.ConvertAll(model, ModelToCo);
|
||||
|
||||
#endregion Request
|
||||
|
||||
#region Response
|
||||
private static OraNaplozasResponse CoToModel(OraNaplozasResponseCo co) => co;
|
||||
public static List<OraNaplozasResponse> CoToModel(List<OraNaplozasResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
private static ErtekelesResponse CoToModel(ErtekelesResponseCo co) => co;
|
||||
public static List<ErtekelesResponse> CoToModel(List<ErtekelesResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
public static FeltoltottFajlResponse CoToModel(FeltoltottFajlResponseCo co) => co;
|
||||
private static ErtekelesGetResponse CoToModel(ErtekelesGetResponseCo co) => co;
|
||||
public static List<ErtekelesGetResponse> CoToModel(List<ErtekelesGetResponseCo> co) => co.ConvertAll(CoToModel);
|
||||
#endregion Response
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Naplo.Domain.V2.Interface
|
||||
{
|
||||
public interface IGetRequest
|
||||
{
|
||||
string Hash { get; set; }
|
||||
}
|
||||
}
|
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/V2/Model/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/Naplo/Kreta.Naplo.Domain/V2/Model/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.CustomEnum
|
||||
{
|
||||
public class NaploEnum
|
||||
{
|
||||
public static implicit operator int(NaploEnum naploEnum) => naploEnum.Id;
|
||||
public static implicit operator int?(NaploEnum naploEnum) => naploEnum?.Id;
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
private NaploEnum() { }
|
||||
public static NaploEnum Create<T>(NaploEnumCo<T> co) where T : struct, IConvertible
|
||||
{
|
||||
if (co == null)
|
||||
return null;
|
||||
return new NaploEnum
|
||||
{
|
||||
Id = co.Id,
|
||||
Nev = co.Nev
|
||||
};
|
||||
}
|
||||
public static NaploEnumCo<T> Create<T>(NaploEnum model) where T : struct, IConvertible
|
||||
{
|
||||
if (model == null)
|
||||
return null;
|
||||
return new NaploEnumCo<T>(model.Id);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Naplo.Domain.V2.Model.Converter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.CustomEnum
|
||||
{
|
||||
public class NaploEnumList
|
||||
{
|
||||
public List<NaploEnumListItem> ElemLista { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns an NaploEnumList Instance that has been converted from NaploEnumListCO
|
||||
/// </summary>
|
||||
public static NaploEnumList Create<T>(NaploEnumListCo<T> co) where T : struct, IConvertible
|
||||
=> new NaploEnumList
|
||||
{
|
||||
ElemLista = co.ElemLista.ConvertAll(EnumConverter.CoToModel)
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.CustomEnum
|
||||
{
|
||||
public class NaploEnumListItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
|
||||
/// public string Leiras { get; set; }
|
||||
|
||||
public static implicit operator NaploEnumListItem(NaploEnumListItemCo co) => new NaploEnumListItem
|
||||
{
|
||||
Id = co.Id,
|
||||
/// TODO Nev = co.Nev
|
||||
Nev = co.Description /// TODO rename Leiras
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Enum;
|
||||
using Kreta.Enums.ManualEnums.WebApi.Naplo;
|
||||
using Kreta.Naplo.Domain.V2.Interface;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Enum
|
||||
{
|
||||
public class EnumRequest : IGetRequest
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public EngedelyezettEnumok EngedelyezettEnumName { get; set; }
|
||||
|
||||
public static implicit operator EnumRequestCo(EnumRequest model) => new EnumRequestCo
|
||||
{
|
||||
Hash = model.Hash,
|
||||
EngedelyezettEnum = (int)model.EngedelyezettEnumName
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.OpenBoard
|
||||
{
|
||||
public class FeltolthetoFajlokSzamaRequest
|
||||
{
|
||||
public int? OrarendiOraId { get; set; }
|
||||
public int? TanitasiOraId { get; set; }
|
||||
|
||||
public static implicit operator FeltolthetoFajlokSzamaRequestCo(FeltolthetoFajlokSzamaRequest model) => new FeltolthetoFajlokSzamaRequestCo
|
||||
{
|
||||
OrarendiOraId = model.OrarendiOraId,
|
||||
TanitasiOraId = model.TanitasiOraId
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard;
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.OpenBoard
|
||||
{
|
||||
public class FeltolthetoFajlokSzamaResponse
|
||||
{
|
||||
public int FeltolthetoFajlokSzama { get; set; }
|
||||
public ValidationException Exception { get; set; }
|
||||
|
||||
public static implicit operator FeltolthetoFajlokSzamaResponse(FeltolthetoFajlokSzamaResponseCo co) => new FeltolthetoFajlokSzamaResponse
|
||||
{
|
||||
FeltolthetoFajlokSzama = co.FeltolthetoFajlokSzama,
|
||||
Exception = co.Exception
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Naplo.Domain.V2.Interface;
|
||||
|
||||
public class JavasoltJelenletTemplateGetRequest : IGetRequest
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public TanoraAllapotaEnum OraAllapot { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletTemplateGetRequestCo(JavasoltJelenletTemplateGetRequest model) => new JavasoltJelenletTemplateGetRequestCo
|
||||
{
|
||||
Hash = model.Hash,
|
||||
OraAllapot = model.OraAllapot
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using static Kreta.Naplo.Domain.V2.Model.Converter.GetModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
public class JavasoltJelenletTemplateGetResponse
|
||||
{
|
||||
public int Prioritas { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
public List<JavasoltJelenletTemplateItemGetResponse> SzuroElemLista { get; set; }
|
||||
public static implicit operator JavasoltJelenletTemplateGetResponse(JavasoltJelenletTemplateGetResponseCo co) => new JavasoltJelenletTemplateGetResponse
|
||||
{
|
||||
Prioritas = co.Prioritas,
|
||||
Tipus = co.Tipus,
|
||||
SzuroElemLista = CoToModel(co.SzuroElemLista)
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
|
||||
public class JavasoltJelenletTemplateItemGetResponse
|
||||
{
|
||||
public bool IsDefault { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
public NaploEnum MulasztasTipusAdatszotar { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletTemplateItemGetResponse(JavasoltJelenletTemplateItemGetResponseCo co) => new JavasoltJelenletTemplateItemGetResponse
|
||||
{
|
||||
IsDefault = co.IsDefault,
|
||||
IsEnabled = co.IsEnabled,
|
||||
MulasztasTipusAdatszotar = NaploEnum.Create<MulasztasTipusEnum>(co.MulasztasTipusAdatszotar)
|
||||
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using static Kreta.Naplo.Domain.V2.Model.Converter.PostModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetRequest
|
||||
{
|
||||
public JavasoltJelenletKeyGetRequest[] Key { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletGetRequestCo(JavasoltJelenletGetRequest model) => new JavasoltJelenletGetRequestCo
|
||||
{
|
||||
Key = ModelToCo(model.Key)
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using static Kreta.Naplo.Domain.V2.Model.Converter.GetModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetResponse
|
||||
{
|
||||
public int OrarendiOraId { get; set; }
|
||||
public DateTime OraKezdetDatumaUtc { get; set; }
|
||||
public List<JavasoltJelenletTanuloGetResponse> TanuloLista { get; set; }
|
||||
public static implicit operator JavasoltJelenletGetResponse(JavasoltJelenletGetResponseCo co) => new JavasoltJelenletGetResponse
|
||||
{
|
||||
OrarendiOraId = co.OrarendiOraId,
|
||||
OraKezdetDatumaUtc = co.OraKezdetDatuma.ToUniversalTime(),
|
||||
TanuloLista = CoToModel(co.TanuloLista)
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
|
||||
public class JavasoltJelenletKeyGetRequest
|
||||
{
|
||||
public DateTime OraKezdetDatumaUtc { get; set; }
|
||||
|
||||
public DateTime OraVegDatumaUtc { get; set; }
|
||||
|
||||
public int OrarendiOraId { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletKeyGetRequestCo(JavasoltJelenletKeyGetRequest model) => new JavasoltJelenletKeyGetRequestCo
|
||||
{
|
||||
OrarendiOraId = model.OrarendiOraId,
|
||||
OraKezdetDatuma = model.OraKezdetDatumaUtc,
|
||||
OraVegDatuma = model.OraVegDatumaUtc
|
||||
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public class JavasoltJelenletSzuroGetResponse
|
||||
{
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletSzuroGetResponse(JavasoltJelenletSzuroGetResponseCo co) => new JavasoltJelenletSzuroGetResponse
|
||||
{
|
||||
Megjegyzes = co.Megjegyzes,
|
||||
Tipus = co.Tipus
|
||||
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using static Kreta.Naplo.Domain.V2.Model.Converter.GetModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletTanuloGetResponse
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
public List<JavasoltJelenletSzuroGetResponse> JavasoltJelenletTemplateTipusSzuroLista { get; set; }
|
||||
public static implicit operator JavasoltJelenletTanuloGetResponse(JavasoltJelenletTanuloGetResponseCo co) => new JavasoltJelenletTanuloGetResponse
|
||||
{
|
||||
TanuloId = co.TanuloId,
|
||||
JavasoltJelenletTemplateTipusSzuroLista = CoToModel(co.JavasoltJelenletTemplateTipusSzuroLista.Cast<JavasoltJelenletSzuroGetResponseCo>().ToList())
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
using static Kreta.Naplo.Domain.V2.Model.Converter.PostModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetRequest
|
||||
{
|
||||
public JavasoltJelenletKeyGetRequest[] Key { get; set; }
|
||||
|
||||
public static implicit operator JavasoltJelenletGetRequestCo(JavasoltJelenletGetRequest model) => new JavasoltJelenletGetRequestCo
|
||||
{
|
||||
Key = ModelToCo(model.Key)
|
||||
};
|
||||
}
|
||||
}
|
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