コード例 #1
0
 public static Customer GetCustomer(string customerId)
 {            
     try
     {
         CustomerDAO customerDAO = new CustomerDAO();
         return customerDAO.GetCustomer(customerId);                
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetCustomerException, ex);
     }
 }                
コード例 #2
0
 public static void UpdateCustomer(Customer customer)
 {            
     try
     {
         CustomerDAO customerDAO = new CustomerDAO();
         customerDAO.UpdateCustomer(customer);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessUpdateCustomerException, ex);
     }
 }        
コード例 #3
0
 public static CustomerCollection GetCustomerList(CustomerColumns orderBy, string orderDirection)
 {            
     try
     {
         CustomerDAO customerDAO = new CustomerDAO();
         return customerDAO.GetCustomerList(orderBy, orderDirection);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetCustomerListException, ex);
     }
 }        
コード例 #4
0
 public static CustomerCollection GetCustomerListByBirthDay()
 {
     try
     {
         CustomerDAO customerDAO = new CustomerDAO();
         return customerDAO.GetCustomerList(CustomerColumns.CustomerId, "ASC", DateTime.Now);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetCustomerListException, ex);
     }
 }
コード例 #5
0
 public static CustomerCollection GetCustomerListSearch(int TypeId, string CustomerId, string CustomerName, string CustomerNameViet, string Email,string mobile, CustomerColumns orderBy, string orderDirection, int page, int pageSize, out int totalRecords)
 {
     try
     {
         CustomerDAO customerDAO = new CustomerDAO();
         return customerDAO.GetCustomerListSearch(TypeId, CustomerId, CustomerName, CustomerNameViet, Email,mobile, orderBy, orderDirection, page, pageSize, out totalRecords);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetCustomerListException, ex);
     }
 }