コード例 #1
0
 private void btnDelUser_Click(object sender, EventArgs e)
 {
     BL.CLS_Login clsL = new BL.CLS_Login();
     if (MessageBox.Show("هل تريد حذف المستخدم المحدد؟", "الحذف", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         clsL.Delete_User(DG_Users.CurrentRow.Cells[0].Value.ToString());
         DG_Users.DataSource = clsL.Search_User("");
     }
 }
コード例 #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("هل أنت متأكد من الحذف؟", "تنبيه", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
         {
             Login.Delete_User(dataGridView1.CurrentRow.Cells[0].Value.ToString());
             MessageBox.Show("تم الحذف بنجاح", "عملية الحذف", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.dataGridView1.DataSource = Login.SearchUsers("");
         }
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }