예제 #1
0
        public static Listino convertToListino(ListinoDTO lDTO)
        {
            Listino l = new Listino();

            l.ListinoID = lDTO.id;
            l.Anno      = lDTO.anno;
            l.Nome      = lDTO.nomeListino;
            if (lDTO.installer != null)
            {
                l.Installer = CustomerConverter.convertToCustomer(lDTO.installer);
            }
            if (lDTO.idManufacturer != null)
            {
                l.Manufacturer = CustomerConverter.convertToCustomer(lDTO.idManufacturer);
            }
            return(l);
        }
예제 #2
0
        public static ListinoDTO convertToDTO(Listino l)
        {
            ListinoDTO lDTO = new ListinoDTO();

            lDTO.id          = l.ListinoID;
            lDTO.anno        = l.Anno;
            lDTO.nomeListino = l.Nome;
            if (l.Installer != null)
            {
                lDTO.installer = CustomerConverter.convertToDto(l.Installer);
            }
            if (l.Manufacturer != null)
            {
                lDTO.idManufacturer = CustomerConverter.convertToDto(l.Manufacturer);
            }
            return(lDTO);
        }