34 lines
1.8 KiB
C#
34 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using Kreta.BusinessLogic.Classes.AsposeHelpers;
|
|
|
|
namespace Kreta.BusinessLogic.HelperClasses.MulasztasiErtesitokCOs
|
|
{
|
|
public class MulasztasiErtesitoCo
|
|
{
|
|
public MulasztasiErtesitoCo(DataSet ds, AsposeDocumentParameters parameters)
|
|
{
|
|
_mulasztasFejCoList = ds.Tables["MulasztasFej"].AsEnumerable().Select(row => new MulasztasFejCo(row)).ToList();
|
|
_mulasztasAdatCoList = ds.Tables["MulasztasAdat"].AsEnumerable().Select(row => new MulasztasAdatCo(row)).ToList();
|
|
_gondviseloAdatokCoList = ds.Tables["GondviseloAdatok"].AsEnumerable().Select(row => new GondviseloAdatokCo(row)).ToList();
|
|
|
|
TanuloMulasztasErtesitoDictionary = new Dictionary<(int, int), TanuloMulasztasErtesitoCo>();
|
|
foreach (var mulasztasFejCo in _mulasztasFejCoList)
|
|
{
|
|
TanuloMulasztasErtesitoDictionary.Add((mulasztasFejCo.TanuloId, mulasztasFejCo.TanuloCsoportId), new TanuloMulasztasErtesitoCo
|
|
{
|
|
MulasztasFej = mulasztasFejCo,
|
|
MulasztasAdatList = _mulasztasAdatCoList.Where(x => x.TanuloId == mulasztasFejCo.TanuloId && x.TanuloCsoportId == mulasztasFejCo.TanuloCsoportId).ToList(),
|
|
GondviseloAdatokList = _gondviseloAdatokCoList.Where(x => x.TanuloId == mulasztasFejCo.TanuloId && x.TanuloCsoportId == mulasztasFejCo.TanuloCsoportId).ToList(),
|
|
});
|
|
}
|
|
}
|
|
|
|
private readonly List<MulasztasFejCo> _mulasztasFejCoList;
|
|
private readonly List<MulasztasAdatCo> _mulasztasAdatCoList;
|
|
private readonly List<GondviseloAdatokCo> _gondviseloAdatokCoList;
|
|
|
|
public Dictionary<(int, int), TanuloMulasztasErtesitoCo> TanuloMulasztasErtesitoDictionary { get; set; }
|
|
}
|
|
}
|