Exemplo n.º 1
0
        /// <summary>
        /// 商品咨询列表
        /// </summary>
        public ActionResult ProductConsultList(string storeName, string consultMessage, string consultStartTime, string consultEndTime, string sortColumn, string sortDirection, int storeId = -1, int pid = 0, int pageNumber = 1, int pageSize = 15)
        {
            string condition = AdminProductConsults.AdminGetProductConsultListCondition(0, storeId, pid, 0, consultMessage, consultStartTime, consultEndTime);
            string sort      = AdminProductConsults.AdminGetProductConsultListSort(sortColumn, sortDirection);

            PageModel pageModel           = new PageModel(pageSize, pageNumber, AdminProductConsults.AdminGetProductConsultCount(condition));
            ProductConsultListModel model = new ProductConsultListModel()
            {
                PageModel          = pageModel,
                SortColumn         = sortColumn,
                SortDirection      = sortDirection,
                ProductConsultList = AdminProductConsults.AdminGetProductConsultList(pageModel.PageSize, pageModel.PageNumber, condition, sort),
                StoreId            = storeId,
                StoreName          = string.IsNullOrWhiteSpace(storeName) ? "全部店铺" : storeName,
                Pid              = pid,
                ConsultMessage   = consultMessage,
                ConsultStartTime = consultStartTime,
                ConsultEndTime   = consultEndTime
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&storeId={5}&storeName={6}&pid={7}&consultMessage={8}&consultStartTime={9}&consultEndTime={10}",
                                                          Url.Action("productconsultlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          sortColumn, sortDirection,
                                                          storeId, storeName, pid, consultMessage,
                                                          consultStartTime, consultEndTime));
            return(View(model));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 商品咨询列表
        /// </summary>
        public ActionResult ProductConsultList(string accountName, string productName, string consultMessage, string consultStartTime, string consultEndTime, string sortColumn, string sortDirection, int pid = -1, int consultTypeId = -1, int pageNumber = 1, int pageSize = 15)
        {
            int uid = AdminUsers.GetUidByAccountName(accountName);

            string condition = AdminProductConsults.AdminGetProductConsultListCondition(consultTypeId, pid, uid, consultMessage, consultStartTime, consultEndTime);
            string sort      = AdminProductConsults.AdminGetProductConsultListSort(sortColumn, sortDirection);

            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminProductConsults.AdminGetProductConsultCount(condition));

            ProductConsultListModel model = new ProductConsultListModel()
            {
                PageModel          = pageModel,
                SortColumn         = sortColumn,
                SortDirection      = sortDirection,
                ProductConsultList = AdminProductConsults.AdminGetProductConsultList(pageModel.PageSize, pageModel.PageNumber, condition, sort),
                AccountName        = accountName,
                Pid              = pid,
                ProductName      = pid > 0 ? productName : "选择商品",
                ConsultTypeId    = consultTypeId,
                ConsultMessage   = consultMessage,
                ConsultStartTime = consultStartTime,
                ConsultEndTime   = consultEndTime
            };

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

            itemList.Add(new SelectListItem()
            {
                Text = "全部类型", Value = "0"
            });
            foreach (ProductConsultTypeInfo productConsultTypeInfo in AdminProductConsults.GetProductConsultTypeList())
            {
                itemList.Add(new SelectListItem()
                {
                    Text = productConsultTypeInfo.Title, Value = productConsultTypeInfo.ConsultTypeId.ToString()
                });
            }
            ViewData["productConsultTypeList"] = itemList;

            ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&consultMessage={5}&pid={6}&productName={7}&consultStartTime={8}&consultEndTime={9}&consultTypeId={10}&accountName={11}",
                                                          Url.Action("productconsultlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          sortColumn, sortDirection,
                                                          consultMessage,
                                                          pid, productName,
                                                          consultStartTime, consultEndTime,
                                                          consultTypeId, accountName));
            return(View(model));
        }
        /// <summary>
        /// 商品咨询列表
        /// </summary>
        public ActionResult ProductConsultList(string accountName, string productName, string consultMessage, string consultStartTime, string consultEndTime, int pid = -1, int consultTypeId = -1, int pageNumber = 1, int pageSize = 15)
        {
            int uid = AdminUsers.GetUidByAccountName(accountName);

            string condition = AdminProductConsults.AdminGetProductConsultListCondition(consultTypeId, WorkContext.StoreId, pid, uid, consultMessage, consultStartTime, consultEndTime);

            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminProductConsults.AdminGetProductConsultCount(condition));

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

            productConsultTypeList.Add(new SelectListItem()
            {
                Text = "全部类型", Value = "0"
            });
            foreach (ProductConsultTypeInfo productConsultTypeInfo in AdminProductConsults.GetProductConsultTypeList())
            {
                productConsultTypeList.Add(new SelectListItem()
                {
                    Text = productConsultTypeInfo.Title, Value = productConsultTypeInfo.ConsultTypeId.ToString()
                });
            }

            ProductConsultListModel model = new ProductConsultListModel()
            {
                PageModel          = pageModel,
                ProductConsultList = AdminProductConsults.AdminGetProductConsultList(pageModel.PageSize, pageModel.PageNumber, condition),
                AccountName        = accountName,
                Pid              = pid,
                ProductName      = string.IsNullOrWhiteSpace(productName) ? "选择商品" : productName,
                ConsultTypeId    = consultTypeId,
                ConsultTypeList  = productConsultTypeList,
                ConsultMessage   = consultMessage,
                ConsultStartTime = consultStartTime,
                ConsultEndTime   = consultEndTime
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&consultMessage={3}&pid={4}&productName={5}&consultStartTime={6}&consultEndTime={7}&consultTypeId={8}&accountName={9}",
                                                          Url.Action("productconsultlist"),
                                                          pageModel.PageNumber, pageModel.PageSize,
                                                          consultMessage,
                                                          pid, productName,
                                                          consultStartTime, consultEndTime,
                                                          consultTypeId, accountName));
            return(View(model));
        }