예제 #1
0
        public ActionResult Update(int orderid)
        {
            ///獲得訂單資料
            OrderService orderService = new OrderService();
            Order        orderdata    = orderService.GetOrders(orderid);
            ///取得產品資料
            List <SelectListItem> productitems = orderService.GetOrderDetailList();

            ViewBag.productitems = productitems;
            ///準備員工下拉式選單
            EmployeeService       employeeservice = new EmployeeService();
            List <SelectListItem> employeeitems   = employeeservice.GetEnameList();

            ViewBag.employeelist = employeeitems;

            ///準備物流下拉式選單
            ShipperService        shipperservice = new ShipperService();
            List <SelectListItem> shippersitems  = shipperservice.GetSnameList();

            ViewBag.shipperslist = shippersitems;

            ///準備員工下拉式選單
            CustomerService       customerservice = new CustomerService();
            List <SelectListItem> customeritems   = customerservice.GetCustomerList();

            ViewBag.customerlist = shippersitems;
            return(View(orderdata));
        }
예제 #2
0
        public ActionResult Index()
        {   ///員工、物流公司下拉是選單
            EmployeeService employeeService = new EmployeeService();

            ViewBag.employeelist = employeeService.GetEnameList();
            ShipperService shipperService = new ShipperService();

            ViewBag.shipperlist = shipperService.GetSnameList();
            return(View());
        }
예제 #3
0
        public ActionResult InsertOrder()
        {
            ///準備員工、物流、顧客的下拉式選單
            EmployeeService employeeService = new EmployeeService();

            ViewBag.employeelist = employeeService.GetEnameList();
            ShipperService shipperService = new ShipperService();

            ViewBag.shipperlist = shipperService.GetSnameList();
            CustomerService customerservice = new CustomerService();

            ViewBag.customerlist = customerservice.GetCustomerList();
            return(View());
        }