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