Example #1
0
        void BindData1()
        {
            ClassBudget b  = new ClassBudget();
            DataTable   dt = b.GetBudgetSearch(txtSearchBudgetID.Text, txtSearchBudgetName.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
Example #2
0
 protected void btnSearchBudgetName_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchBudgetID.Text) && string.IsNullOrEmpty(txtSearchBudgetName.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassBudget b  = new ClassBudget();
         DataTable   dt = b.GetBudgetSearch(txtSearchBudgetID.Text, txtSearchBudgetName.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }