Beispiel #1
0
        //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);
        }
Beispiel #2
0
 //6 delete customer
 public static bool DeleteCustomer(int CustomerId) => CUSTOMERSDAL.DeleteCustomer(CustomerId);
Beispiel #3
0
 // 5 update customer
 public static bool UpdateCustomer(CUSTOMERS customer) => CUSTOMERSDAL.UpdateCustomer(customer);
Beispiel #4
0
 //4 insert customer
 public static bool InsertCustomer(CUSTOMERS customer) => CUSTOMERSDAL.InsertCustomer(customer);
Beispiel #5
0
 //3 getAll customers
 public static List <CUSTOMERS> GetCustomers() => CUSTOMERSDAL.GetAll();
Beispiel #6
0
 //2 get customer details using email
 public static CUSTOMERS GetCustomer(string customerEmail) => CUSTOMERSDAL.Get(customerEmail);
Beispiel #7
0
        //crudoperations

        //1 get customer details using name
        public static CUSTOMERS GetCustomer(int customerId) => CUSTOMERSDAL.Get(customerId);