kreta/KretaWeb/Models/EgyhaztartasbanElokModel.cs
2024-03-13 00:33:46 +01:00

53 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using Kreta.BusinessLogic.HelperClasses;
namespace Kreta.Web.Models
{
public class EgyhaztartasbanElokModel
{
public List<EgyhaztartasbanElokRowModel> Sorok { get; set; } = new List<EgyhaztartasbanElokRowModel>() { };
public EgyhaztartasbanElokCo ConvertToCo()
{
var co = new EgyhaztartasbanElokCo();
var listCo = new List<EgyhaztartasbanElokRowCo>();
foreach (var item in this.Sorok)
{
listCo.Add(new EgyhaztartasbanElokRowCo()
{
ID = item.ID,
Nev = item.Nev,
AnyjaNev = item.AnyjaNev,
SzuletesiIdo = item.SzuletesiIdo,
SzuletesiHely = item.SzuletesiHely,
Taj = item.Taj,
RokonsagiFok = item.RokonsagiFok,
Email = item.Email,
Telefon = item.Telefon,
isDeleted = item.isDeleted
});
}
co.Sorok = listCo;
return co;
}
}
public class EgyhaztartasbanElokRowModel
{
public int? ID { get; set; }
public string Nev { get; set; }
public string AnyjaNev { get; set; }
public DateTime? SzuletesiIdo { get; set; }
public string SzuletesiHely { get; set; }
public string Taj { get; set; }
public int? RokonsagiFok { get; set; }
public string Email { get; set; }
public string Telefon { get; set; }
public int RowNumber { get; set; }
public bool isDeleted { get; set; }
}
}