init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Eugyintezes.BusinessLogic.Interface;
|
||||
|
||||
namespace Kreta.Eugyintezes.BusinessLogic
|
||||
{
|
||||
internal class Service
|
||||
{
|
||||
protected IServiceContext ServiceContext { get; }
|
||||
|
||||
private int tanevId;
|
||||
private int intezmenyId;
|
||||
|
||||
protected int TanevId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (tanevId <= 0)
|
||||
{
|
||||
tanevId = GetTanevId();
|
||||
}
|
||||
|
||||
return tanevId;
|
||||
}
|
||||
}
|
||||
|
||||
protected int IntezmenyId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (intezmenyId <= 0)
|
||||
{
|
||||
intezmenyId = GetIntezmenyId();
|
||||
}
|
||||
|
||||
return intezmenyId;
|
||||
}
|
||||
}
|
||||
|
||||
private int GetTanevId()
|
||||
{
|
||||
return Dal.MobileConnection.Run(ServiceContext.IntezmenyAzonosito, null, h => h.TanevDal().GetAktivTanevId());
|
||||
}
|
||||
private int GetIntezmenyId()
|
||||
{
|
||||
var azonosito = ServiceContext.IntezmenyAzonosito;
|
||||
return Dal.MobileConnection.Run(ServiceContext.IntezmenyAzonosito, null, h => h.IntezmenyDal().GetIntezmenyIdByAzonosito(azonosito).Value);
|
||||
}
|
||||
|
||||
public Service(IServiceContext serviceContext)
|
||||
{
|
||||
this.ServiceContext = serviceContext ?? throw new ArgumentNullException(nameof(serviceContext));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue