Пример #1
0
        void BindData1()
        {
            ClassTitleName t  = new ClassTitleName();
            DataTable      dt = t.GetTitleNameSearch(txtSearchTitleID.Text, txtSearchTitleName.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
Пример #2
0
 protected void btnSearchTitle_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchTitleID.Text) && string.IsNullOrEmpty(txtSearchTitleName.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassTitleName t  = new ClassTitleName();
         DataTable      dt = t.GetTitleNameSearch(txtSearchTitleID.Text, txtSearchTitleName.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }