Hi Darrell,
Thank you for your very thoughtful and expert answers. Could you do me the
favor of looking at this code and answer the following questions?
(It maybe seems long, but it is a very simple application - just a lot of
variables) I will be VERY grateful, and it will help me move on.
The purpose of the application is to get information from the user, then
send this information to a manager by email and send the SAME information to
a database upon the user clicking "Submit.". (I am limited to asp.net 1.1)
* The code gives me the results I want, with one exception, which I will
address in number 2. *
1.How does the second subroutine, "btnsendDatabase_OnClick" know what the
variables are, when I have declared them within the *first* subroutine,
"btnSendMail_OnClick"? (It always sends the information to the database
properly.) If I try to declare the variables *outside* the subroutine, I
get the error, "Object reference not set to an instance of an object."
2. As I want, if the user clicks Submit without having chosen something
other than the default from the drop-down boxes (the default being "choose
one") the user receives an error message and is exited from the subroutine,
and the email does not go until he makes an appropriate selection. *Now,
the one exception to the results I want:* If the user clicks Submit without
having made a different selection from the drop-down boxes the information
is sent to the database anyway, - as you would expect - because the if, then
code controlling that is not in the sendDatabase subroutine. However, if I
try to put that code in the second subroutine, I get errors of the variable
not declared. BUT, as I mentioned in number 1, the subroutine sends the
values of the variables gotten in the first sub to the database!!
3. If I try to use strict OOP programming with this little project, will I
have to put all those variables in the second sub (or method) in the form,
for example, of "xx.TheEmpName"-, taking a long time and a lot of
keystrokes?
(By the way, I DO know that   is bad form and I need to use CSS. I'm
working on that)
THANKS A BUNCH!
******************************************************************************************
<%@ Page Language="VB" Debug = "true" ValidateRequest="false" %>
<%@ Import Namespace="System.Web.Mail" %>
<%@ Import Namespace="System.Data.Oledb" %>
<script language="VB" runat="server">
Sub SendMailandDatabase(Source As Object, E As EventArgs)
btnSendMail_OnClick
btnSendDatabase_OnClick
End Sub
Sub btnSendMail_OnClick
Dim TheEmpName As String = EmpName.text
Dim TheHomeNumber As String = HomeNumber.text
Dim TheDateofAccident As String = DateofAccident.Text
Dim TheNotifyDate As String = NotifyDate.Text
Dim TheTimeAM As String = am.Text
Dim TheTimePM As String = pm.Text
Dim TheTime As String
Dim Thedie As String = Die.SelectedItem.Text
Dim TheLostDays As String = LostDays.SelectedItem.Text
Dim TheStateOfInjury As String = StateOfInjury.Text
Dim TheStreet As String = street.text
Dim TheCity As String = city.text
Dim TheAddressState as String = AddressState.Text
Dim TheZip As String = Zip.text
Dim Thebirth as String = Birth.Text
Dim TheSSN As String = SSN.text
Dim TheSex As String = Sex.SelectedItem.Text
Dim TheMarital As String = Marital.SelectedItem.Text
Dim TheContactNumber As String = ContactNumber.Text
Dim TheJob As string = Job.SelectedItem.Text
Dim ThePart As String = Part.Text
Dim TheSupervisor As String = Supervisor.Text
Dim TheHours As String = Hours.Text
Dim TheDays As String = Days.Text
Dim TheNature As String = nature.SelectedItem.Text
'Dim TheNatureNew As String
Dim TheDescription As String = Description.Text
Dim TheCaused As String = Caused.Text
Dim TheInitial As String = Initial.SelectedItem.Text
Dim TheProvider As String = Provider.SelectedItem.Text
Dim TheAdmitted As String = Admitted.SelectedItem.Text
Dim TheProviderName as String = ProviderName.Text
Dim TheProviderStreet as string = ProviderStreet.Text
Dim TheProviderCity as string = ProviderCity.Text
Dim TheProviderPhone as string = ProviderPhone.Text
Dim Thefull as String = Full.Text
Dim TheFullNew As String
Dim TheOccur As String = Occur.SelectedItem.Text
Dim TheWhere As String = Where.Text
Dim TheAccidentStreet As String = AccidentStreet.Text
Dim TheAccidentCity As String = AccidentCity.Text
dim TheAccidentState as String = AccidentState.Text
Dim TheAccidentZip as String = AccidentZip.Text
Dim TheOtherClaims as String = OtherClaims.SelectedItem.Text
Dim TheSafetyDevices as string = SafetyDevices.selectedItem.Text
Dim TheDevicesUtilized as string = DevicesUtilized.selectedItem.Text
Dim TheWitness as string = Witness.SelectedItem.Text
Dim TheWitnessName as String = WitnessName.Text
Dim TheReceivePay as String = ReceivePay.SelectedItem.Text
Dim TheComments as String = Comments.Text
Dim TheCommentsNew as String
Dim ThePrevented as String = Prevented.Text
Dim ThePreventedNew as String
Dim TheSubmitter As String = Submitter.Text
Dim TheTitle As String = Title.Text
Dim TheToday As String = Today.Text
Dim TheLocation As String = Location.SelectedItem.Text
Dim myMessage As New MailMessage
Dim myMail As SmtpMail
Dim strEmail As String
Dim UserMessage As String
'**********************puts AM or PM with time and forces user to enter a
time*******************
If TheTimeAm <> "" Then
TheTime = TheTimeAm & " AM"
ElseIf TheTimePM <> "" Then
TheTime = TheTimePM & " PM"
Else TheTime = ""
End If
If TheTime = "" then
Response.Write("<font color=""red"">ERROR: You must enter a time</font>")
Exit Sub
End If
'******************* forces the user to choose other than default from a
drop-down box********************
If TheJob = "Choose One" Then
Response.Write("<font color=""red"">ERROR: You must Choose a Job
Description</font>")
Exit Sub
End If
If TheNature = "Choose One" Then
Response.Write("<font color=""red"">ERROR: You must Select the Nature of the
Injury</font>")
Exit Sub
End If
If TheLocation = "Choose One" Then
Response.Write("<font color=""red"">ERROR: You must Choose a Wheeler's
Division</font>")
Exit Sub
End If
'***************************FORCES A LINE BREAK IN THE
REPORT**************************
TheCommentsNew = TheComments.Replace(vbCrLf,"<br />")
ThePreventedNew = ThePrevented.Replace(vbCrLf,"<br />")
TheFullNew = TheFull.Replace(vbCrLf,"<br />")
'***************************SENDS
EMAIL****************************************
If Page.IsValid() Then
Response.Write ("<font color=""red"">FORM HAS BEEN SENT TO
RIVERSIDE</font>")
myMessage.From = "(e-mail address removed)"
MyMessage.To = "(e-mail address removed);"
myMessage.Subject = "Accident Form"
MyMessage.BodyFormat = MailFormat.Html
myMessage.Body = "<h2>Wheeler's Express Accident Report Form</h2>" & vbCrLf
_
& " <p>" & vbCrLf _
& "<html><body> <table width = ""750"" bgcolor=""#E9EDF4"" height=""25""
border=""1"" cellpadding=""1"" cellspacing=""0""fontface=""Verdana""
Size=""2"">" & vbCrLf _
& "<td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> BASIC CLAIM
FACTS</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Employee's Name: <b> " &
TheEmpName & "</b></td>" & vbCrLf _
& "<td colspan=""2""> <font face=""Verdana"" Size=""2"">Home Phone Number:
<b>"& TheHomeNumber & "</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Date of Injury: <b>" &
TheDateOfAccident & "<br>" & "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Time of Injury: <b>" & TheTime &
"<br>" & "</td></tr>" & "</b></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Date Employer Notified:<b> " &
TheNotifyDate & "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Did Employee Die?<b> " & Thedie &
"</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""1""> <font face=""Verdana"" Size=""2"">Has the Injured
Employee Lost Days From Work?<b> " & TheLostDays & "</b></td>" & vbCrLf _
& "<td colspan=""2""> <font face=""Verdana"" Size=""2"">What State Did
Injury Occur? <b> " & TheStateOfInjury & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> EMPLOYER
INFORMATION</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""> <font face=""Verdana"" Size=""2"">Employer Name:
</td></tr>" & vbCrLf _
& "<tr><td height=""35"" valign=""bottom"" colspan=""3""><font
face=""Verdana"" Size=""2""> Work Location: <font face=""Verdana""
Size=""1"">
(street)                        "
& vbCrLf _
&
"(city)                        (state)                        (Zip)</td></tr>"
& vbCrLf _
& "<tr><td colspan=""3""> <font face=""Verdana"" Size=""2"">Nature of
Business: </td></tr>" & vbCrLf _
& "<tr><td colspan=""3""> <font face=""Verdana"" Size=""2"">Employee FED ID:
</td></tr>" & vbCrLf _
& "<tr><td colspan=""3""> <font face=""Verdana"" Size=""2"">Liberty Mutual
Policy #             " &
vbCrLf _
&
"                                    
Store# </td></tr>" & vbCrLf _
& "<tr><td colspan=""1""> <font face=""Verdana"" Size=""2"">Employer Code:
</td>" & vbCrLf _
& "<td colspan=""2""> <font face=""Verdana"" Size=""2"">Employer Location
Code: </td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Employer SIC Code: </td>" &
vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Employer Type: </td></tr>" &
vbCrLf _
& "<tr><td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> INJURED EMPLOYEE
</b></td></tr>" & vbCrLf _
& "<tr><td colspan= ""3""><font face=""Verdana"" Size=""2""> Home Address:
<b>" & TheStreet & "      " & TheCity &
"      " & TheAddressState & "   " &
TheZip & "</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Date of Birth:<b>" & TheBirth
& "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">SSN:<b> " & TheSSN & "</b></td>" &
vbCrLf _
& "<td> <font face=""Verdana"" Size=""2""><b> " & TheSex & "</b></td></tr>"
& vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Marital Status:<b> " &
TheMarital & "</b></td>" & vbCrLf _
& "<tr><td colspan = ""3""> <font face=""Verdana"" Size=""2"">Phone Number
where Employee can be contacted:<b> " & TheContactNumber & "</b></td></tr>"
& vbCrLf _
& "<tr><td><font face=""Verdana"" Size=""2"">Job Description:<b> " & TheJob
& "</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2"">Supervisor's Name:<b> " &
TheSupervisor & "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2""> Hire Date: " & "</b></td></tr>" &
vbCrLf _
& "<td colspan=""2""> <font face=""Verdana"" Size=""2"">Work Per Week <b>" &
TheHours & "</b>   Hours <b>" & TheDays & "</b>   Days </b>
</td>" & vbCrLf _
& "<tr><td><font face=""Verdana"" Size=""2""></td></tr>" & vbCrLf _
& "<tr><td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> INJURY OR ILLNESS
</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""> <font face=""Verdana"" Size=""2"">Which Part of
the Body Was Injured? <b> " & ThePart & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> What was the
Nature of Injury? <b>" & TheNature & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Injury/Illness
Description <b> " & TheDescription & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Initial Medical
Treatment: <b> " & TheInitial & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2"">What Type of
Medical Provider Performed Treatment? <b>" & TheProvider & "</b></td></tr>"
& vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Was Employee
Admittted into a Hospital? <b>" & TheAdmitted & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Medical Provider
Name: <b>" & TheProviderName & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Medical Provider
Address: <b>" & TheProviderStreet & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Medical Provider
City State: <b>" & TheProviderCity & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Medical Provider
Phone: <b>" & TheProviderPhone & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Give a Full
Description of the Accident: <b>" & TheFullNew & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> What Caused The
Injury? <b>" & TheCaused & "</b></td></tr>" & vbCrLf _
& "<tr><td><font face=""Verdana"" Size=""2""> Did the Accident Occur at the
Store or Plant? <b>" & TheOccur & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""2""> <font face=""Verdana"" Size=""2""> If No, where
did the accident occur?<b>" & TheWhere & "</b></td>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Accident Address <b>" &
TheAccidentStreet & "</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Accident City <b>" &
TheAccidentCity & " " & TheAccidentState & " " & TheAccidentZip &
"</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Are Other Claims Involved?
<b>" & TheOtherClaims & "</b></td>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Safety Devices Provided? <b>"
& TheSafetyDevices & "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2""> Safety Devices Utilized? <b>" &
TheDevicesUtilized & "</b></td></tr>" & vbCrLf _
& "<tr><td> <font face=""Verdana"" Size=""2""> Was There a Witness <b>" &
TheWitness & "</b></td>" & vbCrLf _
& "<td colspan=""2""> <font face=""Verdana"" Size=""2""> If yes, ListName
<b>" & TheWitnessName & "</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> DISABILITY STATUS
</b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""> Did Employee
Receive Pay for Date of Injury? <b>" & TheReceivePay & "</b></td></tr>" &
vbCrLf _
& "<tr><td colspan=""3"" bgcolor=""maroon"" align=""center""> <font
face=""Verdana"" Size=""2"" color=""white""><b> ADDITIONAL COMMENTS &
INFORMATION </b></td></tr>" & vbCrLf _
& "<tr><td colspan=""3""><font face=""Verdana"" Size=""2""><b>" &
TheCommentsNew & " </b></td></tr>" & vbCrLf _
& "<tr> <td> <font face=""Verdana"" Size=""2"">Person submitting this form:
" & "<b>" & theSubmitter & "</b></td>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Title: " & "<b>" & theTitle &
"</b></td></tr>" & vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Date: <b> " & Thetoday & "</b>" &
vbCrLf _
& "<td> <font face=""Verdana"" Size=""2"">Location: <b> " & TheLocation &
"</b>" & vbCrLf _
& "<tr> <td colspan=""3""> <font face=""Verdana"" Size=""2"">How can the
above incident be prevented from happening again? " & "<b>" &
ThePreventedNew & "</b></td>" & vbCrLf _
& "</td><tr></table> </body>"
'myMail.SmtpServer = "smtp.xxxxxx.com"
myMail.SmtpServer = ""
myMail.Send(myMessage)
frmEmail.Visible = False
UserMessage = "Has Been Sent."
End If
End Sub
'*************SEND TO
DATABASE***************************************************************************
Sub btnSendDatabase_OnClick
Dim strConn As String = ("Provider=Microsoft.Jet.Oledb.4.0;Data Source=" &
Server.Mappath("~\Acc.mdb") & ";")
Dim MySql AS String = "INSERT INTO
Table1(TheEmpName,TheDateOfAccident,TheNotifyDate,TheToday,TheBirth," &
vbcrlf _
& "TheSSN, TheJob, TheSupervisor, ThePart, TheHours, TheDays, TheNature," &
vbcrlf _
& "TheDescription, TheInitial, TheProvider, TheAdmitted, TheProviderName,
TheOccur," & vbcrlf _
&
"TheWhere,TheAccidentStreet,TheAccidentCity,TheAccidentState,TheAccidentZip,"
& vbcrlf _
& "TheOtherClaims, TheSafetyDevices, TheDevicesUtilized, TheWitness,
TheWitnessName," & vbcrlf _
& "ThePreventedNew, TheSubmitter, TheTitle, TheLocation)" & vbcrlf _
& "VALUES(@TheEmpName, @TheDateOfAccident, @TheNotifyDate,@TheToday,
@TheBirth," & vbcrlf _
& "@TheSSN, @TheJob, @TheSupervisor, @ThePart, @TheHours, @TheDays,
@TheNature," & vbcrlf _
& "@TheDescription, @TheInitial, @TheProvider, @TheAmitted,
@TheProviderName, @TheOccur," & vbcrlf _
& "@TheWhere,@TheAccidentStreet,@TheAccidentCity,@TheAccidentState,
@TheAccidentZip," & vbcrlf _
& "@TheOtherClaims, @TheSafetyDevices, @TheDevicesUtilized, @TheWitness,
@TheWitnessName," & vbcrlf _
& "@ThePreventedNew,@TheSubmitter, @TheTitle, @TheLocation)"
Dim MyConn as New OleDbConnection(strConn)
Dim Cmd as New OleDbCommand(MySQL, MyConn)
With Cmd.Parameters:
..Add(New OleDbParameter("@TheEmpName", EmpName.text))
..Add(New OleDbParameter("@TheDateOfAccident", DateOfAccident.Text))
..Add(New OleDbParameter("@TheNotifyDate", NotifyDate.Text))
..Add(New OleDbParameter("@TheToday", Today.Text))
..Add(New OleDbParameter("@TheBirth", Birth.Text))
..Add(New OleDbParameter("@TheSSN", SSN.Text))
..Add(New OleDbParameter("@TheJob", Job.SelectedItem.Text))
..Add(New OleDbParameter("@TheSupervisor", Supervisor.Text))
..Add(New OleDbParameter("@ThePart", Part.Text))
..Add(New OleDbParameter("@TheHours", Hours.Text))
..Add(New OleDbParameter("@TheDays", Days.Text))
..Add(New OleDbParameter("@TheNature", Nature.SelectedItem.Text))
..Add(New OleDbParameter("@TheDescription", Description.Text))
..Add(New OleDbParameter("@TheInitial", Initial.SelectedItem.Text))
..Add(New OleDbParameter("@TheProvider", Provider.SelectedItem.Text))
..Add(New OleDbParameter("@TheAdmitted", Admitted.SelectedItem.Text))
..Add(New OleDbParameter("@TheTheProviderName", ProviderName.Text))
..Add(New OleDbParameter("@TheOccur", Occur.SelectedItem.Text))
..Add(New OleDbParameter("@TheWhere", Where.Text))
..Add(New OleDbParameter("@TheAccidentStreet", AccidentStreet.Text))
..Add(New OleDbParameter("@TheAccidentCity", AccidentCity.Text))
..Add(New OleDbParameter("@TheAccidentState", AccidentState.Text))
..Add(New OleDbParameter("@TheAccidentZip", AccidentZip.Text))
..Add(New OleDbParameter("@TheOtherClaims", OtherClaims.SelectedItem.Text))
..Add(New OleDbParameter("@TheSafetyDevices",
SafetyDevices.SelectedItem.Text))
..Add(New OleDbParameter("@TheDevicesUtilized",
DevicesUtilized.SelectedItem.Text))
..Add(New OleDbParameter("@TheWitness", Witness.SelectedItem.Text))
..Add(New OleDbParameter("@TheWitnessName", WitnessName.Text))
..Add(New OleDbParameter("@ThePreventedNew", Prevented.Text))
..Add(New OleDbParameter("@TheSubmitter", Submitter.Text))
..Add(New OleDbParameter("@TheTitle", Title.Text))
..Add(New OleDbParameter("@TheLocation", Location.SelectedItem.Text))
end with
MyConn.Open()
cmd.ExecuteNonQuery()
MyConn.Close
End Sub
'**************************GET INFORMATION FROM
USER********************************************
</script>
<html>
<head>
<title>ASP.NET Email (HTML Format) Sample</title>
</head>
<body>
<table width="750" bgcolor="#E9EDF4" table border="1" cellpadding="3">
<h3><center><font face="Verdana">Wheeler's Express Accident Report
Form</font></center></h3>
<form method="post" id="frmEmail" runat="server">
<%--____________________________________________________________________________--%>
<%--Section 1--%>
<tr><td colspan="3" bgcolor="maroon" align="center"> <font face="Verdana"
Size="2" color="white"><b> BASIC CLAIM FACTS</b></td></tr>
<td bgcolor="#E9EDF4" colspan="2">
<font face="Verdana" Size="2">
Employee's Name: <asp:textbox id="EmpName" runat=server columns="45"/>
<asp:RequiredFieldValidator id="RequiredFiedlValidator1" display=dynamic
runat="server" Text="The Employee name is required."
ControlToValidate="EmpName"></asp:RequiredFieldValidator>
</td>
<%---------------------------------------------------------------------------%>
<td align="right" valign="top">
<font face="Verdana" Size="2">Home Phone Number
<asp:TextBox id=HomeNumber runat="server"/>
</td></tr>
<%--____________________________________________________________________________--%>
<%--ROW 2--%>
<tr><td colspan="1" valign="center">
<font face="Verdana" Size="2">Date of Injury </font>
<asp:textbox id="DateofAccident" runat=server /></asp:textbox>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server"
Text="The Date field is required" ControlToValidate="Dateofaccident">
</asp:RequiredFieldValidator>
</td><td colspan="2"><font face="Verdana" Size="2">Time of Injury
<asp:textbox columns="6" id ="am" runat=server/>a.m.
<asp:textbox columns="6" id= "pm" runat = server/> p.m.</td>
</TD>
</tr>
<tr>
<td>
<font face="Verdana" Size="2">Date Employer Notified <asp:textbox
id="Notifydate" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorNotify" runat="server"
Text="This field is required" ControlToValidate="NotifyDate">
</asp:RequiredFieldValidator>
</td>
<td colspan="2"> <font face="Verdana" Size="2"> Did employee die?
<asp:RadioButtonList id="Die" RepeatDirection="Horizontal" Runat=server>
<asp:ListItem><font face="Verdana" Size="2">Yes</asp:ListItem>
<asp:ListItem><font face="Verdana" Size="2">No</asp:ListItem>
</asp:RadioButtonList>
</td></tr>
<tr><td> <font face="Verdana" Size="2"> Has the Injured Employee Lost Days
From Work?
<asp:RadioButtonList id="LostDays" font-name="verdana" font-size="10 pt"
RepeatDirection="Horizontal" Runat=server>
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem> </asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorLostDays"
Display=Dynamic runat="server"
Text="This field is required" ControlToValidate="LostDays">
</asp:RequiredFieldValidator>
<td colspan="3"><font face="Verdana" Size="2">What State did Injury Occur?
<asp:textbox id="StateOfInjury" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorStateofInjury"
Display=Dynamic runat="server"
Text="The State is required" ControlToValidate="StateOfInjury">
</asp:RequiredFieldValidator>
</td></tr>
<%--SECTION3-----------------------------------------------------------------------------------%>
<tr><td colspan="3" bgcolor="maroon" align="center"> <font face="Verdana"
color="white" Size="2"><b> INJURED EMPLOYEE</b></td></tr>
<tr><td colspan="3"> <font face="Verdana" Size="2"> Home address Street
<asp:TextBox id="street" columns="90" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorStreet"
Display=Dynamic runat="server"
Text="The Street is required" ControlToValidate="Street">
</asp:RequiredFieldValidator>
</td></tr>
<tr><td> <font face="Verdana" Size="2"> City <asp:TextBox id="City"
columns="40" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorCity" Display=Dynamic
runat="server"
Text="The City is required" ControlToValidate="City">
</asp:RequiredFieldValidator>
</td><td> <font face="Verdana" Size="2"> State <asp:TextBox
id="AddressState" columns="2" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorADdressState"
Display=Dynamic runat="server"
Text="The State is required" ControlToValidate="AddressState">
</asp:RequiredFieldValidator>
</td> <td> <font face="Verdana" Size="2"> Zip <asp:TextBox id="Zip"
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorZip" Display=Dynamic
runat="server"
Text="The Zip field is required" ControlToValidate="Zip">
</asp:RequiredFieldValidator>
</td></tr>
<tr><td> <font face="Verdana" Size="2">Date of Birth: <asp:textbox id=birth
columns="10" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorBirth" Display=Dynamic
runat="server"
Text="This field required" ControlToValidate="Birth">
</asp:RequiredFieldValidator>
</td><td><font face="Verdana" Size="2"> SSN:<asp:textbox id=SSN columns="11"
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorSSN" Display=Dynamic
runat="server"
Text="The SSN field is required" ControlToValidate="SSN">
</asp:RequiredFieldValidator>
</td><td><font face="Verdana" Size="2"> Check one<asp:RadioButtonList
id="Sex" RepeatDirection="Horizontal" runat="server">
<asp:ListItem><font face="Verdana" Size="2">Male</asp:ListItem>
<asp:ListItem><font face="Verdana" Size="2">Female</asp:ListItem>
</asp:RadioButtonList>
</td></tr><td colspan="1"><font face="Verdana" Size="2"> Marital Status
<asp:RadiobuttonList id=Marital RepeatDirection="Vertical"
runat=server>
<asp:ListItem> <font face="Verdana" Size="2"> Single </asp:ListItem>
<asp:ListItem><font face="Verdana" Size="2"> Married </asp:ListItem>
<asp:ListItem><font face="Verdana" Size="2"> Widowed </asp:ListItem>
<asp:ListItem><font face="Verdana" Size="2">
Divorced</asp:ListItem></asp:RadioButtonList>
</td><td colspan="2"><font face="Verdana" Size="2"> Phone Number where
Employee can be Contacted: <asp:TextBox id=contactnumber runat=server/>
</td></tr><tr><td colspan="3"> <font face="Verdana" Size="2"> Job
Description - Choose One <Asp
ropDownList id=Job runat=server>
<asp:ListItem Text="Choose One"/>
<asp:ListItem Text="Clerical"/>
<asp:ListItem Text="Driver"/>
<asp:ListItem Text="Door Manufacturing"/>
<asp:ListItem Text="Installed Sales"/>
<asp:ListItem Text="Manager"/>
<asp:ListItem Text="Puller"/>
<asp:ListItem Text="Sales"/>
<asp:ListItem Text="Shop Tech"/>
<asp:ListItem Text="Truss Manufacturing"/>
<asp:ListItem Text="Yard Worker"/>
<asp:ListItem Text="Warehouse Worker"/>
<asp:ListItem Text="Window Manufacturing"/>
</asp
ropDownList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorJob" Display=Dynamic
runat="server"
Text="This field required" ControlToValidate="Job">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="2"> <font face="Verdana" Size="2"> Supervisor's
Name <Asp:TextBox id=Supervisor Columns = "40" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorSupervisor"
Display=Dynamic runat="server"
Text="This field required" ControlToValidate="Supervisor">
</asp:RequiredFieldValidator>
</td><td> <font face="Verdana" Size="2">Time Worked Per Week Hours
<asp:TextBox id=hours Columns="1" runat=server/><br>
<asp:RequiredFieldValidator id="RequiredFieldValidatorHours" Display=Dynamic
runat="server"
Text="This field required" ControlToValidate="Hours">
</asp:RequiredFieldValidator>
<font face="Verdana" Size="2">Days  <Asp:TextBox id=Days columns="1"
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorDays" Display=Dynamic
runat="server"
Text="This field required" ControlToValidate="Days">
</asp:RequiredFieldValidator>
<tr><td colspan="3" bgcolor="MAROON" align="center"> <font face="Verdana"
Size="2" COLOR="WHITE"><b> INJURY OR ILLNESS</b></td></tr>
</td></tr> <tr><td colspan="3"><font face="Verdana" Size="2"> Which part of
the Body Was Injured? (If leg, hand or arm, specify left or right. If
finger, specify which)
<asp:textbox id="part" columns = "40" runat = server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorPart" Display=Dynamic
runat="server"
Text="This field required" ControlToValidate="Part">
</asp:RequiredFieldValidator>
</td></tr> <tr><td colspan="3">
<font face="Verdana" Size="2"> What was the Nature of the Injury? - Choose
one
<asp
ropDownList id="nature" runat=server>
<asp:ListItem Text="Choose One"/>
<asp:ListItem Text="Abdominal Strain"/>
<asp:ListItem Text="Ankle Sprain"/>
<asp:ListItem Text="Back Strain"/>
<asp:ListItem Text="Arm Strain"/>
<asp:ListItem Text="Contusion"/>
<asp:ListItem Text="Embedded Foreign Object"/>
<asp:ListItem Text="Foot Fracture"/>
<asp:ListItem Text="Foreign substance in eye"/>
<asp:ListItem Text="Hand/Finger Fracture"/>
<asp:ListItem Text="Hand/Finger Smash"/>
<asp:ListItem Text="Laceration"/>
<asp:ListItem Text="Leg Fracture"/>
<asp:ListItem Text="Neck Strain"/>
<asp:ListItem Text="Puncture Wound"/>
<asp:ListItem Text="Repetitive Motion Injury"/>
<asp:ListItem Text="Shoulder Strain"/>
<asp:ListItem Text="Struck By Lumber"/>
<asp:ListItem Text="Torn Tendon"/>
<asp:ListItem Text="Other"/>
</asp
ropDownList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorNature" runat="server"
Text="You must answer this question" ControlToValidate="nature">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="3" valign="center">
<font face="Verdana" Size="2"> Injury/Illness Description:
<asp:textbox TextMode="MultiLine" Rows="2" columns= "65" id="Description"
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorDescrip"
runat="server"
Text="You must answer this question" ControlToValidate="Description">
</asp:RequiredFieldValidator>
</td></tr><tr><td><font face="Verdana" Size="2"> Initial Medical Treatment:
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=Initial
runat="server">
<asp:ListItem>ER Treated & Released</asp:ListItem>
<asp:ListItem>Hospitalized less than 24 hours</asp:ListItem>
<asp:ListItem>Hospitalized more than 24 hours</asp:ListItem>
<asp:ListItem>Physician/Clinic</asp:ListItem>
<asp:ListItem>Minor/Onsite</asp:ListItem>
<asp:ListItem>None</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorInitial"
runat="server"
Text="You must answer this question" ControlToValidate="Initial">
</asp:RequiredFieldValidator>
</td><td colspan="2" valign="top"><font face="Verdana" Size="2"> What Type
of Medical Provider Performed Treatment?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=Provider
runat="server">
<asp:ListItem>Hospital</asp:ListItem>
<asp:ListItem>Clinic</asp:ListItem>
<asp:ListItem>Physician</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorProvider"
runat="server"
Text="You must answer this question" ControlToValidate="Provider">
</asp:RequiredFieldValidator>
<br>
<font face="Verdana" Size="2"> Was Employee admitted into a Hospital?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=Admitted
runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorAdmitted"
runat="server"
Text="You must answer this question" ControlToValidate="Admitted">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="3"><font face="Verdana" Size="2">Medical
Provider - Name:
<asp:TextBox Columns = "65" id=ProviderName runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorProviderName"
runat="server"
Text="You must answer this question" ControlToValidate="ProviderName">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="3"><font face="Verdana" Size="2">Medical
Provider - Address:
<asp:TextBox Columns = "65" id=ProviderStreet runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorProviderStreet"
runat="server"
Text="You must answer this question" ControlToValidate="ProviderStreet">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="3"><font face="Verdana" Size="2">Medical
Provider - City State Zip:
<asp:TextBox Columns = "65" id=ProviderCity runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorProviderCity"
runat="server"
Text="You must answer this question" ControlToValidate="ProviderCity">
</asp:RequiredFieldValidator>
</td></tr><tr><td colspan="3"><font face="Verdana" Size="2">Medical
Provider - Phone:
<asp:TextBox id=ProviderPhone runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorProviderPhone"
runat="server"
Text="You must answer this question" ControlToValidate="ProviderPhone">
</asp:RequiredFieldValidator>
</td></tr>
<tr><td colspan="3" bgcolor="MAROON" align="center"> <font face="Verdana"
Size="2" COLOR="WHITE"><strong>ACCIDENT DETAILS</strong></td></tr>
</td></tr>
<tr><td colspan="3"> <font face="Verdana" Size="2"> Give a Full Description
of the Accident:<font Size="1"> (Be as Complete as Possible)
<asp:TextBox TextMode="MultiLine" Rows="5" columns= "85" id=Full
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorFull" runat="server"
Text="You must answer this question" ControlToValidate="Full">
</asp:RequiredFieldValidator>
</td></tr> <tr><td colspan="3"><font face="Verdana" Size="2"> What Caused
the Injury?
<asp:TextBox id= caused columns="85" runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorCaused" runat="server"
Text="You must answer this question" ControlToValidate="Caused">
</asp:RequiredFieldValidator>
</td></tr> <tr><td><font face="Verdana" Size="2">Did the Accident Occur at
the Store or Plant?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=Occur
runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorOccur" runat="server"
Text="You must answer this question" ControlToValidate="Occur">
</asp:RequiredFieldValidator>
</td><td colspan="2" valign="top"> <font face="Verdana" Size="2"> If No,
where did the accident occur?
<asp:textBox Columns = "40" id=where runat=server/>
</td></tr> <tr><td><font face="Verdana" Size="2"> Accident Address:
<font face="Verdana" Size="2"> <br> Street <asp:TextBox columns="45"
id=accidentStreet runat=server/>
<br><asp:RequiredFieldValidator id="RequiredFieldValidatorAccidentStreet"
Display=Dynamic runat="server"
Text="Fill this in" ControlToValidate="AccidentStreet">
</asp:RequiredFieldValidator>
</td><td><font face="Verdana" Size="2"> City
                          
State <br><asp:TextBox columns="20" id = AccidentCity runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorAccidentCity"
display=dynamic runat="server"
Text="Fill in this field" ControlToValidate="AccidentCity">
</asp:RequiredFieldValidator>
<font face="Verdana" Size="2"> <asp:TextBox columns="2" id=AccidentState
runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorAccidentState"
Display=Dynamic runat="server"
Text="You must fill in this field" ControlToValidate="AccidentState">
</asp:RequiredFieldValidator>
</td><td>
<font face="Verdana" Size="2">Zip <br><asp:TextBox columns = "10"
id=AccidentZip runat=server/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorAccidentZip"
Display=Dynamic runat="server"
Text="You must fill in this field" ControlToValidate="AccidentZip">
</asp:RequiredFieldValidator>
</td></tr> <tr><td valign="top"><font face="Verdana" Size="2"> Are Other WC
Claims Involved?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=OtherClaims
RepeatDirection="Horizontal" Display=dynamic runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorOtherClaims"
runat="server"
Text="Required" ControlToValidate="OtherClaims">
</asp:RequiredFieldValidator>
</td><td Valign="top"><font face="Verdana" Size="2"> Safety Devices
Provided?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=SafetyDevices
RepeatDirection="horizontal" Display=dynamic runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorSafetyDevices"
Display=dynamic runat="server"
Text="Required" ControlToValidate="SafetyDevices">
</asp:RequiredFieldValidator>
</td><td><font face="Verdana" Size="2"> Safety Devices Utilized?
<asp:RadioButtonList font-name="verdana" font-size="10 pt"
id=DevicesUtilized RepeatDirection="Horizontal" runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorDevicesUtilized"
Display=dynamic runat="server"
Text="Required" ControlToValidate="DevicesUtilized">
</asp:RequiredFieldValidator>
</td></tr><tr><td><font face="Verdana" Size="2"> Was There a Witness?
<asp:RadioButtonList font-name="verdana" font-size="10 pt" id=Witness
RepeatDirection="Horizontal" Display=dynamic runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorWitness"
runat="server"
Text="You must answer this question" ControlToValidate="Witness">
</asp:RequiredFieldValidator>
</td><td valign = "top"><font face="Verdana" Size="2">
If Yes, List Name: <asp:Textbox id="WitnessName" columns="40" runat=server/>
</td></tr>
<tr><td colspan="3" bgcolor="MAROON" align="center">
<font face="Verdana" Size="2" COLOR="WHITE"><strong>DISABILITY
STATUS</strong></td></tr>
</td><td colspan="3"><font face="Verdana" Size="2"> Did Employee Receive Pay
for Date of Injury?
<asp:RadioButtonList RepeatDirection="Horizontal" font-name="verdana"
font-size="10 pt" id=ReceivePay runat="server">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidatorReceivePay"
runat="server"
Text="You must answer this question" ControlToValidate="ReceivePay">
</asp:RequiredFieldValidator>
</td></tr>
<tr><td colspan="3" bgcolor="MAROON" align="center">
<font face="Verdana" Size="2" COLOR="WHITE"><strong>ADDITIONAL COMMENTS &
INFORMATION</strong></td></tr>
<tr><td colspan="3"><font face="Verdana" Size="2"> Additional Comments
<asp:textbox TextMode= "Multiline" Rows= "5" columns= "80"
id="comments" runat=server width="730" height="40"/>
</td></tr>
<tr><td colspan="3"><font face="Verdana" Size="2">How can the above incident
be prevented from happening again?
<asp:textbox id=Prevented Textmode="Multiline" Rows = "3" Columns="80"
width="730" runat=server/>
<tr><td><font face="Verdana" Size="2"><br> Name of person submitting this
form:
<asp:textbox id="Submitter" valign="top" runat=server columns="40"/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorSubmit" runat="server"
Text="You must enter name" ControlToValidate="Submitter">
</asp:RequiredFieldValidator>
<font face="Verdana" Size="2"><br>Title: <asp:textbox id="Title"
valign="top" runat=server columns="40"/>
</td><td> <font face="Verdana" Size="2"> Wheeler's Division - Choose One
<Asp
ropDownList id=Location runat=server>
<asp:ListItem Text="Choose One"/>
<asp:ListItem Text="Riverside Truss Plant"/>
<asp:ListItem Text="Riverside Door Plant"/>
<asp:ListItem Text="Riverside Office"/>
<asp:ListItem Text="Rome Store"/>
<asp:ListItem Text="Calhoun Store"/>
<asp:ListItem Text="Dalton Store"/>
<asp:ListItem Text="Austell Store"/>
<asp:ListItem Text="Morrow Store"/>
<asp:ListItem Text="Installed Sales"/>
<asp:ListItem Text="Newnan Store"/>
<asp:ListItem Text="Cartersville Store"/>
<asp:ListItem Text="Winder Store"/>
<asp:ListItem Text="Jasper Store"/>
<asp:ListItem Text="Chelsea Store"/>
<asp:ListItem Text="Madison Store"/>
<asp:ListItem Text="Peterson Products"/>
<asp:ListItem Text="Lawrenceville"/>
<asp:ListItem Text="OAR Window Shop"/>
<asp:ListItem Text="Charlotte - Hoskins Rd"/>
<asp:ListItem Text="Charlotte - Westinghouse Blvd"/>
<asp:ListItem Text="Sales Support Center"/>
<asp:ListItem Text="Land Development"/>
</asp
ropDownList>
</td><td><br>
<font face="Verdana" Size="2">Date<br><asp:textbox id="Today" runat=server
columns="10"/>
<asp:RequiredFieldValidator id="RequiredFieldValidatorToday" runat="server"
Text="You must enter today's date" ControlToValidate="Today">
</asp:RequiredFieldValidator>
</Table>
<tr>
<td>
<asp:Button id="btnSendMail" text="Submit" OnClick="SendMailandDatabase"
runat="server" />
</td>
</tr>
<td valign=top> <table cellpadding=20><tr><td>
<asp:ValidationSummary ID="valSum" runat="server" ShowMessageBox="true"
ShowSummary="false" HeaderText="You must enter more information"
Font-Name="verdana" Font-Size="12" /> </td>
</form>
</body>
</html>