home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
41-134-104-147.dsl.mweb.co.za
/
41-134-104-147.dsl.mweb.co.za.tar
/
41-134-104-147.dsl.mweb.co.za
/
otherEnq.aspx.vb
< prev
next >
Wrap
Text File
|
2010-08-20
|
3KB
|
55 lines

Partial Class otherEnq
Inherits System.Web.UI.Page
Dim myFunctions As New Functions
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not myFunctions.testLogin(Me.Context) Then
Response.Redirect("~/Default.aspx", True)
Else
myFunctions.logMe(Request.Cookies("hcUid").Value, "Enquiries Page")
End If
Try
Dim reqType As String = Request.QueryString("r").Trim
If reqType = "ca" Then
'<asp:ListItem>Address Change</asp:ListItem>
For Each myItem As ListItem In lstRequest.Items
If myItem.Value = "Address Change" Then myItem.Selected = True
Next
End If
Catch ex As Exception
End Try
End Sub
Protected Sub imgHome_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgHome.Click
Response.Redirect("~/enquiries.aspx", True)
End Sub
Protected Sub imgLogout_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgLogout.Click
If myFunctions.logout(Me.Context) Then Response.Redirect("~/Default.aspx", True)
End Sub
Protected Sub imgSubmit_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgSubmit.Click
Dim toAddress As String = "info@healthcard.co.za"
Dim subject As String = "Enquiry from Online Portal"
Dim requestType As String = ""
Dim email As String = txtEmail.Text
Dim comments As String = txtComments.Text
Dim body As String = ""
For Each myItem As ListItem In lstRequest.Items
If myItem.Selected Then requestType &= myItem.Value & ";"
Next
If requestType <> "" And email <> "" And comments <> "" Then
body = "<b>A request was received from the HealthCard Online Portal</b><br/><br/>"
body &= "<b>Request Details</b><br/>"
body &= "Date:" & Now.ToShortDateString & " " & Now.ToShortTimeString & "<br/>"
body &= "Email Address:" & email & "<br/>"
body &= requestType & "<br/>"
body &= comments
Dim myMailer As New MAILER(True)
Dim success As String = myMailer.sendMail("HealthCard Portal", toAddress, subject, body, True)
If success = "True" Then Response.Redirect("~/frmThankyou.aspx", True)
End If
End Sub
End Class