Пример #1
0
 private void LoadDSMon(string timKiem = "", bool trangThai = true)
 {
     if (chkMAConSuDung.Checked == false)
     {
         List <MonDTO> lstMon = MonBUS.LayDanhSachMon(timKiem, trangThai);
         dgvDSMon.DataSource = lstMon;
     }
     else
     {
         dgvDSMon.DataSource  = MonBUS.LayDSMonAnBiXoa();
         dgvDSMon.CurrentCell = null;
         XoaForm(false);
         btnCapNhat.Hide();
         btnThem.Hide();
         btnXoa.Hide();
         btnLamMoi.Hide();
         btnKhoiPhuc.Show();
         if (dgvDSMon.Rows.Count > 0)
         {
             btnKhoiPhuc.Enabled = true;
         }
         else
         {
             btnKhoiPhuc.Enabled = false;
         }
         chkTrangThai.Checked = false;
         picHinh.Image        = null;
     }
 }