コード例 #1
0
ファイル: fThietBi.cs プロジェクト: vqhuyz/QuanLyGym
 private void btnXoa_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dialog = MessageBox.Show("Bạn chắc chắn muốn xóa thiết bị này?", "Cảnh báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
         if (dialog == DialogResult.OK)
         {
             tb.XoaThietBI(txtMaTB.Text);
             MessageBox.Show("Xóa thiết bị được chọn thành công !!");
             clear();
             hienthi();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }