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