Example #1
0
        public static List <ORDERDETAILS> CustomerOrderDetails(int custid)
        {
            List <ORDERS>       orders       = ORDERSDAL.GetOrders(custid);
            List <ORDERDETAILS> orderdetails = ORDERDETAILSDAL.GetAll();
            List <ORDERDETAILS> details      = new List <ORDERDETAILS>();

            foreach (ORDERS o in orders)
            {
                foreach (ORDERDETAILS detail in orderdetails)
                {
                    if (o.ORDERNUM == detail.ORDERNUM)
                    {
                        details.Add(detail);
                    }
                }
            }

            return(details);
        }
Example #2
0
 //2  getAll customers
 public static List <ORDERDETAILS> GetAllOrderDetails() => ORDERDETAILSDAL.GetAll();