private void btnXoa_Click(object sender, EventArgs e)
 {
     if (lblMaND.Text.Length > 0)
     {
         var confirmResult = MessageBox.Show("Bạn có chắc là muốn xóa người dùng này?",
                                             "Xác nhận",
                                             MessageBoxButtons.YesNo);
         if (confirmResult == DialogResult.Yes)
         {
             int  maND      = int.Parse(lblMaND.Text);
             bool isSuccess = _nguoiDungDAL.Delete(maND);
             if (isSuccess)
             {
                 LoadData();
             }
             else
             {
                 MessageBox.Show("Xóa người dùng bị lỗi, làm ơn thử lại!");
             }
         }
     }
 }
Exemplo n.º 2
0
 public int Delete(string ID)
 {
     return(dal.Delete(ID));
 }