public static DescriptionOfItemDTO ConvertToDTO(DescriptionOfItem d) { DescriptionOfItemDTO dd = new DescriptionOfItemDTO(); dd.FieldOfItemId = d.DescriptionOfItemId; dd.ItemId = d.ItemId; dd.FieldName = d.FieldName; return(dd); }
public static DescriptionOfItem ConvertFromDTO(DescriptionOfItemDTO dd) { DescriptionOfItem d = new DescriptionOfItem(); d.DescriptionOfItemId = mone; d.ItemId = dd.ItemId; d.FieldName = dd.FieldName; d.KindOfFieldId = 2; mone++; data.DescriptionOfItem.Add(d); return(d); }
public static List <DescriptionOfItemDTO> ConvertToListOfDTO(List <DescriptionOfItem> ld) { List <DescriptionOfItemDTO> ldd = new List <DescriptionOfItemDTO>(); for (int i = 0; i < ld.LongCount(); i++) { DescriptionOfItemDTO dd = new DescriptionOfItemDTO(); dd.FieldOfItemId = ld[i].DescriptionOfItemId; dd.ItemId = ld[i].ItemId; dd.FieldName = ld[i].FieldName; ldd.Add(dd); } return(ldd); }