コード例 #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);
        }
コード例 #2
0
 //6 delete customer
 public static bool DeleteAddress(int addressID) => CUSTOMERADDRESSDAL.DeleteAddress(addressID);
コード例 #3
0
 // 5 update customer
 public static bool UpdateAddress(CUSTOMERADDRESS address) => CUSTOMERADDRESSDAL.UpdateCustomerAddress(address);
コード例 #4
0
 //4 insert customer
 public static bool InsertAddress(CUSTOMERADDRESS address) => CUSTOMERADDRESSDAL.InsertCustomerAddress(address);
コード例 #5
0
 //2  getAll customers
 public static List <CUSTOMERADDRESS> GetAllAddress() => CUSTOMERADDRESSDAL.GetAll();
コード例 #6
0
        //crudoperations

        //1 get customer details using name
        public static List <CUSTOMERADDRESS> GetAddresses(int customerId) => CUSTOMERADDRESSDAL.GetAddress(customerId);