예제 #1
0
 /// <summary>
 /// 页面加载
 /// </summary>
 protected override void PageLoad()
 {
     base.PageLoad();
     commentID      = RequestHelper.GetQueryString <int>("CommentID");
     productComment = ProductCommentBLL.ReadProductComment(commentID, 0);
     product        = ProductBLL.ReadProduct(productComment.ProductID);
 }
예제 #2
0
        public void AddProductComment(ref string result)
        {
            int    queryString = RequestHelper.GetQueryString <int>("ProductID");
            string str         = CookiesHelper.ReadCookieValue("CommentCookies" + queryString.ToString());

            if ((ShopConfig.ReadConfigInfo().CommentRestrictTime > 0) && (str != string.Empty))
            {
                result = "Ç벻ҪƵ·±Ìá½»";
            }
            else
            {
                ProductCommentInfo productComment = new ProductCommentInfo();
                productComment.ProductID         = queryString;
                productComment.Title             = StringHelper.AddSafe(RequestHelper.GetQueryString <string>("Title"));
                productComment.Content           = StringHelper.AddSafe(RequestHelper.GetQueryString <string>("Content"));
                productComment.UserIP            = ClientHelper.IP;
                productComment.PostDate          = RequestHelper.DateNow;
                productComment.Support           = 0;
                productComment.Against           = 0;
                productComment.Status            = ShopConfig.ReadConfigInfo().CommentDefaultStatus;
                productComment.Rank              = RequestHelper.GetQueryString <int>("Rank");
                productComment.ReplyCount        = 0;
                productComment.AdminReplyContent = string.Empty;
                productComment.AdminReplyDate    = RequestHelper.DateNow;
                productComment.UserID            = base.UserID;
                productComment.UserName          = base.UserName;
                ProductCommentBLL.AddProductComment(productComment);
                if (ShopConfig.ReadConfigInfo().CommentRestrictTime > 0)
                {
                    CookiesHelper.AddCookie("CommentCookies" + queryString.ToString(), "CommentCookies" + queryString.ToString(), ShopConfig.ReadConfigInfo().CommentRestrictTime, TimeType.Second);
                }
            }
        }
예제 #3
0
        /// <summary>
        /// 页面加载方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckAdminPower("ReadProductComment", PowerCheckType.Single);

                Name.Text = RequestHelper.GetQueryString <string>("Name");

                StartPostDate.Text = RequestHelper.GetQueryString <string>("StartPostDate");
                EndPostDate.Text   = RequestHelper.GetQueryString <string>("EndPostDate");
                Status.Text        = RequestHelper.GetQueryString <string>("Status");

                ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();
                productCommentSearch.ProductName   = RequestHelper.GetQueryString <string>("Name");
                productCommentSearch.Title         = RequestHelper.GetQueryString <string>("Title");
                productCommentSearch.Content       = RequestHelper.GetQueryString <string>("Content");
                productCommentSearch.UserIP        = RequestHelper.GetQueryString <string>("UserIP");
                productCommentSearch.StartPostDate = RequestHelper.GetQueryString <DateTime>("StartPostDate");
                productCommentSearch.EndPostDate   = RequestHelper.GetQueryString <DateTime>("EndPostDate");
                productCommentSearch.Status        = RequestHelper.GetQueryString <int>("Status");
                PageSize           = Session["AdminPageSize"] == null ? 20 : Convert.ToInt32(Session["AdminPageSize"]);
                AdminPageSize.Text = Session["AdminPageSize"] == null ? "20" : Session["AdminPageSize"].ToString();
                BindControl(ProductCommentBLL.SearchList(CurrentPage, PageSize, productCommentSearch, ref Count), RecordList, MyPager);
            }
        }
예제 #4
0
        /// <summary>
        /// 添加评论
        /// </summary>
        /// <param name="result"></param>
        public void AddProductComment(ref string result)
        {
            int    productID      = RequestHelper.GetQueryString <int>("ProductID");
            int    orderID        = RequestHelper.GetQueryString <int>("OrderID");
            string commentCookies = CookiesHelper.ReadCookieValue("CommentCookies" + productID.ToString());

            if (ShopConfig.ReadConfigInfo().CommentRestrictTime > 0 && commentCookies != string.Empty)
            {
                result = "请不要频繁提交";
            }
            else
            {
                ProductCommentInfo productComment = new ProductCommentInfo();
                productComment.ProductId         = productID;
                productComment.Title             = StringHelper.AddSafe(RequestHelper.GetQueryString <string>("Title"));
                productComment.Content           = StringHelper.AddSafe(RequestHelper.GetQueryString <string>("Content"));
                productComment.UserIP            = ClientHelper.IP;
                productComment.PostDate          = RequestHelper.DateNow;
                productComment.Support           = 0;
                productComment.Against           = 0;
                productComment.Status            = ShopConfig.ReadConfigInfo().CommentDefaultStatus;
                productComment.Rank              = RequestHelper.GetQueryString <int>("Rank");
                productComment.ReplyCount        = 0;
                productComment.AdminReplyContent = string.Empty;
                productComment.AdminReplyDate    = RequestHelper.DateNow;
                productComment.UserId            = base.UserId;
                productComment.UserName          = base.UserName;
                productComment.OrderId           = orderID;
                ProductCommentBLL.Add(productComment);
                if (ShopConfig.ReadConfigInfo().CommentRestrictTime > 0)
                {
                    CookiesHelper.AddCookie("CommentCookies" + productID.ToString(), "CommentCookies" + productID.ToString(), ShopConfig.ReadConfigInfo().CommentRestrictTime, TimeType.Second);
                }
            }
        }
