コード例 #1
0
        /// <summary>
        /// 销售商品列表
        /// </summary>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="orderState">订单状态</param>
        /// <param name="pageNumber">当前页数</param>
        /// <param name="pageSize">每页数</param>
        /// <returns></returns>
        public ActionResult SaleProductList(string startTime, string endTime, int orderState = -1, int pageNumber = 1, int pageSize = 15)
        {
            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminOrders.GetSaleProductCount(startTime, endTime, orderState));

            List <SelectListItem> orderStateList = new List <SelectListItem>();

            orderStateList.Add(new SelectListItem()
            {
                Text = "全部", Value = "0"
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "等待付款", Value = ((int)OrderState.WaitPaying).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "待确认", Value = ((int)OrderState.Confirming).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "已确认", Value = ((int)OrderState.Confirmed).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "备货中", Value = ((int)OrderState.PreProducting).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "已发货", Value = ((int)OrderState.Sended).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "已收货", Value = ((int)OrderState.Received).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "已锁定", Value = ((int)OrderState.Locked).ToString()
            });
            orderStateList.Add(new SelectListItem()
            {
                Text = "已取消", Value = ((int)OrderState.Cancelled).ToString()
            });

            SaleProductListModel model = new SaleProductListModel()
            {
                PageModel       = pageModel,
                SaleProductList = AdminOrders.GetSaleProductList(pageModel.PageSize, pageModel.PageNumber, startTime, endTime, orderState),
                StartTime       = startTime,
                EndTime         = endTime,
                OrderState      = orderState,
                OrderStateList  = orderStateList
            };

            return(View(model));
        }
コード例 #2
0
ファイル: StatController.cs プロジェクト: thfthf2/NStore
        /// <summary>
        /// 销售明细
        /// </summary>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="pageNumber">当前页数</param>
        /// <param name="pageSize">每页数</param>
        /// <returns></returns>
        public ActionResult SaleList(string startTime, string endTime, int pageNumber = 1, int pageSize = 15)
        {
            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminOrders.GetSaleProductCount(startTime, endTime));

            SaleListModel model = new SaleListModel()
            {
                SaleProductList = AdminOrders.GetSaleProductList(pageModel.PageSize, pageModel.PageNumber, startTime, endTime),
                PageModel       = pageModel,
                StartTime       = startTime,
                EndTime         = endTime
            };

            return(View(model));
        }