/// <summary>
        /// 商品评价列表
        /// </summary>
        public ActionResult ProductReviewList(string storeName, string message, string rateStartTime, string rateEndTime, string sortColumn, string sortDirection, int storeId = -1, int pid = 0, int pageNumber = 1, int pageSize = 15)
        {
            string condition = AdminProductReviews.AdminGetProductReviewListCondition(storeId, pid, message, rateStartTime, rateEndTime);
            string sort      = AdminProductReviews.AdminGetProductReviewListSort(sortColumn, sortDirection);

            PageModel pageModel          = new PageModel(pageSize, pageNumber, AdminProductReviews.AdminGetProductReviewCount(condition));
            ProductReviewListModel model = new ProductReviewListModel()
            {
                PageModel         = pageModel,
                SortColumn        = sortColumn,
                SortDirection     = sortDirection,
                ProductReviewList = AdminProductReviews.AdminGetProductReviewList(pageModel.PageSize, pageModel.PageNumber, condition, sort),
                StoreId           = storeId,
                StoreName         = string.IsNullOrWhiteSpace(storeName) ? "全部店铺" : storeName,
                Pid       = pid,
                Message   = message,
                StartTime = rateStartTime,
                EndTime   = rateEndTime
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&storeId={5}&storeName={6}&pid={7}&message={8}&startTime={9}&endTime={10}",
                                                          Url.Action("productreviewlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          sortColumn, sortDirection,
                                                          storeId, storeName, pid,
                                                          message, rateStartTime, rateEndTime));
            return(View(model));
        }
Esempio n. 2
0
        /// <summary>
        /// 商品评价列表
        /// </summary>
        public ActionResult ProductReviewList(string productName, string message, string rateStartTime, string rateEndTime, string sortColumn, string sortDirection, int pid = -1, int pageNumber = 1, int pageSize = 15)
        {
            string condition = AdminProductReviews.AdminGetProductReviewListCondition(pid, message, rateStartTime, rateEndTime);
            string sort      = AdminProductReviews.AdminGetProductReviewListSort(sortColumn, sortDirection);

            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminProductReviews.AdminGetProductReviewCount(condition));

            ProductReviewListModel model = new ProductReviewListModel()
            {
                PageModel         = pageModel,
                SortColumn        = sortColumn,
                SortDirection     = sortDirection,
                ProductReviewList = AdminProductReviews.AdminGetProductReviewList(pageModel.PageSize, pageModel.PageNumber, condition, sort),
                Pid         = pid,
                ProductName = pid > 0 ? productName : "选择商品",
                Message     = message,
                StartTime   = rateStartTime,
                EndTime     = rateEndTime
            };

            ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&message={5}&pid={6}&productName={7}&startTime={8}&endTime={9}",
                                                          Url.Action("productreviewlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          sortColumn, sortDirection,
                                                          message,
                                                          pid, productName,
                                                          rateStartTime, rateEndTime));
            return(View(model));
        }
Esempio n. 3
0
        /// <summary>
        /// 商品评价列表
        /// </summary>
        public ActionResult ProductReviewList(string productName, string message, string rateStartTime, string rateEndTime, string sortColumn, string sortDirection, int pid = -1, int pageNumber = 1, int pageSize = 15)
        {
            if (!SecureHelper.IsSafeSqlString(message))
            {
                message = "";
            }
            if (!SecureHelper.IsSafeSqlString(rateStartTime))
            {
                rateStartTime = "";
            }
            if (!SecureHelper.IsSafeSqlString(rateEndTime))
            {
                rateEndTime = "";
            }
            if (!SecureHelper.IsSafeSqlString(sortColumn))
            {
                sortColumn = "";
            }
            if (!SecureHelper.IsSafeSqlString(sortDirection))
            {
                sortDirection = "";
            }

            string condition = AdminProductReviews.AdminGetProductReviewListCondition(WorkContext.StoreId, pid, message, rateStartTime, rateEndTime);
            string sort      = AdminProductReviews.AdminGetProductReviewListSort(sortColumn, sortDirection);

            PageModel pageModel          = new PageModel(pageSize, pageNumber, AdminProductReviews.AdminGetProductReviewCount(condition));
            ProductReviewListModel model = new ProductReviewListModel()
            {
                PageModel         = pageModel,
                SortColumn        = sortColumn,
                SortDirection     = sortDirection,
                ProductReviewList = AdminProductReviews.AdminGetProductReviewList(pageModel.PageSize, pageModel.PageNumber, condition, sort),
                Pid         = pid,
                ProductName = string.IsNullOrWhiteSpace(productName) ? "选择商品" : productName,
                Message     = message,
                StartTime   = rateStartTime,
                EndTime     = rateEndTime
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&message={5}&pid={6}&productName={7}&startTime={8}&endTime={9}",
                                                          Url.Action("productreviewlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          sortColumn, sortDirection,
                                                          message,
                                                          pid, productName,
                                                          rateStartTime, rateEndTime));
            return(View(model));
        }
        /// <summary>
        /// 商品评价列表
        /// </summary>
        public ActionResult ProductReviewList(string productName, string message, string rateStartTime, string rateEndTime, int pid = -1, int pageNumber = 1, int pageSize = 15)
        {
            string condition = AdminProductReviews.AdminGetProductReviewListCondition(WorkContext.StoreId, pid, message, rateStartTime, rateEndTime);

            PageModel pageModel          = new PageModel(pageSize, pageNumber, AdminProductReviews.AdminGetProductReviewCount(condition));
            ProductReviewListModel model = new ProductReviewListModel()
            {
                PageModel         = pageModel,
                ProductReviewList = AdminProductReviews.AdminGetProductReviewList(pageModel.PageSize, pageModel.PageNumber, condition),
                Pid         = pid,
                ProductName = string.IsNullOrWhiteSpace(productName) ? "选择商品" : productName,
                Message     = message,
                StartTime   = rateStartTime,
                EndTime     = rateEndTime
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&message={3}&pid={4}&productName={5}&startTime={6}&endTime={7}",
                                                          Url.Action("productreviewlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          message,
                                                          pid, productName,
                                                          rateStartTime, rateEndTime));
            return(View(model));
        }