protected void Search_Click(object sender, EventArgs e) { using (SqlConnection sqlCon = new SqlConnection(connectionString)) { SqlCommand cmd = new SqlCommand(); cmd.Connection = sqlCon; cmd.CommandText = "Search_NguoiDat"; cmd.CommandType = CommandType.StoredProcedure; if (txtSearch.Text != null) { SqlParameter param = new SqlParameter("@id", txtSearch.Text); cmd.Parameters.Add(param); } sqlCon.Open(); SqlDataReader rdr = cmd.ExecuteReader(); RepeaterThongBao.DataSource = rdr; RepeaterThongBao.DataBind(); } }
void View() { RepeaterThongBao.DataSource = db.select_NguoiDat(); RepeaterThongBao.DataBind(); }
protected void sortAsc_Click(object sender, EventArgs e) { RepeaterThongBao.DataSource = db.Sort_ThongBaoAsc(); RepeaterThongBao.DataBind(); }
void View() { RepeaterThongBao.DataSource = db.Select_AllChitiet(); RepeaterThongBao.DataBind(); }
void View() { RepeaterThongBao.DataSource = db.Select_ThongBao(); RepeaterThongBao.DataBind(); }