lblInvalidLogin.Text = "Your password has been sent to your email address / cell phone number."
End If
End Sub
Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Response.Redirect("~/otherEnq.aspx", True)
End Sub
Private Function getPassword(ByVal idNumber As String, ByVal cardNumber As String, ByVal surname As String) As Boolean
Dim success As Boolean = False
Dim sqlStr As String = "SELECT password, case when emailContact = 'True' THEN email else '' end as email, case when smsContact = 'True' then contactNumber else '' end as cell"
sqlStr &= " FROM tblMembers"
sqlStr &= " WHERE (surname = @surname) OR (cardNumber = @cardnumber) OR (idNumber = @idnumber)"
Dim params As New Hashtable
params.Add("@surname", surname)
params.Add("@idNumber", idNumber)
params.Add("@cardNumber", cardNumber)
Dim ds As DataSet = myFunctions.getData(sqlStr, params)
Try
Dim myRow As DataRow = ds.Tables(0).Rows(0)
Dim password As String = myRow.Item("password").ToString.Trim
Dim email As String = myRow.Item("email").ToString.Trim
Dim cell As String = myRow.Item("cell").ToString.Trim
If email <> "" Then
Dim myMailer As New MAILER(True)
myMailer.sendMail("HealthCard Portal", email, "Healthcard Password Retrieval", "You requested a password retrieval. Your password is " & password & ".", True)
End If
success = True
Catch ex As Exception
success = False
End Try
Return success
End Function
Private Sub sendSMS(ByVal cellNumber As String, ByVal message As String)
Dim userId As Integer = CInt(Request.Cookies("hcUid").Value)