Esempio n. 1
0
        protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
        {
            if (Session["name"] != null)
            {
                string        name = Session["name"].ToString();
                SqlDataReader dr   = CategoryBLL.SelectBook(5, e.NewPageIndex, name);
                this.repBookList.DataSource = dr;
                this.repBookList.DataBind();
                dr.Close();
            }

            else
            {
                int BLID = Convert.ToInt32(Request.QueryString["BLID"]);
                int BSID = Convert.ToInt32(Request.QueryString["BSID"]);
                if (BLID > 0)
                {
                    SqlDataReader dr = BLCategoryBLL.SelecBLIDtBook(5, e.NewPageIndex, BLID);
                    this.repBookList.DataSource = dr;
                    this.repBookList.DataBind();
                }
                else
                {
                    SqlDataReader dr = BSCategoryBLL.SelectBook(5, e.NewPageIndex, BSID);
                    this.repBookList.DataSource = dr;
                    this.repBookList.DataBind();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        ///TreeView传值进行查询
        /// </summary>
        private void SelectTreeView()
        {
            int BLID = Convert.ToInt32(Request.QueryString["BLID"]);
            int BSID = Convert.ToInt32(Request.QueryString["BSID"]);

            if (BLID > 0)
            {
                SqlDataReader dr = BLCategoryBLL.SelecBLIDtBook(5, 1, BLID);
                this.repBookList.DataSource = dr;
                this.repBookList.DataBind();
            }
            else
            {
                SqlDataReader dr = BSCategoryBLL.SelectBook(5, 1, BSID);
                this.repBookList.DataSource = dr;
                this.repBookList.DataBind();
            }
        }
Esempio n. 3
0
        private void SelectAll()
        {
            List <BLCategory> list = BLCategoryBLL.SelectAll();

            foreach (var item in list)
            {
                TreeNode tn = new TreeNode();
                tn.Text        = item.BLName;
                tn.Value       = item.BLID.ToString();
                tn.NavigateUrl = "Category.aspx?BLID=" + item.BLID;

                this.TreeView1.Nodes.Add(tn);
                List <BSCategory> list2 = BSCategoryBLL.SelectAll(item.BLID);
                foreach (var item2 in list2)
                {
                    TreeNode tn2 = new TreeNode();
                    tn2.Text        = item2.BLName;
                    tn2.Value       = item2.BSID.ToString();
                    tn2.NavigateUrl = "Category.aspx?BSID=" + item2.BSID;
                    tn.ChildNodes.Add(tn2);
                }
            }
        }