コード例 #1
0
 private void TxtTimTuKhoa_TextChanged(object sender, EventArgs e)
 {
     if (cbTimTheo.SelectedItem.ToString() == "Tên sách")
     {
         dl.TuKhoa = txtTimTuKhoa.Text;
         dtgThongTinSach.DataSource = xldl.Sach_TenSach_Select(dl);
     }
     else if (cbTimTheo.SelectedItem.ToString() == "Thể loại sách")
     {
         dl.TuKhoa = txtTimTuKhoa.Text;
         dtgThongTinSach.DataSource = xldl.Sach_TenTheLoai_Select(dl);
     }
     else
     if (cbTimTheo.SelectedItem.ToString() == "Tác giả")
     {
         dl.TuKhoa = txtTimTuKhoa.Text;
         dtgThongTinSach.DataSource = xldl.Sach_TenTacGia_Select(dl);
     }
     else
     if (cbTimTheo.SelectedItem.ToString() == "Nhà xuất bản")
     {
         dl.TuKhoa = txtTimTuKhoa.Text;
         dtgThongTinSach.DataSource = xldl.Sach_TenNhaXuatBan_Select(dl);
     }
 }