Exemple #1
0
        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();
            }
        }
Exemple #2
0
 void View()
 {
     RepeaterThongBao.DataSource = db.select_NguoiDat();
     RepeaterThongBao.DataBind();
 }
Exemple #3
0
 protected void sortAsc_Click(object sender, EventArgs e)
 {
     RepeaterThongBao.DataSource = db.Sort_ThongBaoAsc();
     RepeaterThongBao.DataBind();
 }
Exemple #4
0
 void View()
 {
     RepeaterThongBao.DataSource = db.Select_AllChitiet();
     RepeaterThongBao.DataBind();
 }
Exemple #5
0
 void View()
 {
     RepeaterThongBao.DataSource = db.Select_ThongBao();
     RepeaterThongBao.DataBind();
 }