Example #1
0
 public List<AddressType> GetAddressTypes()
 {
     List<AddressType> addressTypes = new List<AddressType>();
     try
     {
         addressTypes = _dbManager.GetAddressTypes();
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return addressTypes;
 }
Example #2
0
 public bool DeleteCustomer(string customerNo)
 {
     bool retVal = false;
     try
     {
         retVal = _dbManager.DeleteCustomer(customerNo);
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return retVal;
 }
Example #3
0
        public List<Contact> GetContacts(int seqPartyId)
        {
            List<Contact> contacts = new List<Contact>();
            try
            {
                contacts = _dbManager.GetContacts(seqPartyId);
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return contacts;
        }
Example #4
0
        public List<Customer> SearchCustomers(CustomerSearchCriteria criteria)
        {
            List<Customer> customers = new List<Customer>();
            try
            {
                customers = _dbManager.SearchCustomers(criteria);
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return customers;
        }
Example #5
0
        public User Login(User user)
        {
            try
            {
                user = _dbManager.Login(user);
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return user;
        }
Example #6
0
 public List<TaxIndicator> GetTaxIndicators()
 {
     List<TaxIndicator> taxIndicators = new List<TaxIndicator>();
     try
     {
         taxIndicators = _dbManager.GetTaxIndicators();
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return taxIndicators;
 }
Example #7
0
 public List<RecentCustomerSearchResult> GetRecentCustSearchResults(int seqPartyId)
 {
     List<RecentCustomerSearchResult> results = new List<RecentCustomerSearchResult>();
     try
     {
         results = _dbManager.GetRecentCustSearchResults(seqPartyId);
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return results;
 }
Example #8
0
 public List<PayMethod> GetPaymentMethods()
 {
     List<PayMethod> payMethods = new List<PayMethod>();
     try
     {
         payMethods = _dbManager.GetPaymentMethods();
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return payMethods;
 }
Example #9
0
        public List<Priority> GetPriorities()
        {
            List<Priority> priorities = new List<Priority>();
            try
            {
                priorities = _dbManager.GetPriorities();
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return priorities;
        }
Example #10
0
 public List<InvoiceDelivery> GetInvoiceDeliveries()
 {
     List<InvoiceDelivery> invoiceDeliveries = new List<InvoiceDelivery>();
     try
     {
         invoiceDeliveries = _dbManager.GetInvoiceDeliveries();
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return invoiceDeliveries;
 }
Example #11
0
        public CustomerSummary GetCustomerSummaryDetails(int seqPartyId)
        {
            CustomerSummary custSumm = new CustomerSummary();
            try
            {
                custSumm = _dbManager.GetCustomerSummaryDetails(seqPartyId);
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return custSumm;
        }
Example #12
0
        public CustomerDetails GetCustomerDetails(int customerNo)
        {
            CustomerDetails custDetails = new CustomerDetails();
            try
            {
                custDetails = _dbManager.GetCustomerDetails(customerNo);
            }
            catch (Exception exceptionToHandle)
            {
                ExceptionPolicy.HandleException(exceptionToHandle, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = exceptionToHandle.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, exceptionToHandle.Message);
            }

            return custDetails;
        }
Example #13
0
 public List<CreditControlStatus> GetCreditControlStatus()
 {
     List<CreditControlStatus> creditControlStatuses = new List<CreditControlStatus>();
     try
     {
         creditControlStatuses = _dbManager.GetCreditControlStatus();
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, "Policy");
         FaultDetail faultDetail = new FaultDetail
         {
             Type = ex.Message,
             ErrorCode = 63873928
         };     //+ throw     
         throw new FaultException<FaultDetail>(faultDetail, ex.Message);
     }
     return creditControlStatuses;
 }
Example #14
0
        public List<BillingUnit> GetBillingUnits()
        {

            List<BillingUnit> billingUnits = new List<BillingUnit>();
            try
            {
                billingUnits = _dbManager.GetBillingUnits();
            }
            catch (Exception ex)
            {
                ExceptionPolicy.HandleException(ex, "Policy");
                FaultDetail faultDetail = new FaultDetail
                {
                    Type = ex.Message,
                    ErrorCode = 63873928
                };     //+ throw     
                throw new FaultException<FaultDetail>(faultDetail, ex.Message);
            }
            return billingUnits;
        }