// GET: Admin/Order/Edit/5 public ActionResult Edit(long id) { long?selectedId = null; var dao = new CustomerModel(); ViewBag.CustomerID = new SelectList(dao.GetList(), "CustomerID", "CustomerID", selectedId); var Udao = new UserDAO(); ViewBag.Username = new SelectList(Udao.GetAccountList(), "Username", "Username", selectedId); return(View(new OrderModel().GetOrder(id))); }
// GET: Admin/Order/Create public ActionResult Create() { long?selectedId = null; var dao = new CustomerModel(); ViewBag.CustomerID = new SelectList(dao.GetList(), "CustomerID", "CustomerID", selectedId); var Udao = new UserDAO(); ViewBag.Username = new SelectList(Udao.GetAccountList(), "Username", "Username", selectedId); return(View()); }