示例#1
0
        public TodoPagoAddressBookDto findTodoPagoAddressBookRecord(string hash)
        {
            TodoPagoAddressBookDto result = null;

            if (!String.IsNullOrEmpty(hash))
            {
                result = this.toDto(_todoPagoAddressBookService.findByHash(hash));
            }

            return(result);
        }
示例#2
0
        public TodoPagoAddressBookRecord toRecord(TodoPagoAddressBookDto dto)
        {
            TodoPagoAddressBookRecord record = new TodoPagoAddressBookRecord();

            record.hash    = dto.hash;
            record.street  = dto.street;
            record.city    = dto.city;
            record.state   = dto.state;
            record.country = dto.country;
            record.postal  = dto.postal;

            return(record);
        }
示例#3
0
        public void updateTodoPagoAddressBookRecord(TodoPagoAddressBookDto todoPagoAddressBookDto)
        {
            TodoPagoAddressBookRecord record = _todoPagoAddressBookService.findByHash(todoPagoAddressBookDto.hash);

            if (record != null)
            {
                record.street  = todoPagoAddressBookDto.street;
                record.city    = todoPagoAddressBookDto.city;
                record.state   = todoPagoAddressBookDto.state;
                record.country = todoPagoAddressBookDto.country;
                record.postal  = todoPagoAddressBookDto.postal;

                _todoPagoAddressBookService.updateTodoPagoAddressBookRecord(record);
            }
        }
示例#4
0
        public TodoPagoAddressBookDto toDto(TodoPagoAddressBookRecord record)
        {
            TodoPagoAddressBookDto dto = new TodoPagoAddressBookDto();

            if (record != null)
            {
                dto.hash    = record.hash;
                dto.street  = record.street;
                dto.city    = record.city;
                dto.state   = record.state;
                dto.country = record.country;
                dto.postal  = record.postal;
            }

            return(dto);
        }
示例#5
0
 public void insertTodoPagoAddressBookRecord(TodoPagoAddressBookDto todoPagoAddressBookDto)
 {
     _todoPagoAddressBookService.insertTodoPagoAddressBookRecord(this.toRecord(todoPagoAddressBookDto));
 }