コード例 #1
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            TagsSearchInfo tagsSearch = new TagsSearchInfo();

            tagsSearch.UserID = base.UserID;
            tagsList          = TagsBLL.SearchTagsList(tagsSearch);
        }
コード例 #2
0
ファイル: TagsBLL.cs プロジェクト: xuefuruanjian/ems
 public static List <TagsInfo> ReadHotTagsList()
 {
     if (CacheHelper.Read(cacheKey) == null)
     {
         TagsSearchInfo tags = new TagsSearchInfo();
         tags.IsTop = 1;
         CacheHelper.Write(cacheKey, SearchTagsList(tags));
     }
     return((List <TagsInfo>)CacheHelper.Read(cacheKey));
 }
コード例 #3
0
ファイル: Tags.aspx.cs プロジェクト: xuefuruanjian/ems
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadTags", PowerCheckType.Single);
         TagsSearchInfo tags = new TagsSearchInfo();
         tags.ProductName      = RequestHelper.GetQueryString <string>("ProductName");
         tags.Word             = RequestHelper.GetQueryString <string>("Word");
         tags.IsTop            = RequestHelper.GetQueryString <int>("IsTop");
         this.ProductName.Text = tags.ProductName;
         this.Word.Text        = tags.Word;
         this.IsTop.Text       = tags.IsTop.ToString();
         base.BindControl(TagsBLL.SearchTagsList(base.CurrentPage, base.PageSize, tags, ref this.Count), this.RecordList, this.MyPager);
     }
 }
コード例 #4
0
        public List <TagsInfo> SearchTagsList(TagsSearchInfo tagsSearch)
        {
            MssqlCondition condition = new MssqlCondition();

            condition.Add("[Word]", tagsSearch.Word, ConditionType.Like);
            condition.Add("[IsTop]", tagsSearch.IsTop, ConditionType.Equal);
            condition.Add("[ProductID]", tagsSearch.ProductID, ConditionType.Equal);
            condition.Add("[UserID]", tagsSearch.UserID, ConditionType.Equal);
            List <TagsInfo> tagsList = new List <TagsInfo>();

            SqlParameter[] pt = new SqlParameter[] { new SqlParameter("@condition", SqlDbType.NVarChar) };
            pt[0].Value = condition.ToString();
            using (SqlDataReader reader = ShopMssqlHelper.ExecuteReader(ShopMssqlHelper.TablePrefix + "SearchTagsList", pt))
            {
                this.PrepareTagsModel(reader, tagsList);
            }
            return(tagsList);
        }
コード例 #5
0
        public List <TagsInfo> SearchTagsList(int currentPage, int pageSize, TagsSearchInfo tagsSearch, ref int count)
        {
            List <TagsInfo>     list   = new List <TagsInfo>();
            ShopMssqlPagerClass class2 = new ShopMssqlPagerClass();

            class2.TableName   = " " + ShopMssqlHelper.TablePrefix + "Tags INNER JOIN " + ShopMssqlHelper.TablePrefix + "Product ON " + ShopMssqlHelper.TablePrefix + "Tags.[ProductID]=" + ShopMssqlHelper.TablePrefix + "Product.[ID] ";
            class2.Fields      = ShopMssqlHelper.TablePrefix + "Tags.[ID],[ProductID],[Word]," + ShopMssqlHelper.TablePrefix + "Tags.[Color],[Size]," + ShopMssqlHelper.TablePrefix + "Tags.[IsTop],[UserID],[UserName]," + ShopMssqlHelper.TablePrefix + "Product.[Name]";
            class2.CurrentPage = currentPage;
            class2.PageSize    = pageSize;
            class2.OrderField  = ShopMssqlHelper.TablePrefix + "Tags.[ID]";
            class2.OrderType   = OrderType.Desc;
            class2.MssqlCondition.Add(ShopMssqlHelper.TablePrefix + "Tags.[Word]", tagsSearch.Word, ConditionType.Like);
            class2.MssqlCondition.Add(ShopMssqlHelper.TablePrefix + "Tags.[IsTop]", tagsSearch.IsTop, ConditionType.Equal);
            class2.MssqlCondition.Add(ShopMssqlHelper.TablePrefix + "Product.[Name]", tagsSearch.ProductName, ConditionType.Like);
            class2.MssqlCondition.Add("[UserID]", tagsSearch.UserID, ConditionType.Equal);
            class2.Count = count;
            count        = class2.Count;
            using (SqlDataReader reader = class2.ExecuteReader())
            {
                while (reader.Read())
                {
                    TagsInfo item = new TagsInfo();
                    item.ID           = reader.GetInt32(0);
                    item.ProductID    = reader.GetInt32(1);
                    item.Word         = reader[2].ToString();
                    item.Color        = reader[3].ToString();
                    item.Size         = reader.GetInt32(4);
                    item.IsTop        = reader.GetInt32(5);
                    item.UserID       = reader.GetInt32(6);
                    item.UserName     = reader[7].ToString();
                    item.Product.Name = reader[8].ToString();
                    list.Add(item);
                }
            }
            return(list);
        }