예제 #5
0
        public void AgainstComment()
        {
            string content = string.Empty;

            if ((ShopConfig.ReadConfigInfo().AllowAnonymousCommentOperate == 0) && (base.UserID == 0))
            {
                content = "»¹Î´µÇ¼";
            }
            else
            {
                int    queryString = RequestHelper.GetQueryString <int>("CommentID");
                string str2        = CookiesHelper.ReadCookieValue("CommentOperateCookies" + queryString.ToString());
                if ((ShopConfig.ReadConfigInfo().CommentOperateRestrictTime > 0) && (str2 != string.Empty))
                {
                    content = "Ç벻ҪƵ·±Ìá½»";
                }
                else
                {
                    ProductCommentBLL.ChangeProductCommentAgainstCount(queryString.ToString(), ChangeAction.Plus);
                    if (ShopConfig.ReadConfigInfo().CommentOperateRestrictTime > 0)
                    {
                        CookiesHelper.AddCookie("CommentOperateCookies" + queryString.ToString(), "CommentOperateCookies" + queryString.ToString(), ShopConfig.ReadConfigInfo().CommentOperateRestrictTime, TimeType.Second);
                    }
                    content = "ok";
                }
            }
            ResponseHelper.Write(content);
            ResponseHelper.End();
        }
예제 #6
0
        protected override void PageLoad()
        {
            base.PageLoad();

            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 15;
            int count    = 0;

            ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();

            productCommentSearch.ProductId = RequestHelper.GetQueryString <int>("id");
            productCommentSearch.Status    = (int)CommentStatus.Show;
            commentList = ProductCommentBLL.SearchList(currentPage, pageSize, productCommentSearch, ref count);
            userList    = UserBLL.SearchList(new UserSearchInfo {
                InUserId = string.Join(",", commentList.Select(k => k.UserId).ToArray())
            });

            pager.CurrentPage = currentPage;
            pager.PageSize    = pageSize;
            pager.Count       = count;
            pager.DisCount    = false;
            pager.ListType    = false;
        }
예제 #7
0
 /// <summary>
 /// 评论状态变成不显示状态按钮点击方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void NoShowButton_Click(object sender, EventArgs e)
 {
     CheckAdminPower("UpdateProductComment", PowerCheckType.Single);
     string[] selectID = RequestHelper.GetIntsForm("SelectID").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
     if (selectID.Length > 0)
     {
         ProductCommentBLL.ChangeStatus(Array.ConvertAll <string, int>(selectID, s => Convert.ToInt32(s)), (int)CommentStatus.NoShow);
         ScriptHelper.Alert(ShopLanguage.ReadLanguage("OperateOK"), RequestHelper.RawUrl);
     }
 }
예제 #8
0
 /// <summary>
 /// 删除按钮点击方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     CheckAdminPower("DeleteProductComment", PowerCheckType.Single);
     string[] deleteArr = RequestHelper.GetIntsForm("SelectID").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
     if (deleteArr.Length > 0)
     {
         ProductCommentBLL.Delete(Array.ConvertAll <string, int>(deleteArr, s => Convert.ToInt32(s)));
         AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ProductComment"), string.Join(",", deleteArr));
         ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
     }
 }
예제 #9
0
        protected void ShowButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("UpdateProductComment", PowerCheckType.Single);
            string intsForm = RequestHelper.GetIntsForm("SelectID");

            if (intsForm != string.Empty)
            {
                ProductCommentBLL.ChangeProductCommentStatus(intsForm, 2);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("OperateOK"), RequestHelper.RawUrl);
            }
        }
예제 #10
0
        protected bool isPL = true;                                                  //是否已评论
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            user          = UserBLL.ReadUserMore(base.UserId);
            userGradeName = UserGradeBLL.Read(base.GradeID).Name;
            int orderID = RequestHelper.GetQueryString <int>("ID");

            order = OrderBLL.Read(orderID, base.UserId);
            if (order.OrderStatus != (int)OrderStatus.ReceiveShipping)
            {
                ScriptHelper.AlertFront("只能评论已收货订单");
            }
            orderDetailList = OrderDetailBLL.ReadList(orderID);
            #region 加载订单下产品
            string strProductID = string.Empty;
            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                if (strProductID == string.Empty)
                {
                    strProductID = orderDetail.ProductId.ToString();
                }
                else
                {
                    strProductID += "," + orderDetail.ProductId.ToString();
                }
            }
            if (strProductID != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID;
                productList = ProductBLL.SearchList(productSearch);
            }
            #endregion
            #region 判断是否已评论
            List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count];
            int pi = 0;
            foreach (ProductInfo item in productList)
            {
                ProductCommentSearchInfo psi = new ProductCommentSearchInfo();
                psi.ProductId    = item.Id;
                psi.UserId       = base.UserId;
                psi.OrderID      = orderID;
                listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi);
                if (listPinfoArr[pi].Count <= 0)
                {
                    isPL = false;
                }
            }
            #endregion
            if (isPL)
            {
                Response.Redirect("/User/OrderDetail.html?ID=" + orderID);
            }
        }
예제 #11
0
        protected void DeleteButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("DeleteProductComment", PowerCheckType.Single);
            string intsForm = RequestHelper.GetIntsForm("SelectID");

            if (intsForm != string.Empty)
            {
                ProductCommentBLL.DeleteProductComment(intsForm, 0);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ProductComment"), intsForm);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
            }
        }
예제 #12
0
        protected bool isPL            = true;//是否已评论

        protected override void PageLoad()
        {
            base.PageLoad();
            //检查用户的待付款订单是否超时失效,超时则更新为失效状态
            OrderBLL.CheckOrderPayTime(base.UserId);
            int orderId = RequestHelper.GetQueryString <int>("id");

            userGradeName = UserGradeBLL.Read(base.GradeID).Name;


            order = OrderBLL.Read(orderId, base.UserId);


            if (order.Id <= 0)
            {
                ScriptHelper.AlertFront("订单不存在", "/user/index.html");
            }
            //礼品
            if (order.GiftId > 0)
            {
                gift = FavorableActivityGiftBLL.Read(order.GiftId);
            }
            orderDetailList = OrderDetailBLL.ReadList(orderId);
            int[] productIds = orderDetailList.Select(k => k.ProductId).ToArray();
            if (productIds.Length > 0)
            {
                int count = 0;
                productList = ProductBLL.SearchList(1, productIds.Length, new ProductSearchInfo {
                    InProductId = string.Join(",", productIds)
                }, ref count);
            }

            #region 判断是否已评论
            List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count];
            int pi = 0;
            foreach (ProductInfo item in productList)
            {
                ProductCommentSearchInfo psi = new ProductCommentSearchInfo();
                psi.ProductId    = item.Id;
                psi.UserId       = base.UserId;
                psi.OrderID      = orderId;
                listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi);
                if (listPinfoArr[pi].Count <= 0)
                {
                    isPL = false;
                }
            }
            #endregion
            Title = "我的订单";
        }
