Esempio n. 1
0
        public static List <Customer> DeserializeDataBL()

        {
            List <Customer> CustomerList = null;

            try

            {
                AmazonDal customerDAL = new AmazonDal();

                CustomerList = customerDAL.DeserializeDataDAL();
            }

            catch (AmazonException ex)

            {
                throw ex;
            }

            catch (Exception ex)

            {
                throw ex;
            }

            return(CustomerList);
        }
Esempio n. 2
0
        public static bool AddCustomerBL(Customer newCustomer)

        {
            bool customerAdded = false;

            try

            {
                if (ValidateCustomer(newCustomer))

                {
                    AmazonDal amazonDal = new AmazonDal();

                    customerAdded = amazonDal.AddCustomerDAL(newCustomer);
                }
            }

            catch (AmazonException)

            {
                throw;
            }

            return(customerAdded);
        }
Esempio n. 3
0
        public static bool SerializeDataBL(Customer customer)

        {
            bool CustomerSerialized = false;

            try

            {
                if (ValidateCustomer(customer))

                {
                    AmazonDal amazonDal = new AmazonDal();

                    CustomerSerialized = amazonDal.SerializeDataDAL(customer);
                }
            }

            catch (AmazonException e)

            {
                throw;
            }

            catch (Exception ex)

            {
                throw ex;
            }

            return(CustomerSerialized);
        }