コード例 #6
0
ファイル: ProductDetail.cs プロジェクト: xuefuruanjian/ems
        protected override void PageLoad()
        {
            base.PageLoad();
            int queryString = RequestHelper.GetQueryString <int>("ID");

            this.product = ProductBLL.ReadProduct(queryString);
            if (this.product.IsSale == 0)
            {
                ScriptHelper.Alert("该产品未上市,不能查看");
            }
            ProductBLL.ChangeProductViewCount(queryString, 1);
            this.userGradeList      = UserGradeBLL.ReadUserGradeCacheList();
            this.memberPriceList    = MemberPriceBLL.ReadMemberPriceByProduct(queryString);
            this.currentMemberPrice = (this.product.MarketPrice * UserGradeBLL.ReadUserGradeCache(base.GradeID).Discount) / 100M;
            foreach (MemberPriceInfo info in this.memberPriceList)
            {
                if (info.GradeID == base.GradeID)
                {
                    this.currentMemberPrice = info.Price;
                    break;
                }
            }
            this.currentMemberPrice = Math.Round(this.currentMemberPrice, 2);
            ProductPhotoInfo item = new ProductPhotoInfo();

            item.Name  = this.product.Name;
            item.Photo = this.product.Photo;
            this.productPhotoList.Add(item);
            this.productPhotoList.AddRange(ProductPhotoBLL.ReadProductPhotoByProduct(queryString));
            this.strHistoryProduct = base.Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct"));
            string strProductID = (this.product.RelationProduct + "," + this.product.Accessory + "," + this.strHistoryProduct).Replace(",,", ",");

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

            productSearch.InProductID = strProductID;
            this.tempProductList      = ProductBLL.SearchProductList(productSearch);
            if (strProductID != string.Empty)
            {
                this.tempMemberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(strProductID, base.GradeID);
            }
            this.attributeRecordList = AttributeRecordBLL.ReadAttributeRecordByProduct(queryString);
            TagsSearchInfo tags = new TagsSearchInfo();

            tags.ProductID       = queryString;
            this.productTagsList = TagsBLL.SearchTagsList(tags);
            if (this.product.RelationArticle != string.Empty)
            {
                ArticleSearchInfo articleSearch = new ArticleSearchInfo();
                articleSearch.InArticleID = this.product.RelationArticle;
                this.productArticleList   = ArticleBLL.SearchArticleList(articleSearch);
            }
            this.standardRecordList = StandardRecordBLL.ReadStandardRecordByProduct(this.product.ID, this.product.StandardType);
            if ((this.standardRecordList.Count > 0) && (this.product.StandardType == 1))
            {
                string[] strArray = this.standardRecordList[0].StandardIDList.Split(new char[] { ',' });
                for (int i = 0; i < strArray.Length; i++)
                {
                    StandardInfo info6     = StandardBLL.ReadStandardCache(Convert.ToInt32(strArray[i]));
                    string[]     strArray2 = info6.ValueList.Split(new char[] { ',' });
                    string[]     strArray3 = info6.PhotoList.Split(new char[] { ',' });
                    string       str2      = string.Empty;
                    string       str3      = string.Empty;
                    for (int j = 0; j < strArray2.Length; j++)
                    {
                        foreach (StandardRecordInfo info7 in this.standardRecordList)
                        {
                            string[] strArray4 = info7.ValueList.Split(new char[] { ',' });
                            if (strArray2[j] == strArray4[i])
                            {
                                str2 = str2 + strArray2[j] + ",";
                                str3 = str3 + strArray3[j] + ",";
                                goto Label_043B;
                            }
                        }
                        Label_043B :;
                    }
                    if (str2 != string.Empty)
                    {
                        str2 = str2.Substring(0, str2.Length - 1);
                        str3 = str3.Substring(0, str3.Length - 1);
                    }
                    info6.ValueList = str2;
                    info6.PhotoList = str3;
                    this.standardList.Add(info6);
                }
                foreach (StandardRecordInfo info7 in this.standardRecordList)
                {
                    object standardRecordValueList = this.standardRecordValueList;
                    this.standardRecordValueList = string.Concat(new object[] { standardRecordValueList, info7.ProductID, ",", info7.ValueList, "|" });
                }
            }
            if (ShopConfig.ReadConfigInfo().ProductStorageType == 1)
            {
                this.leftStorageCount = this.product.TotalStorageCount - this.product.OrderCount;
            }
            else
            {
                this.leftStorageCount = this.product.ImportVirtualStorageCount;
            }
            base.Title       = this.product.Name;
            base.Keywords    = (this.product.Keywords == string.Empty) ? this.product.Name : this.product.Keywords;
            base.Description = (this.product.Summary == string.Empty) ? StringHelper.Substring(StringHelper.KillHTML(this.product.Introduction), 200) : this.product.Summary;
        }
コード例 #7
0
ファイル: TagsBLL.cs プロジェクト: xuefuruanjian/ems
 public static List <TagsInfo> SearchTagsList(int currentPage, int pageSize, TagsSearchInfo tags, ref int count)
 {
     return(dal.SearchTagsList(currentPage, pageSize, tags, ref count));
 }
コード例 #8
0
ファイル: TagsBLL.cs プロジェクト: xuefuruanjian/ems
 public static List <TagsInfo> SearchTagsList(TagsSearchInfo tags)
 {
     return(dal.SearchTagsList(tags));
 }