예제 #13
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();

            int orderID = RequestHelper.GetQueryString <int>("OrderID");


            order           = OrderBLL.Read(orderID, base.UserId);
            orderDetailList = OrderDetailBLL.ReadList(orderID);

            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                if (strProductID2 == string.Empty)
                {
                    strProductID2 = orderDetail.ProductId.ToString();
                }
                else
                {
                    strProductID2 += "," + orderDetail.ProductId.ToString();
                }
            }
            if (strProductID2 != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID2;
                productList = ProductBLL.SearchList(productSearch);
            }
            ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();

            productCommentSearch.OrderID = orderID;
            if (ProductCommentBLL.SearchProductCommentList(productCommentSearch).Count >= productList.Count)
            {
                string url = "";
                if (Request.RawUrl.ToLower().IndexOf("/mobile/") >= 0)
                {
                    url = "/mobile/UserProductComment.html";
                }
                else
                {
                    url = "/User/UserProductComment.html";
                }
                Response.Redirect(url);
            }
            Title = "订单评价 - 会员中心";
        }
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");
            int    id           = RequestHelper.GetQueryString <int>("Id");

            if (id > 0)
            {
                ProductCommentInfo productComment = ProductCommentBLL.Read(id);
                int oldStatus = productComment.Status;
                productComment.Status            = Convert.ToInt32(Status.Text);
                productComment.AdminReplyContent = AdminReplyContent.Text;
                productComment.AdminReplyDate    = RequestHelper.DateNow;
                CheckAdminPower("UpdateProductComment", PowerCheckType.Single);
                ProductCommentBLL.Update(productComment, oldStatus);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductComment"), productComment.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
예제 #15
0
        public ActionResult AddProductComment(int productID, int orderID)
        {
            string commentCookies = CookiesHelper.ReadCookieValue("CommentCookies" + productID.ToString());

            if (ShopConfig.ReadConfigInfo().CommentRestrictTime > 0 && commentCookies != string.Empty)
            {
                return(Content("请不要频繁提交"));
            }
            else
            {
                var procomList = ProductCommentBLL.SearchProductCommentList(new ProductCommentSearchInfo()
                {
                    OrderID = orderID, ProductId = productID, UserId = uid
                });
                if (procomList.Count > 0)
                {
                    return(Content("已经提交过相关评论"));
                }
                ProductCommentInfo productComment = new ProductCommentInfo();
                productComment.ProductId         = productID;
                productComment.Title             = StringHelper.AddSafe(RequestHelper.GetForm <string>("Title"));
                productComment.Content           = StringHelper.AddSafe(RequestHelper.GetForm <string>("Content"));
                productComment.UserIP            = ClientHelper.IP;
                productComment.PostDate          = RequestHelper.DateNow;
                productComment.Support           = 0;
                productComment.Against           = 0;
                productComment.Status            = ShopConfig.ReadConfigInfo().CommentDefaultStatus;
                productComment.Rank              = RequestHelper.GetForm <int>("Rank");
                productComment.ReplyCount        = 0;
                productComment.AdminReplyContent = string.Empty;
                productComment.AdminReplyDate    = RequestHelper.DateNow;
                productComment.UserId            = uid;
                productComment.UserName          = user.UserName;
                productComment.OrderId           = orderID;
                int pcid = ProductCommentBLL.Add(productComment);
                if (ShopConfig.ReadConfigInfo().CommentRestrictTime > 0)
                {
                    CookiesHelper.AddCookie("CommentCookies" + productID.ToString(), "CommentCookies" + productID.ToString(), ShopConfig.ReadConfigInfo().CommentRestrictTime, TimeType.Second);
                }

                return(Content("ok|" + pcid));
            }
        }
예제 #16
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ProductCommentInfo productComment = new ProductCommentInfo();

            productComment.ID                = RequestHelper.GetQueryString <int>("ID");
            productComment.Status            = Convert.ToInt32(this.Status.Text);
            productComment.AdminReplyContent = this.AdminReplyContent.Text;
            productComment.AdminReplyDate    = RequestHelper.DateNow;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (productComment.ID > 0)
            {
                base.CheckAdminPower("UpdateProductComment", PowerCheckType.Single);
                ProductCommentBLL.UpdateProductComment(productComment);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductComment"), productComment.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
예제 #17
0
        protected override void PageLoad()
        {
            base.PageLoad();

            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 20;
            int count    = 0;

            productCommentList = ProductCommentBLL.SearchList(currentPage, pageSize, new ProductCommentSearchInfo {
                UserId = base.UserId
            }, ref count);

            pager.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile));
        }
예제 #18
0
        protected override void PageLoad()
        {
            base.PageLoad();
            ProductCommentSearchInfo productComment = new ProductCommentSearchInfo();

            productComment.UserID = base.UserID;
            int queryString = RequestHelper.GetQueryString <int>("Page");

            if (queryString < 1)
            {
                queryString = 1;
            }
            int pageSize = 20;
            int count    = 0;

            this.productCommentList           = ProductCommentBLL.SearchProductCommentList(queryString, pageSize, productComment, ref count);
            this.commonPagerClass.CurrentPage = queryString;
            this.commonPagerClass.PageSize    = pageSize;
            this.commonPagerClass.Count       = count;
        }
예제 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadProductComment", PowerCheckType.Single);
         this.Name.Text          = RequestHelper.GetQueryString <string>("Name");
         this.Title.Text         = RequestHelper.GetQueryString <string>("Title");
         this.StartPostDate.Text = RequestHelper.GetQueryString <string>("StartPostDate");
         this.EndPostDate.Text   = RequestHelper.GetQueryString <string>("EndPostDate");
         this.Status.Text        = RequestHelper.GetQueryString <string>("Status");
         ProductCommentSearchInfo productComment = new ProductCommentSearchInfo();
         productComment.ProductName   = RequestHelper.GetQueryString <string>("Name");
         productComment.Title         = RequestHelper.GetQueryString <string>("Title");
         productComment.Content       = RequestHelper.GetQueryString <string>("Content");
         productComment.UserIP        = RequestHelper.GetQueryString <string>("UserIP");
         productComment.StartPostDate = RequestHelper.GetQueryString <DateTime>("StartPostDate");
         productComment.EndPostDate   = RequestHelper.GetQueryString <DateTime>("EndPostDate");
         productComment.Status        = RequestHelper.GetQueryString <int>("Status");
         base.BindControl(ProductCommentBLL.SearchProductCommentInnerList(base.CurrentPage, base.PageSize, productComment, ref this.Count), this.RecordList, this.MyPager);
     }
 }
예제 #20
0
 protected override void PageLoad()
 {
     base.PageLoad();
     int queryString = RequestHelper.GetQueryString<int>("CommentID");
     this.productComment = ProductCommentBLL.ReadProductComment(queryString, 0);
     this.product = ProductBLL.ReadProduct(this.productComment.ProductID);
     int count = -2147483648;
     int currentPage = 1;
     int pageSize = 5;
     ProductCommentSearchInfo productComment = new ProductCommentSearchInfo();
     productComment.ProductID = this.product.ID;
     this.productCommentList = ProductCommentBLL.SearchProductCommentList(currentPage, pageSize, productComment, ref count);
     string strProductID = base.Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct"));
     if (strProductID != string.Empty)
     {
         ProductSearchInfo productSearch = new ProductSearchInfo();
         productSearch.InProductID = strProductID;
         this.tempProductList = ProductBLL.SearchProductList(productSearch);
         this.tempMemberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(strProductID, base.GradeID);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         int id = RequestHelper.GetQueryString <int>("Id");
         if (id != int.MinValue)
         {
             CheckAdminPower("ReadProductComment", PowerCheckType.Single);
             productComment = ProductCommentBLL.Read(id);
             Name.Text      = ProductBLL.Read(productComment.ProductId).Name;
             //Name.NavigateUrl = "/ProductDetail-I" + productComment.ProductId + ".html";
             //Name.Target = "_blank";
             Content.Text           = productComment.Content;
             UserIP.Text            = productComment.UserIP;
             PostDate.Text          = productComment.PostDate.ToString();
             Status.Text            = productComment.Status.ToString();
             Rank.Text              = productComment.Rank.ToString();
             UserName.Text          = HttpUtility.UrlDecode(productComment.UserName, Encoding.UTF8);
             AdminReplyContent.Text = productComment.AdminReplyContent;
         }
     }
 }
예제 #22
0
        protected override void PageLoad()
        {
            base.PageLoad();

            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 10;
            int count    = 0;

            ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();

            productCommentSearch.ProductId = RequestHelper.GetQueryString <int>("ProductID");
            productCommentSearch.Status    = (int)CommentStatus.Show;
            commentList = ProductCommentBLL.SearchList(currentPage, pageSize, productCommentSearch, ref count);

            pager.CurrentPage = currentPage;
            pager.PageSize    = pageSize;
            pager.Count       = count;
        }
예제 #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         int queryString = RequestHelper.GetQueryString <int>("ID");
         if (queryString != -2147483648)
         {
             base.CheckAdminPower("ReadProductComment", PowerCheckType.Single);
             ProductCommentInfo info = ProductCommentBLL.ReadProductComment(queryString, 0);
             this.Name.Text              = ProductBLL.ReadProduct(info.ProductID).Name;
             this.Title.Text             = info.Title;
             this.Content.Text           = info.Content;
             this.UserIP.Text            = info.UserIP;
             this.PostDate.Text          = info.PostDate.ToString();
             this.Support.Text           = info.Support.ToString();
             this.Against.Text           = info.Against.ToString();
             this.Status.Text            = info.Status.ToString();
             this.Rank.Text              = info.Rank.ToString();
             this.ReplyCount.Text        = info.ReplyCount.ToString();
             this.AdminReplyContent.Text = info.AdminReplyContent;
             this.UserName.Text          = info.UserName;
         }
     }
 }
예제 #24
0
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            string action = RequestHelper.GetQueryString <string>("Action");

            switch (action)
            {
            case "Add":
                PostProductComment();
                break;

            //case "Against":
            //    AgainstComment();
            //    break;
            //case "Support":
            //    SupportComment();
            //    break;
            //case "AddTags":
            //    PostTags();
            //    break;
            default:
                break;
            }

            int currentPage = RequestHelper.GetQueryString <int>("Page");
            int commStyle   = RequestHelper.GetQueryString <int>("commStyle");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 8;
            int count    = 0;

            ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();

            productCommentSearch.ProductId = RequestHelper.GetQueryString <int>("ProductID");
            productCommentSearch.Status    = (int)CommentStatus.Show;
            switch (commStyle)
            {
            case 1: productCommentSearch.Rank = "5";
                break;

            case 2: productCommentSearch.Rank = "2,3,4";
                break;

            case 3: productCommentSearch.Rank = "1";
                break;

            default:
                break;
            }

            productCommentList = ProductCommentBLL.SearchList(currentPage, pageSize, productCommentSearch, ref count);

            ajaxPagerClass.CurrentPage = currentPage;
            ajaxPagerClass.PageSize    = pageSize;
            ajaxPagerClass.Count       = count;
            ajaxPagerClass.FirstPage   = "<<首页";
            ajaxPagerClass.PreviewPage = "<<上一页";
            ajaxPagerClass.NextPage    = "下一页>>";
            ajaxPagerClass.LastPage    = "末页>>";
            ajaxPagerClass.ListType    = false;
            ajaxPagerClass.DisCount    = false;
            ajaxPagerClass.NumType     = false;
            ajaxPagerClass.PrenextType = true;

            string strUserID = string.Empty;

            foreach (ProductCommentInfo productComment in productCommentList)
            {
                if (strUserID == string.Empty)
                {
                    strUserID = productComment.UserId.ToString();
                }
                else
                {
                    strUserID += "," + productComment.UserId.ToString();
                }
            }
            if (strUserID != string.Empty)
            {
                UserSearchInfo userSearch = new UserSearchInfo();
                userSearch.InUserId = strUserID;
                userList            = UserBLL.SearchList(userSearch);
            }
        }
예제 #25
0
        protected bool isPL = true;//是否已评论
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();

            int orderID = RequestHelper.GetQueryString <int>("OrderID");


            order = OrderBLL.Read(orderID, base.UserId);
            if (order.OrderStatus != (int)OrderStatus.ReceiveShipping)
            {
                ScriptHelper.AlertFront("只能评论已收货订单");
            }
            orderDetailList = OrderDetailBLL.ReadList(orderID);
            #region 加载订单下商品
            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                if (strProductID2 == string.Empty)
                {
                    strProductID2 = orderDetail.ProductId.ToString();
                }
                else
                {
                    strProductID2 += "," + orderDetail.ProductId.ToString();
                }
            }
            if (strProductID2 != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID2;
                productList = ProductBLL.SearchList(productSearch);
            }
            #endregion
            #region 判断是否已评论
            List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count];
            int pi = 0;
            foreach (ProductInfo item in productList)
            {
                ProductCommentSearchInfo psi = new ProductCommentSearchInfo();
                psi.ProductId    = item.Id;
                psi.UserId       = base.UserId;
                psi.OrderID      = orderID;
                listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi);
                if (listPinfoArr[pi].Count <= 0)
                {
                    isPL = false;
                }
            }
            if (isPL)
            {
                string url = "";
                if (Request.RawUrl.ToLower().IndexOf("/mobile/") >= 0)
                {
                    url = "/mobile/User/UserProductComment.html";
                }
                else
                {
                    url = "/User/UserProductComment.html";
                }
                Response.Redirect(url);
            }
            #endregion
            //ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();
            //productCommentSearch.UserId = base.UserId;
            //productCommentSearch.OrderID = orderID;
            //if (ProductCommentBLL.SearchProductCommentList(productCommentSearch).Count >= productList.Count)
            //{
            //    string url = "";
            //    if (Request.RawUrl.ToLower().IndexOf("/mobile/") >= 0)
            //    {
            //        url = "/mobile/User/UserProductComment.html";
            //    }
            //    else
            //    {
            //        url = "/User/UserProductComment.html";
            //    }
            // Response.Redirect(url);


            Title = "订单评价 - 会员中心";
        }
예제 #26
0
        protected override void PageLoad()
        {
            base.PageLoad();
            string queryString = RequestHelper.GetQueryString <string>("Action");

            if (queryString != null)
            {
                if (!(queryString == "Add"))
                {
                    if (queryString == "Against")
                    {
                        this.AgainstComment();
                    }
                    else if (queryString == "Support")
                    {
                        this.SupportComment();
                    }
                    else if (queryString == "AddTags")
                    {
                        this.PostTags();
                    }
                }
                else
                {
                    this.PostProductComment();
                }
            }
            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 8;
            int count    = 0;
            ProductCommentSearchInfo productComment = new ProductCommentSearchInfo();

            productComment.ProductID        = RequestHelper.GetQueryString <int>("ProductID");
            productComment.Status           = 2;
            this.productCommentList         = ProductCommentBLL.SearchProductCommentList(currentPage, pageSize, productComment, ref count);
            this.ajaxPagerClass.CurrentPage = currentPage;
            this.ajaxPagerClass.PageSize    = pageSize;
            this.ajaxPagerClass.Count       = count;
            this.ajaxPagerClass.DisCount    = false;
            this.ajaxPagerClass.ListType    = false;
            string str2 = string.Empty;

            foreach (ProductCommentInfo info2 in this.productCommentList)
            {
                if (str2 == string.Empty)
                {
                    str2 = info2.UserID.ToString();
                }
                else
                {
                    str2 = str2 + "," + info2.UserID.ToString();
                }
            }
            if (str2 != string.Empty)
            {
                UserSearchInfo user = new UserSearchInfo();
                user.InUserID = str2;
                this.userList = UserBLL.SearchUserList(user);
            }
        }
예제 #27
0
        /// <summary>
        /// 提交数据
        /// </summary>
        protected override void PostBack()
        {
            string url = "";

            if (Request.RawUrl.ToLower().IndexOf("/mobile/") >= 0)
            {
                url = "/mobile/";
            }
            else
            {
                url = "/User/";
            }
            if (base.UserId > 0)
            {
                int orderID = RequestHelper.GetForm <int>("OrderID");

                order           = OrderBLL.Read(orderID, base.UserId);
                orderDetailList = OrderDetailBLL.ReadList(orderID);

                if (order.Id > 0)
                {
                    if (ProductCommentBLL.SearchProductCommentList(new ProductCommentSearchInfo {
                        OrderID = order.Id
                    }).Count <= 0)
                    {
                        List <ProductCommentInfo> productCommentList = new List <ProductCommentInfo>();
                        foreach (OrderDetailInfo orderDetail in orderDetailList)
                        {
                            if (RequestHelper.GetForm <int>("pid_" + orderDetail.ProductId) > 0)
                            {
                                proID = RequestHelper.GetForm <int>("pid_" + orderDetail.ProductId);
                            }
                        }
                        //foreach (OrderDetailInfo orderDetail in orderDetailList)
                        //{
                        int    rank    = RequestHelper.GetForm <int>("rank_" + proID);
                        string title   = StringHelper.AddSafe(RequestHelper.GetForm <string>("title_" + proID));
                        string content = StringHelper.AddSafe(RequestHelper.GetForm <string>("content_" + proID));

                        //   ProductInfo product = ProductBLL.ReadProduct(orderDetail.ProductID);
                        ProductInfo product = ProductBLL.Read(proID);
                        if (rank >= 1 && rank <= 5 && content != string.Empty)
                        {
                            ProductCommentInfo productComment = new ProductCommentInfo();
                            //   productComment.ProductID = orderDetail.ProductID;
                            productComment.ProductId         = proID;
                            productComment.Title             = title;
                            productComment.Content           = content;
                            productComment.UserIP            = ClientHelper.IP;
                            productComment.PostDate          = RequestHelper.DateNow;
                            productComment.Support           = 0;
                            productComment.Against           = 0;
                            productComment.Status            = ShopConfig.ReadConfigInfo().CommentDefaultStatus;
                            productComment.Rank              = rank;
                            productComment.ReplyCount        = 0;
                            productComment.AdminReplyContent = string.Empty;
                            productComment.AdminReplyDate    = RequestHelper.DateNow;
                            productComment.UserId            = base.UserId;
                            productComment.UserName          = base.UserName;
                            productComment.OrderId           = order.Id;
                            productComment.BuyDate           = order.AddDate;
                            productCommentList.Add(productComment);
                        }
                        else
                        {
                            ResponseHelper.Redirect(url + "CommentOrderProduct-O" + order.Id + ".html");
                        }
                        //}

                        foreach (ProductCommentInfo comment in productCommentList)
                        {
                            ProductCommentBLL.Add(comment);
                        }

                        ResponseHelper.Redirect(url + "UserProductComment.html");
                    }
                    else
                    {
                        ResponseHelper.Redirect(url + "UserProductComment.html");
                    }
                }
                else
                {
                    ResponseHelper.Redirect(url + "Order.html");
                }
            }
            else
            {
                ResponseHelper.Redirect(url + "Login.html");
            }
        }
