init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
60
Kreta.BusinessLogic/Helpers/KirExportHelper2.cs
Normal file
60
Kreta.BusinessLogic/Helpers/KirExportHelper2.cs
Normal file
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using Kreta.Core.KIR.Domain.Model;
|
||||
using Kreta.Core.KIR.Domain.Model.KirImport;
|
||||
using Kreta.Core.KIR.Domain.Model.KirImport.Tanulo.Modositas;
|
||||
using Kreta.Core.KIR.Factory.Interface;
|
||||
using Kreta.Core.KIR.Service.Interface;
|
||||
|
||||
namespace Kreta.BusinessLogic.Helpers
|
||||
{
|
||||
public class KirExportHelper2
|
||||
{
|
||||
private IKir2Service Kir2Service { get; }
|
||||
private string IARAzonosito { get; }
|
||||
|
||||
public KirExportHelper2(IKir2ServiceFactory kir2ServiceFactory, AuthHeaderModel authHeaderModel, string omKod, string intezmenyAzonosito)
|
||||
{
|
||||
if (kir2ServiceFactory == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(kir2ServiceFactory));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(omKod))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(omKod));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(intezmenyAzonosito))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(intezmenyAzonosito));
|
||||
}
|
||||
|
||||
//IARAzonosito = $"KRE{omKod}-{intezmenyAzonosito.Substring(10)}";
|
||||
//Teszthez
|
||||
IARAzonosito = "KRE027207-001";
|
||||
Kir2Service = kir2ServiceFactory.GetKir2Service(authHeaderModel ?? throw new ArgumentNullException(nameof(authHeaderModel)));
|
||||
}
|
||||
|
||||
public (BekuldesResponseModel response, string kontenerId) TanuloAdatModositasKerelemBekuldese(TanuloModositasok tanuloModositasok)
|
||||
{
|
||||
BekuldesRequestModel bekuldesRequestModel = GetBekuldesRequestModel();
|
||||
|
||||
return (Kir2Service.TanuloAdatModositasKerelemBekuldese(bekuldesRequestModel, tanuloModositasok), bekuldesRequestModel.KontenerId);
|
||||
}
|
||||
|
||||
public (BekuldesResponseModel response, string guid) TanuloJogviszonyModositasKerelemBekuldese(TanuloModositasok tanuloModositasok)
|
||||
{
|
||||
BekuldesRequestModel bekuldesRequestModel = GetBekuldesRequestModel();
|
||||
|
||||
return (Kir2Service.TanuloJogviszonyModositasKerelemBekuldese(bekuldesRequestModel, tanuloModositasok), bekuldesRequestModel.KontenerId);
|
||||
}
|
||||
|
||||
private BekuldesRequestModel GetBekuldesRequestModel()
|
||||
=> new BekuldesRequestModel
|
||||
{
|
||||
IARAzonosito = IARAzonosito,
|
||||
Idopont = DateTime.Now,
|
||||
KontenerId = Guid.NewGuid().ToString("N").Remove(25)
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue