Ejemplo n.º 1
0
        public ActionResult Index(int pageIndex = 1, Order_Status?state = null)
        {
            var pageCount = 20;

            var orderList = _orderService.GetPagedOrderList(pageIndex, pageCount, state);

            var vd = new Order_IndexVD()
            {
                OrderList         = orderList,
                CurrentOrderState = state
            };

            return(View(vd));
        }
Ejemplo n.º 2
0
        //private IOrderService _orderService;
        //IProductService _productService;
        //private ICouponService _couponService;

        /// <summary>
        /// 获取订单JSON
        /// </summary>
        /// <returns></returns>
        //        private object GetOrderJson(Order order)
        //        {
        //            return new
        //            {
        //                order.Id,
        //                order.OrderNumber,
        //                order.TotalPrice,
        //                State = ((Order_State)order.State).ToString(),
        //                AddTime = order.AddTime.ToString("yyyy-MM-dd HH:mm"),
        //                OrderItems = order.OrderItems.Select(z => new
        //                {
        //                    z.ProductId,
        //                    z.Id,
        //                    z.ProductName,
        //                    z.ProductPrice,
        //                    z.ProductPicUrl,
        //                    z.Count,
        //                    AddTime = z.AddTime.ToString("yyyy-MM-dd HH:mm"),
        //                })
        //            };
        //        }

        //        public OrderController(IOrderService orderService, IAddressService addressService, IProductService productService, ICouponService couponService)
        //        {
        //            _orderService = orderService;
        //            _addressService = addressService;
        //            _productService = productService;
        //            _couponService = couponService;
        //        }

        public ActionResult Index()
        {
            Order_IndexVD vd = new Order_IndexVD();

            return(View(vd));
        }