Ejemplo n.º 1
0
        protected void btnSelect_Click1(object sender, EventArgs e)
        {
            string search = txtKeyWord.Text.Trim();
            string sqlstr = "select * from ModuleInfo_View where CardName like @title order by CardDate desc";

            CardInfo.DataSource = sqlBind.Search(sqlstr, search);
            CardInfo.DataBind();
        }
Ejemplo n.º 2
0
 protected void gvModuleInfo_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     if (txtKeyWord.Text.Trim() == "")
     {
         CardInfo.PageIndex = e.NewPageIndex;
         string sqlstr = "select * from ModuleInfo_View order by CardDate desc";
         sqlBind.gvBind(CardInfo, sqlstr);
     }
     else
     {
         CardInfo.PageIndex = e.NewPageIndex;
         string search = txtKeyWord.Text.Trim();
         string sqlstr = "select * from ModuleInfo_View where CardName like @title order by CardDate desc";
         CardInfo.DataSource = sqlBind.Search(sqlstr, search);
         CardInfo.DataBind();
     }
 }