예제 #28
0
        public ActionResult Detail(int id)
        {
            int userGrade = UserGradeBLL.ReadByMoney(0).Id;
            int uid       = RequestHelper.GetForm <int>("uid");
            var user      = UserBLL.ReadUserMore(uid);

            if (user.Id > 0)
            {
                userGrade     = UserGradeBLL.ReadByMoney(user.MoneyUsed).Id;
                user.UserName = HttpUtility.UrlDecode(user.UserName, System.Text.Encoding.UTF8);
            }

            if (id <= 0)
            {
                return(Json(new { ok = false, error = "该产品未上市" }));
            }
            string      fromwhere = RequestHelper.GetQueryString <string>("fw");
            ProductInfo product   = ProductBLL.Read(id);

            if (product.IsSale == (int)BoolType.False || product.IsDelete == 1)
            {
                return(Json(new { ok = false, error = "该产品未上市" }));
            }
            #region 如果商品没有小程序码 则生成并保存
            if (string.IsNullOrWhiteSpace(product.Qrcode))
            {
                string product_miniProramCode = string.Empty;
                CreateMiniProgramCode(product.Id, ref product_miniProramCode, product.Qrcode);
                if (!string.IsNullOrWhiteSpace(product_miniProramCode))
                {//如果调用接口成功生成小程序码(因为只有发布后才能使用此微信接口)
                    Dictionary <string, object> dict = new Dictionary <string, object>();
                    dict.Add("[Qrcode]", product_miniProramCode);
                    ProductBLL.UpdatePart("[Product]", dict, product.Id);
                    product.Qrcode = product_miniProramCode;
                }
            }
            #endregion
            //更新查看数量
            if (CookiesHelper.ReadCookie("productview" + product.Id + "") == null)
            {
                ProductBLL.ChangeViewCount(id, 1);
                CookiesHelper.AddCookie("productview" + product.Id + "", product.Id.ToString());
            }
            ProductCommentSearchInfo proCommSear = new ProductCommentSearchInfo();
            var proComm = ProductCommentBLL.SearchProductCommentList(proCommSear = new ProductCommentSearchInfo {
                ProductId = product.Id, Status = (int)CommentStatus.Show
            });
            var procomlist = new List <VirtualProductCommend>();
            foreach (var item in proComm)
            {
                VirtualProductCommend vpc = new VirtualProductCommend()
                {
                    id         = item.Id,
                    name       = HttpUtility.UrlDecode(item.UserName, Encoding.UTF8),
                    avator     = ShopCommon.ShowImage(UserBLL.Read(item.UserId).Photo),
                    lv         = item.Rank,
                    date       = item.PostDate,
                    content    = item.Content,
                    imglist    = ProductPhotoBLL.ReadList(item.Id, 3),
                    adminreply = item.AdminReplyContent,
                    replydate  = item.AdminReplyDate
                };
                procomlist.Add(vpc);
            }

            //产品价格
            int hotCount           = 0;
            var currentMemberPrice = ProductBLL.GetCurrentPrice(product.SalePrice, userGrade);
            var prorecommend       = ProductBLL.SearchList(1, 8, new ProductSearchInfo {
                IsSale = (int)BoolType.True, IsTop = (int)BoolType.True, IsDelete = (int)BoolType.False, NotInProductId = product.Id.ToString()
            }, ref hotCount);
            var prorelist = new List <ProductVirtualModel>();
            foreach (var item in prorecommend)
            {
                var vp = new ProductVirtualModel()
                {
                    id          = item.Id,
                    name        = item.Name,
                    img         = ShopCommon.ShowImage(item.Photo.Replace("Original", "150-150")),
                    imgbig      = ShopCommon.ShowImage(item.Photo.Replace("Original", "350-350")),
                    imgorg      = ShopCommon.ShowImage(item.Photo),
                    price       = ProductBLL.GetCurrentPrice(item.SalePrice, userGrade),
                    marketprice = item.MarketPrice,
                    click       = item.ViewCount,
                    like        = item.LikeNum,
                    totalstore  = item.StandardType == (int)ProductStandardType.Single ? ProductTypeStandardRecordBLL.GetSumStorageByProduct(item.Id) : item.TotalStorageCount,
                    //ordercount = item.OrderCount
                    //是否启用不限库存,分别计算销量
                    ordercount = item.UnlimitedStorage == 1 ? OrderBLL.GetProductOrderCountDaily(item.Id, item.StandardType, DateTime.Now) : item.OrderCount
                };
                prorelist.Add(vp);
            }
            //产品图片
            List <ProductPhotoInfo> productPhotoList = new List <ProductPhotoInfo>();
            ProductPhotoInfo        productPhoto     = new ProductPhotoInfo();
            productPhoto.Name     = product.Name;
            productPhoto.ImageUrl = product.Photo;
            productPhotoList.Add(productPhoto);
            productPhotoList.AddRange(ProductPhotoBLL.ReadList(id, 0));
            productPhotoList.ForEach(k => k.ImageUrl = k.ImageUrl.Replace("75-75", "Original"));
            //属性
            var attributeRecordList = ProductTypeAttributeRecordBLL.ReadList(id);

            #region 产品规格
            List <ProductTypeStandardInfo> standardList = new List <ProductTypeStandardInfo>();
            string  standardRecordValueList             = "|";
            var     standardRecordList = ProductTypeStandardRecordBLL.ReadListByProduct(product.Id, product.StandardType);
            decimal maxPrice           = product.SalePrice;
            if (standardRecordList.Count > 0)
            {
                string[] standardIDArray = standardRecordList[0].StandardIdList.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < standardIDArray.Length; i++)
                {
                    int standardID = Convert.ToInt32(standardIDArray[i]);
                    ProductTypeStandardInfo standard = ProductTypeStandardBLL.Read(standardID);
                    string[] valueArray = standard.ValueList.Split(';');
                    string   valueList  = string.Empty;
                    for (int k = 0; k < valueArray.Length; k++)
                    {
                        foreach (ProductTypeStandardRecordInfo standardRecord in standardRecordList)
                        {
                            if (standardRecord.MarketPrice > maxPrice)
                            {
                                maxPrice = standardRecord.MarketPrice;
                            }
                            string[] tempValueArray = standardRecord.ValueList.Split(';');
                            if (valueArray[k] == tempValueArray[i])
                            {
                                valueList += valueArray[k] + ";";
                                break;
                            }
                        }
                    }
                    if (valueList != string.Empty)
                    {
                        valueList = valueList.Substring(0, valueList.Length - 1);
                    }
                    standard.ValueList = valueList;
                    standardList.Add(standard);
                }
                //规格值
                foreach (ProductTypeStandardRecordInfo standardRecord in standardRecordList)
                {
                    standardRecordValueList += standardRecord.ProductId + ";" + standardRecord.ValueList + "|";
                }
            }
            #endregion
            #region 正在开的团(进行中,排除本人开的团)
            GroupBuySearchInfo gpsearch = new GroupBuySearchInfo
            {
                ProductId = product.Id,
                //NotLeader = user.Id,
                Status = (int)GroupBuyStatus.Going
            };
            List <GroupBuyInfo> gpList = GroupBuyBLL.SearchList(gpsearch);
            gpList.ForEach(k => k.groupSignList = GroupSignBLL.ReadListByGroupId(k.Id));
            gpList.ForEach(k => k.GroupUserName = System.Web.HttpUtility.UrlDecode(k.GroupUserName, Encoding.UTF8));
            #endregion
            return(Json(new
            {
                ok = true,
                product = new
                {
                    id = product.Id,
                    img = ShopCommon.ShowImage(product.Photo.Replace("Original", "350-350")),
                    imgorg = ShopCommon.ShowImage(product.Photo),
                    title = product.Name,
                    summary = product.Summary,
                    price = currentMemberPrice,
                    marketprice = product.MarketPrice,
                    intro = string.IsNullOrEmpty(product.Introduction1_Mobile) ? product.Introduction1 : product.Introduction1_Mobile,
                    remark = product.Remark,
                    totalstore = product.StandardType == (int)ProductStandardType.Single ? ProductTypeStandardRecordBLL.GetSumStorageByProduct(product.Id) : product.TotalStorageCount,
                    ordercount = product.UnlimitedStorage == 1 ? OrderBLL.GetProductOrderCountDaily(product.Id, product.StandardType, DateTime.Now) : product.OrderCount,
                    unlimitedstorage = product.UnlimitedStorage,
                    virtualordercount = product.VirtualOrderCount,
                    usevirtualorder = product.UseVirtualOrder,
                    opengroup = product.OpenGroup,
                    groupprice = product.GroupPrice,
                    groupquantity = product.GroupQuantity,
                    qrcode = product.Qrcode,
                    groupphoto = string.IsNullOrWhiteSpace(product.GroupPhoto) ? product.Photo : product.GroupPhoto
                },
                standardList = standardList,
                standardRecordValueList = standardRecordValueList,
                attributeRecordList = attributeRecordList,
                productPhotoList = productPhotoList,
                prorecommend = prorelist,
                proComm = procomlist,
                maxPrice = maxPrice,
                groupList = gpList
            }, JsonRequestBehavior.AllowGet));
        }
