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