init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
65
Kreta.BusinessLogic/Helpers/NaptariHetHelper.cs
Normal file
65
Kreta.BusinessLogic/Helpers/NaptariHetHelper.cs
Normal file
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
|
||||
namespace Kreta.BusinessLogic.Helpers
|
||||
{
|
||||
public class NaptariHetHelper : LogicBase
|
||||
{
|
||||
public NaptariHetHelper(IConnectionType connectionType) : base(connectionType) { }
|
||||
|
||||
public DataSet GetNaptariHetList()
|
||||
=> Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
return h.NaptariHet(GridParameters).GetNaptariHetList(TanevId);
|
||||
});
|
||||
|
||||
public DataSet GetHetirendHelyettesitesList(Dictionary<int, int?> modifiedHetirendList)
|
||||
=> Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
return h.NaptariHet(GridParameters).GetHetirendHelyettesitesList(TanevId, modifiedHetirendList);
|
||||
});
|
||||
|
||||
public void SetHetirend(Dictionary<int, int?> modifiedHetirendList)
|
||||
{
|
||||
Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
var dal = h.NaptariHet();
|
||||
dal.DeleteHelyettesites(TanevId, modifiedHetirendList);
|
||||
|
||||
var szunetIds = modifiedHetirendList.Where(x => !x.Value.HasValue).Select(x => x.Key).ToList();
|
||||
dal.DeleteHetesek(TanevId, szunetIds, FelhasznaloId);
|
||||
|
||||
dal.SetHetirend(modifiedHetirendList, IntezmenyId, TanevId);
|
||||
|
||||
var helper = new AdatszotarHelper(new DalHandlerConnectionType(ConnectionType, h));
|
||||
|
||||
helper.GenerateNaptariNapok();
|
||||
});
|
||||
}
|
||||
|
||||
public List<int> GetSortedHetirendIdList()
|
||||
{
|
||||
return Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
return h.NaptariHet().GetSortedHetirendIdList(TanevId);
|
||||
});
|
||||
}
|
||||
|
||||
public int GetNaptariHetSorszamByDate(DateTime datum)
|
||||
=> Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
return h.NaptariHet(GridParameters).GetNaptariHetSorszamByDate(datum, TanevId);
|
||||
});
|
||||
|
||||
public int? GetNaptariHetHetirendByDate(DateTime datum)
|
||||
=> Dal.CustomConnection.Run(ConnectionType, h =>
|
||||
{
|
||||
return h.NaptariHet(GridParameters).GetNaptariHetHetirendByDate(datum, TanevId);
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue