예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("StatisticsProduct", PowerCheckType.Single);
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         this.ClassID.Text        = RequestHelper.GetQueryString <string>("ClassID");
         this.BrandID.Text        = RequestHelper.GetQueryString <string>("BrandID");
         this.Name.Text           = RequestHelper.GetQueryString <string>("Name");
         this.StorageAnalyse.Text = RequestHelper.GetQueryString <string>("StorageAnalyse");
         ProductSearchInfo product = new ProductSearchInfo();
         product.IsSale         = 1;
         product.Name           = RequestHelper.GetQueryString <string>("Name");
         product.ClassID        = RequestHelper.GetQueryString <string>("ClassID");
         product.InBrandID      = RequestHelper.GetQueryString <string>("BrandID");
         product.StorageAnalyse = RequestHelper.GetQueryString <int>("StorageAnalyse");
         List <ProductInfo> dataSource = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count);
         base.BindControl(dataSource, this.RecordList, this.MyPager);
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("StatisticsProduct", PowerCheckType.Single);
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         ProductSearchInfo productSearch = new ProductSearchInfo();
         productSearch.IsSale    = 1;
         productSearch.Name      = RequestHelper.GetQueryString <string>("Name");
         productSearch.ClassID   = RequestHelper.GetQueryString <string>("ClassID");
         productSearch.InBrandID = RequestHelper.GetQueryString <string>("BrandID");
         string queryString = RequestHelper.GetQueryString <string>("ProductOrderType");
         queryString = (queryString == string.Empty) ? "SellCount" : queryString;
         productSearch.ProductOrderType = queryString;
         this.ClassID.Text          = RequestHelper.GetQueryString <string>("ClassID");
         this.BrandID.Text          = RequestHelper.GetQueryString <string>("BrandID");
         this.Name.Text             = RequestHelper.GetQueryString <string>("Name");
         this.StartDate.Text        = RequestHelper.GetQueryString <string>("StartDate");
         this.EndDate.Text          = RequestHelper.GetQueryString <string>("EndDate");
         this.ProductOrderType.Text = queryString;
         DateTime startDate = RequestHelper.GetQueryString <DateTime>("StartDate");
         DateTime endDate   = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndDate"));
         base.BindControl(ProductBLL.StatisticsProductSale(base.CurrentPage, base.PageSize, productSearch, ref this.Count, startDate, endDate), this.RecordList, this.MyPager);
     }
 }
예제 #3
0
        protected string CreatBrandCheckBoxHtml(string brandIDStr)
        {
            StringBuilder brandCheckBoxHtml = new StringBuilder();

            brandCheckBoxHtml.Append("<div class=\"checkboxlistarea\">");
            brandCheckBoxHtml.AppendLine("<dl>");
            brandCheckBoxHtml.Append("<dt><input name=\"AllBrandID\" type=\"checkbox\" value=\"0\" ");
            if (brandIDStr == "0")
            {
                brandCheckBoxHtml.Append(" checked");
            }
            brandCheckBoxHtml.Append(">所有品牌</dt>");
            brandCheckBoxHtml.AppendLine("<div class=\"checkboxlist\">");
            foreach (ProductBrandInfo info in ProductBrandBLL.ReadProductBrandCacheList())
            {
                brandCheckBoxHtml.AppendLine("<dd><input name=\"BrandID\" data-type=\"0\" type=\"checkbox\" value=\"" + info.ID + "\"");
                if (StringHelper.CompareStringContainSpecialValue(brandIDStr, info.ID.ToString()))
                {
                    brandCheckBoxHtml.Append(" checked");
                }
                brandCheckBoxHtml.Append(">" + info.Name + "</dd>");
            }
            brandCheckBoxHtml.AppendLine("</div>");
            brandCheckBoxHtml.AppendLine("</dl>");
            brandCheckBoxHtml.Append("</div>");

            return(brandCheckBoxHtml.ToString());
        }
