Fixen des bugs
This commit is contained in:
@@ -322,7 +322,6 @@
|
||||
<li>
|
||||
<asp:Label ID="Label3" runat="server" style="color:#003680;margin-left:2px">1 Uppercase</asp:Label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:Label ID="Label4" runat="server" style="color:#003680;margin-left:2px">1 Downcase </asp:Label>
|
||||
</li>
|
||||
|
||||
@@ -193,47 +193,48 @@ Partial Class login_Change_PW
|
||||
txt_Pw_WH.Enabled = True
|
||||
regexval_txt_Pw.Validate()
|
||||
End If
|
||||
If regexval_txt_Pw.IsValid = True Then
|
||||
Try
|
||||
Dim ConnectionString = ""
|
||||
Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2"))
|
||||
Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3"))
|
||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||
'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
|
||||
ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||
Else
|
||||
ConnectionString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
||||
End If
|
||||
If regexval_txt_Pw.IsValid = True Then
|
||||
Using con As New SqlConnection(ConnectionString)
|
||||
Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@Username", usrname)
|
||||
cmd.Parameters.AddWithValue("@Password", txt_Pw_WH.Text)
|
||||
cmd.Parameters.AddWithValue("@UserId", UsrID)
|
||||
cmd.Connection = con
|
||||
con.Open()
|
||||
If String.IsNullOrEmpty(usrname) = False Then
|
||||
cmd.ExecuteNonQuery()
|
||||
btn_submitpw.Visible = True
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount(25)
|
||||
lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels."
|
||||
End If
|
||||
End Using
|
||||
con.Close()
|
||||
End Using
|
||||
|
||||
Try
|
||||
Dim ConnectionString = ""
|
||||
Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2"))
|
||||
Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3"))
|
||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||
'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
|
||||
ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||
Else
|
||||
ConnectionString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
||||
End If
|
||||
If regexval_txt_Pw.IsValid = True Then
|
||||
|
||||
Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@Username", usrname)
|
||||
cmd.Parameters.AddWithValue("@Password", txt_Pw_WH.Text)
|
||||
cmd.Parameters.AddWithValue("@UserId", UsrID)
|
||||
cmd.Connection = con
|
||||
con.Open()
|
||||
If String.IsNullOrEmpty(usrname) = False Then
|
||||
cmd.ExecuteNonQuery()
|
||||
btn_submitpw.Visible = True
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount(25)
|
||||
lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels."
|
||||
End If
|
||||
End Using
|
||||
con.Close()
|
||||
End Using
|
||||
End If
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount(22)
|
||||
'lbl_messagetext_M.ForeColor = Drawing.Color.Red
|
||||
'lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes."
|
||||
End If
|
||||
Catch ex As Exception
|
||||
lbl_messagetext.Text = ex.Message
|
||||
End Try
|
||||
Msg = "PW erfolgreich geändert!"
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount(22)
|
||||
'lbl_messagetext_M.ForeColor = Drawing.Color.Red
|
||||
'lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes."
|
||||
End If
|
||||
Catch ex As Exception
|
||||
lbl_messagetext.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
Msg = "PW erfolgreich geändert!"
|
||||
Style = vbOKOnly + vbInformation + vbDefaultButton1
|
||||
Title = "Information"
|
||||
regexval_txt_Pw.ForeColor = Drawing.Color.Green
|
||||
|
||||
Reference in New Issue
Block a user