protected void lbuRefresh_Click(object sender, EventArgs e) { ClearData(); ClassBlood b = new ClassBlood(); DataTable dt = b.GetBlood(""); GridView1.DataSource = dt; GridView1.DataBind(); SetViewState(dt); }
protected void lbuSearch_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtSearchBloodName.Text)) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true); return; } else { ClassBlood b = new ClassBlood(); DataTable dt = b.GetBlood(txtSearchBloodName.Text); GridView1.DataSource = dt; GridView1.DataBind(); SetViewState(dt); } }
void BindData1() { ClassBlood b = new ClassBlood(); DataTable dt = b.GetBlood(txtSearchBloodName.Text); GridView1.DataSource = dt; GridView1.DataBind(); SetViewState(dt); }
void BindData() { ClassBlood b = new ClassBlood(); DataTable dt = b.GetBlood(""); GridView1.DataSource = dt; GridView1.DataBind(); SetViewState(dt); }