示例#1
0
        public ActionResult GetUpdateDialog(int id)
        {
            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());
            eSaleModel.Order           orderData    = new eSaleModel.Order();

            orderData = orderService.GetOrderById(id);

            ViewBag.OrderId        = orderData.OrderId;
            ViewBag.OrderDate      = orderData.OrderDate;
            ViewBag.RequiredDate   = orderData.RequiredDate;
            ViewBag.ShippedDate    = orderData.ShippedDate;
            ViewBag.Freight        = orderData.Freight;
            ViewBag.ShipCountry    = orderData.ShipCountry;
            ViewBag.ShipCity       = orderData.ShipCity;
            ViewBag.ShipRegion     = orderData.ShipRegion;
            ViewBag.ShipPostalCode = orderData.ShipPostalCode;
            ViewBag.ShipAddress    = orderData.ShipAddress;
            ViewBag.ShipName       = orderData.ShipAddress;

            //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());
        }
示例#2
0
        /// <summary>
        /// 取得所有 PorductName 和 PorductID
        /// </summary>
        /// <returns></returns>
        public JsonResult ReadShipperList()
        {
            eSalesService.ShipService shipService = new eSalesService.ShipService(this.GetDBConnectionString());

            var data = shipService.GetShipperNameData();

            return(this.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#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());
        }
示例#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());
        }