03-05-13, 04:58 PM
(آخر تعديل لهذه المشاركة : 03-05-13, 08:11 PM {2} بواسطة mUSTAFA1965.)
السلام عليكم ورحمة الله وبركاته
كيف الحال يا اخي سعود
كيف يمكن فعل ذلك ...
حاولت وحاولت ولكني لم اعرف الكود المطلوب فارجو الفزعة ...
هذا الكود كامل ...
كيف الحال يا اخي سعود
كيف يمكن فعل ذلك ...
حاولت وحاولت ولكني لم اعرف الكود المطلوب فارجو الفزعة ...
هذا الكود كامل ...
كود :
Private Sub Navsave_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles Navsave.LinkClicked
Try
If Textpass1.Text = "" Then
MessageBox.Show("أدخل كلمة المرور الحالية ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
Textpass1.Focus()
Exit Sub
End If
If Textpass2.Text = "" Then
MessageBox.Show("أدخل كلمة المرور الجديدة ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
Textpass2.Focus()
Exit Sub
End If
If Textpass3.Text = "" Then
MessageBox.Show("تأكيـد كلمة المرور الجديدة ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
Textpass3.Focus()
Exit Sub
End If
Dim pass As New SqlCommand("select password from Employee where Auto_Emp", sqlconn)
''======================================================================
'If Textpass1.Text <> pass Then
' MessageBox.Show("كلمة المرور السابقة خـاطئة", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
' Exit Sub
'End If
'======================================================================
If Textpass2.Text <> Textpass3.Text Then
MessageBox.Show("عدم تطابق كلمة المرور الجديده", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
Exit Sub
End If
Dim updataOk As Boolean = winClass.SQLExicute("UPDATE Employee SET password ='" & Textpass2.Text & "' WHERE password = " & Textpass1.Text)
If updataOk = True Then
MsgBox("تمت عملية تعديل البيانات بنجاح", MsgBoxStyle.Information, "تأكيد عملية التعديل")
ClearAll()
psrrr = Textpass3.Text
Else
MsgBox("الرجاء تأكيد من البيانات المدخله", MsgBoxStyle.Critical, "خطأ")
ClearAll()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

