public ActionResult Orders(int?productID, int?purchaser, DateTime?startDate, DateTime?endDate) { getAdmin(); using (DBAgent.DBAgent agent = new DBAgent.DBAgent()) { List <Order> orders = agent.GetOrders(productID, purchaser, startDate, endDate, null); List <Product> products = agent.GetProducts(null, null, null, null); List <Purchaser> purchasers = agent.getPurchasers(); ViewBag.Orders = orders; ViewBag.products = products; ViewBag.purchasers = purchasers; ViewBag.workgroups = agent.GetWorkgroups(); } return(View()); }
public ActionResult Orders() { getAdmin(); using (DBAgent.DBAgent agent = new DBAgent.DBAgent()) { List <Order> orders = agent.GetOrders(null, null, null, null, null); List <Product> products = agent.GetProducts(null, null, null, null); List <Purchaser> purchasers = agent.getPurchasers(); ViewBag.Orders = orders; ViewBag.products = products; ViewBag.purchasers = purchasers; ViewBag.workgroups = agent.GetWorkgroups(); } return(View()); }