public ActionResult Update(int orderid) { //準備orderService OrderService orderService = new OrderService(); //產品下拉選單 List <SelectListItem> productlist = orderService.GetOrderDetailList(); ViewBag.product = productlist; //準備employee下拉選單 EmployeeService employeeservice = new EmployeeService(); List <SelectListItem> employeeitems = employeeservice.GetEmpName(); ViewBag.employeelist = employeeitems; //準備shipper下拉選單 ShippersService shippersservice = new ShippersService(); List <SelectListItem> shippersitems = shippersservice.GetShipper(); ViewBag.shipperslist = shippersitems; //準備customer下拉選單 CustomerService customerservice = new CustomerService(); List <SelectListItem> customeritems = customerservice.GetCustomerList(); ViewBag.customerlist = customeritems; //把order資料丟去view Order order = orderService.GetOrders(orderid); return(View(order)); }
public ActionResult Index() { //準備employee下拉選單 EmployeeService employeeservice = new EmployeeService(); ViewBag.employeelist = employeeservice.GetEmpName(); //準備shipper下拉選單 ShippersService shippersservice = new ShippersService(); ViewBag.shipperslist = shippersservice.GetShipper(); return(View()); }
public ActionResult InsertOrder() { //準備employee下拉選單 EmployeeService employeeservice = new EmployeeService(); ViewBag.employeelist = employeeservice.GetEmpName(); //準備shipper下拉選單 ShippersService shippersservice = new ShippersService(); ViewBag.shipperslist = shippersservice.GetShipper(); //準備customer下拉選單 CustomerService customerservice = new CustomerService(); ViewBag.customerlist = customerservice.GetCustomerList(); return(View()); }