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