示例#1
0
 public void addVePhong()
 {
     dgvTS.DataSource = null;
     if (cbbKhoa.SelectedItem.ToString() == "Tat ca" && cbbPhong.SelectedItem.ToString() == "Tat ca")
     {
         dgvTS.DataSource = bll.GetInfoTSAllPhong_BLL();
         stt(dgvTS);
     }
     if (cbbKhoa.SelectedItem.ToString() != "Tat ca" && cbbPhong.SelectedItem.ToString() == "Tat ca")
     {
         string makhoa = bll.GetMaKhoa_BLL(cbbKhoa.SelectedItem.ToString());
         dgvTS.DataSource = bll.GetinfoTScua1khoa_BLL(makhoa);
         stt(dgvTS);
     }
     if (cbbKhoa.SelectedItem.ToString() != "Tat ca" && cbbPhong.SelectedItem.ToString() != "Tat ca")
     {
         string maphong = bll.GetMaPhong_BLL(cbbPhong.SelectedItem.ToString());
         dgvTS.DataSource = bll.GetInfoTSOnePhong_BLL(maphong);
         stt(dgvTS);
     }
 }