using System; using System.Collections.Generic; using Kreta.BusinessLogic.HelperClasses; namespace Kreta.Web.Models { public class EgyhaztartasbanElokModel { public List Sorok { get; set; } = new List() { }; public EgyhaztartasbanElokCo ConvertToCo() { var co = new EgyhaztartasbanElokCo(); var listCo = new List(); 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; } } }