//special operations public static CUSTOMERS CustomerAllData(int id) { CUSTOMERS customer = null; try { customer = CUSTOMERSDAL.Get(id); customer.ADDRESS = CUSTOMERADDRESSDAL.GetAddress(id); customer.ORDERS = ORDERSDAL.GetOrders(id); } catch (NullReferenceException nex) { customer.ADDRESS = new List <CUSTOMERADDRESS>(); customer.ORDERS = new List <ORDERS>(); } catch (Exception ex) { throw ex; } return(customer); }
//6 delete customer public static bool DeleteAddress(int addressID) => CUSTOMERADDRESSDAL.DeleteAddress(addressID);
// 5 update customer public static bool UpdateAddress(CUSTOMERADDRESS address) => CUSTOMERADDRESSDAL.UpdateCustomerAddress(address);
//4 insert customer public static bool InsertAddress(CUSTOMERADDRESS address) => CUSTOMERADDRESSDAL.InsertCustomerAddress(address);
//2 getAll customers public static List <CUSTOMERADDRESS> GetAllAddress() => CUSTOMERADDRESSDAL.GetAll();
//crudoperations //1 get customer details using name public static List <CUSTOMERADDRESS> GetAddresses(int customerId) => CUSTOMERADDRESSDAL.GetAddress(customerId);