コード例 #1
0
        public Customer getCustomer(string id)
        {
            try
            {
                customerDAO = new CustomerDAO();
                Customer customer = customerDAO.getCustomer(id);

                AddressDAO addressDAO = new AddressDAO();
                customer.address = addressDAO.getCustomerAddress(id);

                return customer;
            }
            catch (BusinessException e)
            {
                throw e;
            }
            catch (PlatformException e)
            {
                throw e;
            }
            catch (Exception e)
            {
                throw new PlatformException(e.Message);
            }
        }
コード例 #2
0
 public string createCustomer(Customer customer)
 {
     try
     {
         customerDAO = new CustomerDAO();
         return customerDAO.createCustomer(customer);
     }
     catch (BusinessException e)
     {
         throw e;
     }
     catch (PlatformException e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw new PlatformException(e.Message);
     }
 }
コード例 #3
0
 public string deleteCustomer(string id)
 {
     try
     {
         customerDAO = new CustomerDAO();
         return customerDAO.deleteCustomer(id);
     }
     catch (BusinessException e)
     {
         throw e;
     }
     catch (PlatformException e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw new PlatformException(e.Message);
     }
 }
コード例 #4
0
 public IList<Customer> getCustomers(int pagina, int regPagina)
 {
     try
     {
         customerDAO = new CustomerDAO();
         return customerDAO.getCustomers(pagina, regPagina);
     }
     catch (BusinessException e)
     {
         throw e;
     }
     catch (PlatformException e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw new PlatformException(e.Message);
     }
 }