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); }
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); }
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); }