01-04-16, 10:45 PM
(آخر تعديل لهذه المشاركة : 01-04-16, 10:46 PM {2} بواسطة رومنس الشوق.)
السلام عليكم
عندي هذا الكود للحذف
وانا اريد ان اضع رساله تنبيه هل تريد الحذف
اذا تم الضغط على نعم يحذف المعامله
اذا تم الضغط على لا لايتم حذف المعامله
هذا هو الكود المراد التعديل عليه
كود :
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
conn.Open()
Try
Dim cmddelete As New OleDbCommand
cmddelete.CommandText = "delete from tan where idmt = '" + txtid_m.Text + "'"
cmddelete.Connection = conn
cmddelete.ExecuteNonQuery()
MsgBox("تمت حذف جميع بيانات الشخص بنجاح")
txtname_m.Clear()
txtmustlm.Clear()
txtnum_q.Clear()
txtid_m.Clear()
a1.Clear()
Textalhalh.Clear()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
conn.Close()
End Sub
شاكر لكم