예제 #29
0
        private void Submit()
        {
            string urlPrefix = string.IsNullOrEmpty(isMobile) ? "/user" : "/mobile";

            if (base.UserId < 1)
            {
                ResponseHelper.Write("error|登录状态已过期,请重新登录|" + urlPrefix + "/login.html");
                ResponseHelper.End();
            }

            int orderId = RequestHelper.GetForm <int>("orderId");

            if (ProductCommentBLL.HasCommented(orderId, base.UserId))
            {
                ResponseHelper.Write("error|订单已评价|" + urlPrefix + "/userproductcomment.html");
                ResponseHelper.End();
            }

            order = OrderBLL.Read(orderId, base.UserId);
            if (order.Id < 1)
            {
                ResponseHelper.Write("error|订单不存在|" + urlPrefix + "/order.html");
                ResponseHelper.End();
            }

            orderDetailList = OrderDetailBLL.ReadList(orderId);

            List <ProductCommentInfo> productCommentList = new List <ProductCommentInfo>();

            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                int    rank    = RequestHelper.GetForm <int>("rank_" + orderDetail.ProductId);
                string content = StringHelper.AddSafe(RequestHelper.GetForm <string>("content_" + orderDetail.ProductId));

                if (rank >= 1 && rank <= 5 && !string.IsNullOrEmpty(content))
                {
                    ProductCommentInfo productComment = new ProductCommentInfo();
                    productComment.ProductId         = orderDetail.ProductId;
                    productComment.Title             = "";
                    productComment.Content           = content;
                    productComment.UserIP            = ClientHelper.IP;
                    productComment.PostDate          = RequestHelper.DateNow;
                    productComment.Support           = 0;
                    productComment.Against           = 0;
                    productComment.Status            = ShopConfig.ReadConfigInfo().CommentDefaultStatus;
                    productComment.Rank              = rank;
                    productComment.ReplyCount        = 0;
                    productComment.AdminReplyContent = string.Empty;
                    productComment.AdminReplyDate    = RequestHelper.DateNow;
                    productComment.UserId            = base.UserId;
                    productComment.UserName          = base.UserName;
                    productComment.OrderId           = order.Id;
                    productComment.BuyDate           = order.AddDate;

                    productCommentList.Add(productComment);
                }
                else
                {
                    ResponseHelper.Write("error|评价失败|" + urlPrefix + "/userproductcommentAdd.html?orderid=" + order.Id);
                    ResponseHelper.End();
                }
            }

            foreach (ProductCommentInfo comment in productCommentList)
            {
                ProductCommentBLL.Add(comment);
            }

            ResponseHelper.Write("ok|评价成功|" + urlPrefix + "/userproductcomment.html");
            ResponseHelper.End();
        }