예제 #4
0
        protected override void PageLoad()
        {
            base.PageLoad();
            base.Title = "¹«Ë¾±à¼­";
            base.CheckUserPower("ReadCompany,UpdateCompany,UpdateSubCompany", PowerCheckType.OR);

            string sonCompanyID = CookiesHelper.ReadCookieValue("UserCompanySonCompanyID");

            if (companyID > 0)
            {
                if (!StringHelper.CompareSingleString(sonCompanyID, companyID.ToString()))
                {
                    ScriptHelper.Alert("Òì³£");
                }
            }
            else
            {
                companyID = base.UserCompanyID;
            }
            company = CompanyBLL.ReadCompany(companyID);
            if (StringHelper.CompareSingleString(company.BrandId, "0"))
            {
                productBrandList = ProductBrandBLL.ReadProductBrandCacheList();
            }
            else
            {
                productBrandList = ProductBrandBLL.ReadProductBrandCacheList(company.BrandId);
            }
            departmentList = PostBLL.ReadParentPostListByPostId(company.Post);
            postList       = PostBLL.ReadPostListByPostId(company.Post);
            if (company.GroupId == (int)CompanyType.SubCompany || company.GroupId == (int)CompanyType.SubGroup)
            {
                parentCompanyPath = CompanyBLL.ReadParentCompanyName(company.ParentId);
            }
        }
예제 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ProductBatchEdit", PowerCheckType.Single);
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         string queryString = RequestHelper.GetQueryString <string>("Action");
         if (queryString != null)
         {
             if (!(queryString == "UnionEdit"))
             {
                 if (queryString == "search")
                 {
                     ProductSearchInfo productSearch = new ProductSearchInfo();
                     productSearch.Name         = RequestHelper.GetQueryString <string>("Name");
                     productSearch.ClassID      = RequestHelper.GetQueryString <string>("ClassID");
                     productSearch.InBrandID    = RequestHelper.GetQueryString <string>("BrandID");
                     productSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
                     productSearch.EndAddDate   = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
                     this.ClassID.Text          = RequestHelper.GetQueryString <string>("ClassID");
                     this.BrandID.Text          = RequestHelper.GetQueryString <string>("BrandID");
                     this.Name.Text             = RequestHelper.GetQueryString <string>("Name");
                     this.StartAddDate.Text     = RequestHelper.GetQueryString <string>("StartAddDate");
                     this.EndAddDate.Text       = RequestHelper.GetQueryString <string>("EndAddDate");
                     base.BindControl(ProductBLL.SearchProductList(productSearch), this.RecordList);
                 }
             }
             else
             {
                 this.UnionEdit();
             }
         }
         this.userGradeList = UserGradeBLL.ReadUserGradeCacheList();
         foreach (UserGradeInfo info3 in this.userGradeList)
         {
             if (this.userGradeIDList == string.Empty)
             {
                 this.userGradeIDList   = info3.ID.ToString();
                 this.userGradeNameList = info3.Name;
             }
             else
             {
                 this.userGradeIDList   = this.userGradeIDList + "," + info3.ID.ToString();
                 this.userGradeNameList = this.userGradeNameList + "," + info3.Name;
             }
         }
     }
 }
예제 #6
0
 protected override void PageLoad()
 {
     this.helpClassList    = ArticleClassBLL.ReadArticleClassChildList(4);
     this.productClassList = ProductClassBLL.ReadProductClassRootList();
     //this.allProductClassList = ProductClassBLL.ReadProductClassNamedList();
     this.topProductBrandList = ProductBrandBLL.ReadProductBrandIsTopCacheList();
     this.productBrandList    = ProductBrandBLL.ReadProductBrandCacheList();
     this.hotKeyword          = ShopConfig.ReadConfigInfo().HotKeyword;
     this.bottomList          = ArticleBLL.ReadBottomList();
     //this.tagsList = TagsBLL.ReadHotTagsList();
 }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         List <ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList();
         this.RelationBrandID.DataSource     = list;
         this.RelationBrandID.DataTextField  = "Name";
         this.RelationBrandID.DataValueField = "ID";
         this.RelationBrandID.DataBind();
         this.RelationBrandID.Items.Insert(0, new ListItem("选择品牌", string.Empty));
     }
 }
