Exemplo n.º 1
0
 private void btxoa_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có thật sự muốn thực hiện thao tác xoá ", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         TaiLieu taiLieu = TaiLieu.GetTaiLieuTheoMa(txtMaTL.Text);
         if (taiLieu != null)
         {
             if (TaiLieu.XoaBo(taiLieu.IDTaiLieu))
             {
                 MessageBox.Show("Xóa tài liệu thành công!!!");
                 Load_treeview();
             }
             else
             {
                 MessageBox.Show("Lỗi trong xoá bỏ tài liệu", "Thông báo");
             }
         }
     }
 }