public static PartOfItem ConvertFromDTO(PartOfItemDTO pd) { PartOfItem p = new PartOfItem(); p.PartOfItemId = pd.PartOfItemId; p.ItemId = pd.ItemId; p.Name = pd.Name; return(p); }
public static PartOfItemDTO ConvertToDTO(PartOfItem p) { PartOfItemDTO pd = new PartOfItemDTO(); pd.PartOfItemId = p.PartOfItemId; pd.ItemId = p.ItemId; pd.Name = p.Name; return(pd); }
public static List <PartOfItemDTO> ConvertToListOfDTO(List <PartOfItem> lp) { List <PartOfItemDTO> lpd = new List <PartOfItemDTO>(); for (int i = 0; i < lp.LongCount(); i++) { PartOfItemDTO pd = new PartOfItemDTO(); pd.PartOfItemId = lp[i].PartOfItemId; pd.ItemId = lp[i].ItemId; pd.Name = lp[i].Name; lpd.Add(pd); } return(lpd); }