예제 #8
0
        protected void BindClassBrandAttributeClassStandardType()
        {
            List <ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList();

            this.BrandID.DataSource     = list;
            this.BrandID.DataTextField  = "Name";
            this.BrandID.DataValueField = "ID";
            this.BrandID.DataBind();
            this.BrandID.Items.Insert(0, new ListItem("选择品牌", "0"));
            this.RelationBrandID.DataSource     = list;
            this.RelationBrandID.DataTextField  = "Name";
            this.RelationBrandID.DataValueField = "ID";
            this.RelationBrandID.DataBind();
            this.RelationBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
            this.AccessoryBrandID.DataSource     = list;
            this.AccessoryBrandID.DataTextField  = "Name";
            this.AccessoryBrandID.DataValueField = "ID";
            this.AccessoryBrandID.DataBind();
            this.AccessoryBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
            List <ProductClassInfo> list2 = ProductClassBLL.ReadProductClassNamedList();

            foreach (ProductClassInfo info in list2)
            {
                this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
            }
            this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
            foreach (ProductClassInfo info in list2)
            {
                this.AccessoryClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
            }
            this.AccessoryClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
            this.AttributeClassID.DataSource     = AttributeClassBLL.ReadAttributeClassCacheList();
            this.AttributeClassID.DataTextField  = "Name";
            this.AttributeClassID.DataValueField = "ID";
            this.AttributeClassID.DataBind();
            this.AttributeClassID.Items.Insert(0, new ListItem("请选择", "0"));
            foreach (ArticleClassInfo info2 in ArticleClassBLL.ReadArticleClassChildList(3))
            {
                this.ArticleClassID.Items.Add(new ListItem(info2.ClassName, "|" + info2.ID + "|"));
            }
            this.ArticleClassID.Items.Insert(0, new ListItem(ArticleClassBLL.ReadArticleClassCache(3).ClassName, "|" + 3 + "|"));
            this.StandardType.DataSource     = EnumHelper.ReadEnumList <ProductStandardType>();
            this.StandardType.DataTextField  = "ChineseName";
            this.StandardType.DataValueField = "Value";
            this.StandardType.DataBind();
        }
예제 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadProduct", PowerCheckType.Single);
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         this.ClassID.Text      = RequestHelper.GetQueryString <string>("ClassID");
         this.BrandID.Text      = RequestHelper.GetQueryString <string>("BrandID");
         this.Key.Text          = RequestHelper.GetQueryString <string>("Key");
         this.StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
         this.EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");
         this.IsSpecial.Text    = RequestHelper.GetQueryString <string>("IsSpecial");
         this.IsNew.Text        = RequestHelper.GetQueryString <string>("IsNew");
         this.IsHot.Text        = RequestHelper.GetQueryString <string>("IsHot");
         this.IsTop.Text        = RequestHelper.GetQueryString <string>("IsTop");
         List <ProductInfo> dataSource = new List <ProductInfo>();
         ProductSearchInfo  product    = new ProductSearchInfo();
         product.Key          = RequestHelper.GetQueryString <string>("Key");
         product.ClassID      = RequestHelper.GetQueryString <string>("ClassID");
         product.InBrandID    = RequestHelper.GetQueryString <string>("BrandID");
         product.IsSpecial    = RequestHelper.GetQueryString <int>("IsSpecial");
         product.IsNew        = RequestHelper.GetQueryString <int>("IsNew");
         product.IsHot        = RequestHelper.GetQueryString <int>("IsHot");
         product.IsSale       = 1;
         product.IsTop        = RequestHelper.GetQueryString <int>("IsTop");
         product.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
         product.EndAddDate   = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
         base.PageSize        = 10;
         dataSource           = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count);
         base.BindControl(dataSource, this.RecordList, this.MyPager);
     }
 }
예제 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadProductBrand", PowerCheckType.Single);
         string queryString = RequestHelper.GetQueryString <string>("Action");
         int    id          = RequestHelper.GetQueryString <int>("ID");
         if ((id != 0) && (queryString != string.Empty))
         {
             base.CheckAdminPower("UpdateProductBrand", PowerCheckType.Single);
             ChangeAction up = ChangeAction.Up;
             if (queryString == "down")
             {
                 up = ChangeAction.Down;
             }
             ProductBrandBLL.ChangeProductBrandOrder(up, id);
             AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("MoveRecord"), ShopLanguage.ReadLanguage("ProductBrand"), id);
         }
         base.BindControl(ProductBrandBLL.ReadProductBrandCacheList(), this.RecordList);
     }
 }
