Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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!");
     }
 }