private void btn_delete_Click_1(object sender, EventArgs e)
 {
     user.deleteUser(dataGridView1.CurrentRow.Cells[1].Value.ToString());
     dataGridView1.DataSource = user.getUser();
     dataGridView1.Update();
     MessageBox.Show("تمت عملية الحذف بنجاح", "تم الحذف", MessageBoxButtons.OK);
 }
示例#2
0
文件: FrmUser.cs 项目: tai8292/cdio
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (DialogResult.Yes == MessageBox.Show("Do you want to Delete this User? ", "Noted", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
     {
         user.deleteUser();
         user.loadForm();
         txtID.Clear();
         txtName.Clear();
         btnDelete.Enabled = false;
         btnReset.Enabled  = false;
         MessageBox.Show("You deleted successfully!");
     }
 }