예제 #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("StatisticsSale", PowerCheckType.Single);
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         this.ClassID.Text      = RequestHelper.GetQueryString <string>("ClassID");
         this.BrandID.Text      = RequestHelper.GetQueryString <string>("BrandID");
         this.Name.Text         = RequestHelper.GetQueryString <string>("Name");
         this.StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
         this.EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");
         this.UserName.Text     = RequestHelper.GetQueryString <string>("UserName");
         this.OrderNumber.Text  = RequestHelper.GetQueryString <string>("OrderNumber");
         ProductSearchInfo productSearch = new ProductSearchInfo();
         OrderSearchInfo   orderSearch   = new OrderSearchInfo();
         productSearch.IsSale      = 1;
         productSearch.Name        = RequestHelper.GetQueryString <string>("Name");
         productSearch.ClassID     = RequestHelper.GetQueryString <string>("ClassID");
         productSearch.InBrandID   = RequestHelper.GetQueryString <string>("BrandID");
         productSearch.InProductID = RequestHelper.GetQueryString <string>("ProductID");
         orderSearch.StartAddDate  = RequestHelper.GetQueryString <DateTime>("StartAddDate");
         orderSearch.EndAddDate    = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
         orderSearch.UserName      = RequestHelper.GetQueryString <string>("UserName");
         orderSearch.OrderNumber   = RequestHelper.GetQueryString <string>("OrderNumber");
         base.BindControl(OrderDetailBLL.StatisticsSaleDetail(base.CurrentPage, base.PageSize, orderSearch, productSearch, ref this.Count), this.RecordList, this.MyPager);
     }
 }
예제 #12
0
        protected void ExcelOut(List <UserInfo> userList)
        {
            //生成Excel开始
            string FilePath = "~/xml/Demo.xls";

            XlsDocument xls = new XlsDocument();                        //创建空xls文档

            xls.FileName = Server.MapPath(FilePath);                    //保存路径,如果直接发送到客户端的话只需要名称 生成名称

            Worksheet sheet = xls.Workbook.Worksheets.AddNamed("会员列表"); //创建一个工作页为Dome

            //设置指定工作页跨行跨列
            MergeArea ma = new MergeArea(1, 1, 1, 6);//合并单元格 行与列

            sheet.AddMergeArea(ma);

            //设置指定工作页跨行跨列结束

            //创建列样式创建列时引用
            XF cellXF = xls.NewXF();

            cellXF.VerticalAlignment   = VerticalAlignments.Centered;
            cellXF.HorizontalAlignment = HorizontalAlignments.Centered;
            cellXF.Font.Height         = 24 * 12;
            cellXF.Font.Bold           = true;
            //cellXF.Pattern = 1;//设定单元格填充风格。如果设定为0,则是纯色填充
            //cellXF.PatternBackgroundColor = Colors.Red;//填充的背景底色
            //cellXF.PatternColor = Colors.Red;//设定填充线条的颜色
            //创建列样式结束

            //创建列
            Cells cells = sheet.Cells; //获得指定工作页列集合
            //列操作基本
            Cell cell = cells.Add(1, 1, "会员列表", cellXF);

            //设置XY居中
            cell.HorizontalAlignment = HorizontalAlignments.Centered;
            cell.VerticalAlignment   = VerticalAlignments.Centered;
            //设置字体
            cell.Font.Bold       = true;               //设置粗体
            cell.Font.ColorIndex = 0;                  //设置颜色码
            cell.Font.FontFamily = FontFamilies.Roman; //设置字体 默认为宋体
            //创建列结束


            //创建数据
            int LineNum = 3;

            if (userList.Count > 0)
            {
                cells.Add(2, 1, "序号");
                cells.Add(2, 2, "姓名");
                cells.Add(2, 3, "公司简称");
                cells.Add(2, 4, "品牌");
                cells.Add(2, 5, "手机");
                cells.Add(2, 6, "Email");
                //cells.Add(2, 7, "原始岗位");
                //cells.Add(2, 5, "性别");
                //cells.Add(2, 8, "用户ID");
                //cells.Add(2, 9, "工作岗位");
                //cells.Add(2, 9, "学习岗位");
                //cells.Add(2, 10, "帐户类型");
                foreach (UserInfo Info in userList)
                {
                    cells.Add(LineNum, 1, LineNum - 2);
                    cells.Add(LineNum, 2, Info.RealName);
                    cells.Add(LineNum, 3, ReadCompany(Info.CompanyID).CompanySimpleName);
                    cells.Add(LineNum, 4, ReadBrandName(ProductBrandBLL.ReadProductBrandCacheList(StringHelper.SubString(ReadCompany(Info.CompanyID).BrandId, "17"))));
                    cells.Add(LineNum, 5, Info.Mobile);
                    cells.Add(LineNum, 6, Info.Email);
                    //cells.Add(LineNum, 7, Info.PostName);
                    //cells.Add(LineNum, 5, EnumHelper.ReadEnumChineseName<SexType>(Info.Sex));
                    //cells.Add(LineNum, 2, PostBLL.ReadPost(Info.Department).PostName);
                    //cells.Add(LineNum, 8, Info.UserName);
                    //cells.Add(LineNum, 9, BLLPost.ReadPost(Info.PostId).PostName);
                    //cells.Add(LineNum, 9, PostBLL.ReadPost(Info.StudyPostID).PostName);
                    //cells.Add(LineNum, 10, AdminGroupBLL.ReadAdminGroupCache(Info.GroupID).Name);

                    LineNum = LineNum + 1;
                }
            }
            //
            //生成保存到服务器如果存在不会覆盖并且报异常所以先删除在保存新的
            //ScriptHelper.Alert(Server.MapPath("~/Demo.xls"));
            if (File.Exists(Server.MapPath(FilePath)))
            {
                File.Delete(Server.MapPath(FilePath));//删除
            }
            //保存文档
            xls.Save(Server.MapPath(FilePath)); //保存到服务器
            xls.Send();                         //发送到客户端
        }
예제 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ProductBatchEdit", PowerCheckType.Single);
         if (RequestHelper.GetQueryString <string>("Action") == "SingleEdit")
         {
             this.SingleEdit();
         }
         foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList())
         {
             this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|"));
         }
         this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));
         this.BrandID.DataSource     = ProductBrandBLL.ReadProductBrandCacheList();
         this.BrandID.DataTextField  = "Name";
         this.BrandID.DataValueField = "ID";
         this.BrandID.DataBind();
         this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));
         ProductSearchInfo product = new ProductSearchInfo();
         product.Name           = RequestHelper.GetQueryString <string>("Name");
         product.ClassID        = RequestHelper.GetQueryString <string>("ClassID");
         product.InBrandID      = RequestHelper.GetQueryString <string>("BrandID");
         product.StartAddDate   = RequestHelper.GetQueryString <DateTime>("StartAddDate");
         product.EndAddDate     = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
         this.ClassID.Text      = RequestHelper.GetQueryString <string>("ClassID");
         this.BrandID.Text      = RequestHelper.GetQueryString <string>("BrandID");
         this.Name.Text         = RequestHelper.GetQueryString <string>("Name");
         this.StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
         this.EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");
         this.productList       = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count);
         base.BindControl(this.MyPager);
         string strProductID = string.Empty;
         foreach (ProductInfo info3 in this.productList)
         {
             if (strProductID == string.Empty)
             {
                 strProductID = info3.ID.ToString();
             }
             else
             {
                 strProductID = strProductID + "," + info3.ID.ToString();
             }
         }
         this.userGradeList   = UserGradeBLL.ReadUserGradeCacheList();
         this.memberPriceList = MemberPriceBLL.ReadMemberPriceByProduct(strProductID);
         foreach (UserGradeInfo info4 in this.userGradeList)
         {
             if (this.userGradeIDList == string.Empty)
             {
                 this.userGradeIDList   = info4.ID.ToString();
                 this.userGradeNameList = info4.Name;
             }
             else
             {
                 this.userGradeIDList   = this.userGradeIDList + "," + info4.ID.ToString();
                 this.userGradeNameList = this.userGradeNameList + "," + info4.Name;
             }
         }
     }
 }
