init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Intezmeny.Hetirend;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.Hetirend
|
||||
{
|
||||
internal static class HetirendSubqueries
|
||||
{
|
||||
internal static HashSet<HetirendListResponse> ListHetirend(DefaultConnectionParameters dcp, HetirendListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
var response = new HashSet<HetirendListResponse>(new HetirendListResponse());
|
||||
|
||||
var naptariHetAndOrarendOverlapFilter = new NaptariHetAndOrarendOverlapFilter
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = request.OrarendElemKezdoNapDatuma,
|
||||
OrarendElemVegNapDatuma = request.OrarendElemVegNapDatuma
|
||||
};
|
||||
|
||||
var hetirendElemek = dcp.DalHandler.NaptariHet().GetNaptariHetList(dcp.TanevId, naptariHetAndOrarendOverlapFilter).Tables[0];
|
||||
|
||||
foreach (var hetirendElem in hetirendElemek.ToDaoList<OrarendiResponseDao>())
|
||||
{
|
||||
if (!response.Add(new HetirendListResponse
|
||||
{
|
||||
Uid = new HetirendUid(hetirendElem.Id),
|
||||
HetSorszama = hetirendElem.HetSorszama,
|
||||
KezdoNapDatuma = hetirendElem.KezdoNapDatuma,
|
||||
VegNapDatuma = hetirendElem.VegNapDatuma,
|
||||
Tipus = new Adatszotar<HetiRendTipusEnum>(hetirendElem.HetirendId ?? (int)HetiRendTipusEnum.MindegyikHet, hetirendElem.HetirendNev)
|
||||
}))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue