예제 #1
0
        protected void BindGridGuest()
        {
            Maticsoft.BLL.tGuestBook BLL = new Maticsoft.BLL.tGuestBook();

            Grid.RecordCount = BLL.GetRecordCount("");
            Grid.DataSource  = BLL.GetListByPage("", " Leave_time desc,Id desc ", Grid.PageIndex * Grid.PageSize, (Grid.PageIndex + 1) * Grid.PageSize);

            Grid.DataBind();
        }
예제 #2
0
        protected void btnSelect_Click(object sender, EventArgs e)
        {
            string txtVal = this.txtValue.Text.Trim();

            if (txtVal == "")
            {
                return;
            }

            Maticsoft.BLL.tGuestBook BLL = new Maticsoft.BLL.tGuestBook();

            Grid.RecordCount = BLL.GetRecordCount(String.Format(" Leave_name   like '%{0}%' ", txtVal));
            Grid.DataSource  = BLL.GetListByPage(String.Format(" Leave_name  like '%{0}%' ", txtVal), " Leave_time desc,Id desc ", Grid.PageIndex * Grid.PageSize, (Grid.PageIndex + 1) * Grid.PageSize);

            Grid.DataBind();
        }