init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
57
KretaWeb/Areas/Intezmeny/Logic/FaliujsagLogic.cs
Normal file
57
KretaWeb/Areas/Intezmeny/Logic/FaliujsagLogic.cs
Normal file
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Web.Areas.Intezmeny.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
|
||||
namespace Kreta.Web.Areas.Intezmeny.Logic
|
||||
{
|
||||
public class FaliujsagLogic
|
||||
{
|
||||
public FaliujsagModel ConvertFaliujsagDataTableToList(DataTable dt)
|
||||
{
|
||||
List<FaliujsagElem> esemenyek = new List<FaliujsagElem>();
|
||||
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
FaliujsagElem elem = new FaliujsagElem();
|
||||
string nev = dr["Bejegyzo"].ToString();
|
||||
elem.Nev = nev;
|
||||
elem.Munkakor = dr["Munkakor_DNAME"].ToString();
|
||||
|
||||
var helper = new FelhasznaloHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
|
||||
if (dr["ProfilKep"] != DBNull.Value)
|
||||
{
|
||||
byte[] bytes = dr["ProfilKep"] as byte[];
|
||||
if (bytes != null)
|
||||
{
|
||||
elem.KepEleresiUtja = helper.ProfileKep(bytes);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
elem.KepEleresiUtja = helper.AlapertelmezettProfileKep();
|
||||
}
|
||||
|
||||
elem.Idopont = Convert.ToDateTime(dr["Erv_kezd"]);
|
||||
elem.EsemenyCime = dr["Cim"].ToString();
|
||||
string szovegWeb = SDAConvert.ToString(dr["SzovegWeb"]);
|
||||
if (nev == Core.Constants.SpecialUserName.Rendszeruzenet && !string.IsNullOrWhiteSpace(szovegWeb))
|
||||
{
|
||||
elem.EsemenySzovege = szovegWeb;
|
||||
}
|
||||
else
|
||||
{
|
||||
elem.EsemenySzovege = dr["Szoveg"].ToString();
|
||||
}
|
||||
|
||||
esemenyek.Add(elem);
|
||||
}
|
||||
|
||||
return new FaliujsagModel() { FaliujsagElemek = esemenyek };
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue