/// <summary> /// Find an address of a customer. /// </summary> /// <param name="accountID"></param> /// <returns></returns> public AddressDTO FindAddress(int accountID) { AccountDTO customer = new AccountDTO(); AddressDTO address = new AddressDTO(); customer = AB.FindBy(accountID); if (customer != null) { CityDTO city = new CityDTO(); address = DB.FindBy(customer.GetAddress().GetID()); city = CB.FindBy(address.GetCity().GetId()); address.SetCity(city); Debug.Print("AddressBL: /FindAddress/ " + address.GetID()); Debug.Print("AddressBL: /StreetName/ " + address.GetStreetName()); Debug.Print("AddressBL: /StreetNo/ " + address.GetStreetNo()); Debug.Print("AddressBL: /CityName/ " + address.GetCity().GetCity()); } else { throw new EmptyRowException("No result found."); } return(address); }
public void SetCustomer(AccountDTO customer) { this.customer = customer; }
public InvoiceDTO(byte id, AccountDTO customer, List <ProductSelectionDTO> products, ShippmentDTO shipping, byte totalQuantity, decimal totalShippingCost, decimal totalTaxes, decimal totalAmount, DateTime orderDate, DateTime paymentDate, string email, int status) : this(id, customer, products, shipping, totalQuantity, totalShippingCost, totalTaxes, totalAmount, orderDate, paymentDate, email) { paymentStatus = status; }