Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
        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);
        }