Пример #1
0
        public static DescriptionOfItemDTO ConvertToDTO(DescriptionOfItem d)
        {
            DescriptionOfItemDTO dd = new DescriptionOfItemDTO();

            dd.FieldOfItemId = d.DescriptionOfItemId;
            dd.ItemId        = d.ItemId;
            dd.FieldName     = d.FieldName;
            return(dd);
        }
Пример #2
0
        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);
        }
Пример #3
0
        public static List <DescriptionOfItem> ConvertFromListOfDTO(List <DescriptionOfItemDTO> ldd)
        {
            List <DescriptionOfItem> ld = new List <DescriptionOfItem>();

            for (int i = 0; i < ldd.LongCount(); i++)
            {
                DescriptionOfItem d = new DescriptionOfItem();
                d.DescriptionOfItemId = mone;
                d.ItemId        = ldd[i].ItemId;
                d.FieldName     = ldd[i].FieldName;
                d.KindOfFieldId = 2;
                ld.Add(d);
                mone++;
            }
            return(ld);
        }