示例#1
0
        public static PartOfItem ConvertFromDTO(PartOfItemDTO pd)
        {
            PartOfItem p = new PartOfItem();

            p.PartOfItemId = pd.PartOfItemId;
            p.ItemId       = pd.ItemId;
            p.Name         = pd.Name;
            return(p);
        }
示例#2
0
        public static PartOfItemDTO ConvertToDTO(PartOfItem p)
        {
            PartOfItemDTO pd = new PartOfItemDTO();

            pd.PartOfItemId = p.PartOfItemId;
            pd.ItemId       = p.ItemId;
            pd.Name         = p.Name;
            return(pd);
        }
示例#3
0
        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);
        }