Beispiel #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();
                }
            }
        }
Beispiel #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();
            }
        }