예제 #30
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();

            int count = int.MinValue;

            topNav = 2;
            int id = RequestHelper.GetQueryString <int>("ID");

            if (id <= 0)
            {
                ScriptHelper.AlertFront("该产品未上市,不能查看");
            }
            string fromwhere = RequestHelper.GetQueryString <string>("fw");

            product = ProductBLL.Read(id);
            if (product.IsSale == (int)BoolType.False || product.IsDelete == 1)
            {
                if (fromwhere.ToLower() != "admin")
                {
                    ScriptHelper.AlertFront("该产品未上市,不能查看");
                }
                else
                {
                    if (Cookies.Admin.GetAdminID(true) == 0)//用户未登录
                    {
                        ScriptHelper.AlertFront("该产品未上市,不能查看");
                    }
                }
            }

            navList = ProductClassBLL.ProductClassNameList(product.ClassId);
            //更新查看数量
            if (CookiesHelper.ReadCookie("productview" + product.Id + "") == null)
            {
                ProductBLL.ChangeViewCount(id, 1);
                CookiesHelper.AddCookie("productview" + product.Id + "", product.Id.ToString());
            }
            ProductCommentSearchInfo proCommSear = new ProductCommentSearchInfo();

            proComm = ProductCommentBLL.SearchProductCommentList(proCommSear = new ProductCommentSearchInfo {
                ProductId = product.Id
            });

            //会员等级
            userGradeList = UserGradeBLL.ReadList();
            //产品价格
            int hotCount = 0;

            currentMemberPrice = ProductBLL.GetCurrentPrice(product.SalePrice, base.GradeID);
            hotProductList     = ProductBLL.SearchList(1, 7, new ProductSearchInfo {
                IsHot = (int)BoolType.True, IsSale = (int)BoolType.True, IsDelete = (int)BoolType.False, NotInProductId = product.Id.ToString()
            }, ref hotCount);
            ishot = ProductBLL.SearchList(1, 7, new ProductSearchInfo {
                IsHot = (int)BoolType.True, IsSale = (int)BoolType.True, IsTop = (int)BoolType.True, IsDelete = (int)BoolType.False, NotInProductId = product.Id.ToString()
            }, ref hotCount);
            proishot = ProductBLL.SearchList(1, 3, new ProductSearchInfo {
                IsSale = (int)BoolType.True, IsTop = (int)BoolType.True, IsDelete = (int)BoolType.False, NotInProductId = product.Id.ToString()
            }, ref hotCount);

            //产品图片
            ProductPhotoInfo productPhoto = new ProductPhotoInfo();

            productPhoto.Name     = product.Name;
            productPhoto.ImageUrl = product.Photo;
            productPhotoList.Add(productPhoto);
            productPhotoList.AddRange(ProductPhotoBLL.ReadList(id, 0));
            // 关联产品,配件,浏览过的商品
            strHistoryProduct = Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct"));
            string tempStrProductID = product.RelationProduct + "," + product.Accessory + "," + strHistoryProduct;

            tempStrProductID = tempStrProductID.Replace(",,", ",");
            if (tempStrProductID.StartsWith(","))
            {
                tempStrProductID = tempStrProductID.Substring(1);
            }
            if (tempStrProductID.EndsWith(","))
            {
                tempStrProductID = tempStrProductID.Substring(0, tempStrProductID.Length - 1);
            }
            ProductSearchInfo productSearch = new ProductSearchInfo();

            productSearch.InProductId = tempStrProductID;
            tempProductList           = ProductBLL.SearchList(productSearch);

            //属性
            attributeRecordList = ProductTypeAttributeRecordBLL.ReadList(id);

            //产品文章
            if (product.RelationArticle != string.Empty)
            {
                ArticleSearchInfo articleSearch = new ArticleSearchInfo();
                articleSearch.InArticleId = product.RelationArticle;
                productArticleList        = ArticleBLL.SearchList(articleSearch);
            }
            //产品规格
            standardRecordList = ProductTypeStandardRecordBLL.ReadListByProduct(product.Id, product.StandardType);
            if (standardRecordList.Count > 0)
            {
                string[] standardIDArray = standardRecordList[0].StandardIdList.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < standardIDArray.Length; i++)
                {
                    int standardID = Convert.ToInt32(standardIDArray[i]);
                    ProductTypeStandardInfo standard = ProductTypeStandardBLL.Read(standardID);
                    string[] valueArray = standard.ValueList.Split(';');
                    string   valueList  = string.Empty;
                    for (int k = 0; k < valueArray.Length; k++)
                    {
                        foreach (ProductTypeStandardRecordInfo standardRecord in standardRecordList)
                        {
                            string[] tempValueArray = standardRecord.ValueList.Split(';');
                            if (valueArray[k] == tempValueArray[i])
                            {
                                valueList += valueArray[k] + ";";
                                break;
                            }
                        }
                    }
                    if (valueList != string.Empty)
                    {
                        valueList = valueList.Substring(0, valueList.Length - 1);
                    }
                    standard.ValueList = valueList;
                    standardList.Add(standard);
                }
                //规格值
                foreach (ProductTypeStandardRecordInfo standardRecord in standardRecordList)
                {
                    standardRecordValueList += standardRecord.ProductId + ";" + standardRecord.ValueList + "|";
                }
            }
            //计算剩余库存量

            leftStorageCount = product.TotalStorageCount - product.OrderCount;

            //搜索优化
            Title       = (product.SubTitle == string.Empty) ? product.Name : product.SubTitle;
            Keywords    = (product.Keywords == string.Empty) ? product.Name : product.Keywords;
            Description = (product.Summary == string.Empty) ? StringHelper.Substring(StringHelper.KillHTML(product.Introduction1), 200) : product.Summary;
        }