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