// GET: ViewReport public ActionResult Index() { //UserLIst UserOrderVM userListOrderVm = new UserOrderVM(); var memberList = db.Users.ToList(); userListOrderVm.UserOrderList = new SelectList(memberList, "Id", "Code"); ViewBag.UserList = userListOrderVm.UserOrderList; return(View()); }
// GET: Order public ActionResult Order() { //UserLIst UserOrderVM userListOrderVm = new UserOrderVM(); var memberList = db.Users.ToList(); userListOrderVm.UserOrderList = new SelectList(memberList, "Id", "Code"); ViewBag.UserList = userListOrderVm.UserOrderList; //FoodList OrderFoodVM orderFood = new OrderFoodVM(); var foodList = db.FoodItems.ToList(); orderFood.FoodOrderList = new SelectList(foodList, "Id", "FoodName"); ViewBag.FoodList = orderFood.FoodOrderList; return(View()); }