예제 #14
0
        protected void SearchCondition()
        {
            string keyword = RequestHelper.GetQueryString <string>("Keyword");
            string tags    = RequestHelper.GetQueryString <string>("Tags");

            ProductSearchInfo productSearch = new ProductSearchInfo();

            productSearch.IsSale    = 1;
            productSearch.IsSpecial = 1;

            if (!string.IsNullOrEmpty(brandID))
            {
                List <ProductBrandInfo> productBrandList = ProductBrandBLL.ReadProductBrandCacheList(brandID);
                foreach (ProductBrandInfo info in productBrandList)
                {
                    showCondition += ShowCondition("BrandID", info.Name);
                }
                productSearch.InBrandID = brandID;
            }

            if (postID > 0)
            {
                PostInfo studyPost = PostBLL.ReadPost(postID);
                showCondition            += ShowCondition("PostID", studyPost.PostName);
                productSearch.InProductID = studyPost.PostPlan;
            }

            if (classID > 0)
            {
                ProductClassInfo productClass = ProductClassBLL.ReadProductClassCache(classID);
                showCondition        += ShowCondition("ClassID", productClass.ClassName);
                productSearch.ClassID = "|" + classID.ToString() + "|";
            }

            if (keyword != string.Empty)
            {
                showCondition    += "“" + keyword + "”";
                productSearch.Key = keyword;
            }

            productSearchList = ProductBLL.SearchProductList(base.CurrentPage, 15, productSearch, ref Count);
            this.commonPagerClass.CurrentPage = base.CurrentPage;
            this.commonPagerClass.PageSize    = 15;
            this.commonPagerClass.Count       = Count;

            if (string.IsNullOrEmpty(showCondition))
            {
                showCondition = "<li class=\"select-no\">您暂无选择筛选条件<span class=\"count-result\">共<span style=\"margin:0 4px;\">" + base.Count.ToString() + "</span>个结果</span></li>";
            }

            //this.searchCondition = "ClassID=" + classID.ToString() + "&ProductName=" + keyword + "&BrandID=" + brandID.ToString() + "&Tags=" + tags;
            //if (classID > 0)
            //{
            //    ProductClassInfo info = ProductClassBLL.ReadProductClassCache(classID);
            //    this.showCondition = "分类:<span>" + info.ClassName + "</span>";
            //    this.showTitle = info.ClassName;
            //    //showDescription = info.Description;
            //    this.searchType = 2;
            //    int iD = info.ID;
            //    if (ProductClassBLL.ReadProductClassChildList(info.ID).Count == 0)
            //    {
            //        iD = info.FatherID;
            //    }
            //    foreach (ProductClassInfo info2 in ProductClassBLL.ReadProductClassChildList(iD))
            //    {
            //        this.relationSearch = string.Concat(new object[] { relationSearch, "<a href=\"/Product-C", info2.ID, ".aspx\">", info2.ClassName, "</a>" });
            //    }
            //}
            //if (brandID > 0)
            //{
            //    ProductBrandInfo Info = ProductBrandBLL.ReadProductBrandCache(brandID);
            //    this.showCondition = "品牌:<span>" + Info.Name + "</span>";
            //    this.showTitle = Info.Name;
            //    //showDescription = Info.Description;
            //    this.searchType = 2;
            //    foreach (ProductBrandInfo info3 in base.topProductBrandList)
            //    {
            //        this.relationSearch = string.Concat(new object[] { relationSearch, "<a href=\"/Product-B", info3.ID, ".aspx\">", info3.Name, "</a>" });
            //    }
            //}
            //if (tags != string.Empty)
            //{
            //    this.showCondition = "标签:<span>" + tags + "</span>";
            //    this.showTitle = tags;
            //    this.searchType = 2;
            //    foreach (TagsInfo info4 in base.tagsList)
            //    {
            //        this.relationSearch = this.relationSearch + "<a href=\"/Product/Tags/" + base.Server.UrlEncode(info4.Word) + ".aspx\"  style=\"font-size:" + info4.Size.ToString() + "px; color:" + info4.Color + "\">" + info4.Word + "</a>";
            //    }
            //}
            //if (RequestHelper.GetQueryString<int>("IsNew") == 1)
            //{
            //    this.showCondition = "新品上市";
            //    this.showTitle = "新品上市";
            //    this.searchCondition = "IsNew=1";
            //}
            //if (RequestHelper.GetQueryString<int>("IsHot") == 1)
            //{
            //    this.showCondition = "热销商品";
            //    this.showTitle = "热销商品";
            //    this.searchCondition = "IsHot=1";
            //}
            //if (RequestHelper.GetQueryString<int>("IsSpecial") == 1)
            //{
            //    this.showCondition = "特价商品";
            //    this.showTitle = "特价商品";
            //    this.searchCondition = "IsSpecial=1";
            //}
            //if (RequestHelper.GetQueryString<int>("IsTop") == 1)
            //{
            //    this.showCondition = "推荐商品";
            //    this.showTitle = "推荐商品";
            //    this.searchCondition = "IsTop=1";
            //}
            //if (keyword != string.Empty)
            //{
            //    this.showCondition = this.showCondition + "关键字:<span>" + keyword + "</span>";
            //    this.showTitle = this.showTitle + keyword;
            //    this.searchType = 2;
            //    foreach (string str3 in ShopConfig.ReadConfigInfo().HotKeyword.Split(new char[] { ',' }))
            //    {
            //        this.relationSearch = this.relationSearch + "<a href=\"/Product/Keyword/" + base.Server.UrlEncode(str3) + ".aspx\">" + str3 + "</a>";
            //    }
            //}
            //if (this.searchType == 1)
            //{
            //    if (this.showCondition != string.Empty)
            //    {
            //        this.showCondition = "首页 > " + this.showCondition;
            //    }
            //    else
            //    {
            //        this.showCondition = "首页 > 全部商品";
            //        this.showTitle = "全部商品";
            //    }
            //}
            //else
            //{
            //    this.showCondition = "您搜索的" + this.showCondition;
            //}
            base.Title = this.showTitle + " - 商品展示";
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string companyPost    = string.Empty;
            string companyBrandId = string.Empty;

            if (companyID < 0)
            {
                companyID = CompanyBLL.SystemCompanyId;
            }
            if (!this.Page.IsPostBack)
            {
                if (companyID > 0)
                {
                    base.CheckAdminPower("ReadCompany", PowerCheckType.Single);
                    CompanyInfo CompanyModel = CompanyBLL.ReadCompany(companyID);
                    companyPost      = CompanyModel.Post;
                    CompanyType.Text = CompanyModel.GroupId.ToString();

                    //如果是子集团或或者是集团下的子公司,都需调出上级单位
                    if (CompanyModel.GroupId > 1)
                    {
                        GroupListId.Value = CompanyModel.ParentId;
                        foreach (string Item in CompanyModel.ParentId.Split(','))
                        {
                            GroupNameList.InnerHtml += "<li id=\"li_" + Item + "\" style=\"float:none;\">" + CompanyBLL.ReadCompany(int.Parse(Item)).CompanyName + "<a onclick=\"javascript:DelGroup(" + Item + ");\"><img src=\"Style/Images/delete.gif\"></a></li>";
                        }

                        CompanyInfo Model = new CompanyInfo();
                        Model.GroupIdCondition = "1,2";
                        Model.CompanyId        = companyID;
                        GroupId.DataSource     = CompanyBLL.ReadCompanyList(Model);
                        GroupId.DataTextField  = "CompanyName";
                        GroupId.DataValueField = "CompanyId";
                        GroupId.DataBind();
                        GroupId.Items.Insert(0, new ListItem("请选择隶属公司", "-1"));
                        GroupBrand.Style["display"] = "";
                    }

                    CompanyName.Text       = CompanyModel.CompanyName;
                    CompanySimpleName.Text = CompanyModel.CompanySimpleName;
                    companyBrandId         = CompanyModel.BrandId;
                    CompanyTel.Text        = CompanyModel.CompanyTel;
                    CompanyPost.Text       = CompanyModel.CompanyPost;
                    CompanyAddress.Text    = CompanyModel.CompanyAddress;
                    PostStartDate.Text     = CompanyModel.PostStartDate.ToString().Split(' ')[0];
                    if (CompanyModel.EndDate != null)
                    {
                        EndDate.Text = CompanyModel.EndDate.ToString().Split(' ')[0];
                    }
                    Sort.Text      = CompanyModel.Sort.ToString();
                    State.Text     = CompanyModel.State.ToString();
                    UserNum.Text   = CompanyModel.UserNum.ToString();
                    IsTest.Checked = CompanyModel.IsTest;
                }

                //品牌设置
                BrandHtml.AppendLine("<dl class=\"carbrand\">");
                foreach (ProductBrandInfo info in ProductBrandBLL.ReadProductBrandCacheList())
                {
                    BrandHtml.AppendLine("<dd><input name=\"BrandId\" type=\"checkbox\" value=\"" + info.ID + "\"");
                    if (StringHelper.CompareString(companyBrandId, info.ID.ToString()))
                    {
                        BrandHtml.Append(" checked");
                    }
                    BrandHtml.Append(">" + info.Name + "</dd>");
                }
                BrandHtml.AppendLine("</dl>");

                PostHtml.Append(CreatePostHtml(companyPost, 0));
            }
        }