Пример #1
0
        private AddressViewModel MapAddress(OrderAddress address)
        {
            var addressModel = new AddressViewModel();

            addressModel.FirstName         = address.FirstName;
            addressModel.EmailAddress      = address.EmailAddress;
            addressModel.LastName          = address.LastName;
            addressModel.PhoneNumber       = address.PhoneNumber;
            addressModel.MobilePhoneNumber = address.MobilePhoneNumber;
            addressModel.Line1             = address.Line1;
            addressModel.Line2             = address.Line2;
            addressModel.PostalCode        = address.PostalCode;
            addressModel.City        = address.City;
            addressModel.State       = address.State;
            addressModel.Attention   = address.Attention;
            addressModel.CompanyName = address.CompanyName;
            addressModel.CountryName = address.Country.Name;

            return(addressModel);
        }
Пример #2
0
 public AddressDetailsViewModel()
 {
     ShippingAddress    = new AddressViewModel();
     BillingAddress     = new AddressViewModel();
     AvailableCountries = new List <SelectListItem>();
 }