Beispiel #1
0
        public ActionResult GetUpdateDialog(int id)
        {
            eSalesService.Order2Service orderService = new eSalesService.Order2Service(this.GetDBConnectionString());
            eSalesService.EmpService    empService   = new eSalesService.EmpService(this.GetDBConnectionString());
            eSalesService.CusService    cusService   = new eSalesService.CusService(this.GetDBConnectionString());
            eSalesService.ShipService   shipService  = new eSalesService.ShipService(this.GetDBConnectionString());
            eSaleModel.Order            orderData    = new eSaleModel.Order();

            var data = orderService.GetOrderById(id);

            ViewBag.OrderId        = data.OrderId;
            ViewBag.OrderDate      = data.OrderDate;
            ViewBag.RequiredDate   = data.RequiredDate;
            ViewBag.ShippedDate    = data.ShippedDate;
            ViewBag.Freight        = data.Freight;
            ViewBag.ShipCountry    = data.ShipCountry;
            ViewBag.ShipCity       = data.ShipCity;
            ViewBag.ShipRegion     = data.ShipRegion;
            ViewBag.ShipPostalCode = data.ShipPostalCode;
            ViewBag.ShipAddress    = data.ShipAddress;
            ViewBag.ShipName       = data.ShipAddress;
            ViewBag.EmpId          = data.EmpId;
            ViewBag.CustId         = data.CustId;
            ViewBag.ShipperId      = data.ShipperId;

            //ViewBag.OrderId = "updateProductGrid" + id;

            //ViewBag.EmpNameData = new SelectList(empService.GetEmpNameData(), "Value", "Text", orderData.EmpId);
            //ViewBag.CustNameData = new SelectList(cusService.GetCusNameData(), "Value", "Text", orderData.CustId);
            //ViewBag.ShipperNameData = new SelectList(shipService.GetShipperNameData(), "Value", "Text", orderData.ShipperId);

            return(PartialView());
        }
Beispiel #2
0
        /// <summary>
        /// 取得所有 PorductName 和 PorductID
        /// </summary>
        /// <returns></returns>
        public JsonResult ReadEmployeeList()
        {
            eSalesService.EmpService empService = new eSalesService.EmpService(this.GetDBConnectionString());

            var data = empService.GetEmpNameData();

            return(this.Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
        public ActionResult GetInsertDialog()
        {
            eSalesService.EmpService  empService  = new eSalesService.EmpService(this.GetDBConnectionString());
            eSalesService.CusService  cusService  = new eSalesService.CusService(this.GetDBConnectionString());
            eSalesService.ShipService shipService = new eSalesService.ShipService(this.GetDBConnectionString());

            ViewBag.EmpNameData     = empService.GetEmpNameData();
            ViewBag.CustNameData    = cusService.GetCusNameData();
            ViewBag.ShipperNameData = shipService.GetShipperNameData();

            return(PartialView());
        }
Beispiel #4
0
        // GET: Order2
        public ActionResult Index()
        {
            eSalesService.OrderService orderService = new eSalesService.OrderService(this.GetDBConnectionString());
            eSalesService.EmpService   empService   = new eSalesService.EmpService(this.GetDBConnectionString());
            eSalesService.CusService   cusService   = new eSalesService.CusService(this.GetDBConnectionString());
            eSalesService.ShipService  shipService  = new eSalesService.ShipService(this.GetDBConnectionString());


            ViewBag.EmpNameData     = empService.GetEmpNameData();
            ViewBag.CustNameData    = cusService.GetCusNameData();
            ViewBag.ShipperNameData = shipService.GetShipperNameData();
            return(View());
        }