init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
45
Kreta.BusinessLogic/Helpers/TanuloCsoportHelper.cs
Normal file
45
Kreta.BusinessLogic/Helpers/TanuloCsoportHelper.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Helpers
|
||||
{
|
||||
public class TanuloCsoportHelper : LogicBase
|
||||
{
|
||||
public TanuloCsoportHelper(IConnectionType connectionType) : base(connectionType) { }
|
||||
|
||||
public List<TanuloCsoportItemCo> GetTanuloCsoportCoList()
|
||||
{
|
||||
DataSet dataSet = Dal.CustomConnection.Run(ConnectionType, dalHandler => dalHandler.TanuloCsoport().GetTanuloCsoportDataSet(TanevId));
|
||||
|
||||
var result = new List<TanuloCsoportItemCo>();
|
||||
foreach (DataRow dataRow in dataSet.Tables[0].Rows)
|
||||
{
|
||||
var item = new TanuloCsoportItemCo(dataRow);
|
||||
result.Add(item);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Dictionary<OktNevelesiKategoriaEnum, int> GetJogviszonyLimits()
|
||||
{
|
||||
var result = new Dictionary<OktNevelesiKategoriaEnum, int>();
|
||||
|
||||
var ds = Dal.CustomConnection.Run(ConnectionType, dalHandler => dalHandler.TanuloCsoport().GetJogviszonyLimitList(TanevId));
|
||||
var jogviszonyDbList = ds.Tables[0].AsEnumerable();
|
||||
foreach (int enumValue in Enum.GetValues(typeof(OktNevelesiKategoriaEnum)))
|
||||
{
|
||||
var limit = jogviszonyDbList.FirstOrDefault(r => r.Field<int>("ID") == enumValue)?.Field<int>("C_FELADATCSOPORTTANULOOSZTALYK") ?? 1;
|
||||
result.Add((OktNevelesiKategoriaEnum)enumValue, limit);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue