Hi, all. I recently inherited a website coded in ASP and VB. I am able to figure most things out, but this has got me stumped. We have a web form which links to an SQL database and then into a piece of software. There is a table in the software where custom
fields are given values. From what I can tell, the script is defining string data using the value of the custom field, therefore linking them together. There are several other checkboxes that I thought I could model my new checkbox after, but I have failed
miserably. The form loads just fine, but when I submit, I get our generic "error" message that's been defined in the script. I am going to attach the three files that I know are working together in this scenario. Any help is greatly appreciated!
ASCX:
<%@ Control Language="VB" ClassName="DataformControl" %><%@ Import Namespace="System.Data.SqlTypes" %><%@ Import Namespace="System.Data.SqlClient" %><%@ Import Namespace= "System.web.mail" %><%@ Import Namespace="System.Reflection" %><script language="VB" runat="server">
Public Shared Function FillSchoolInfo() As Data.DataSet
' This function is used to populate school name
Dim strSQL As String
strSQL = "select de_name from fed_school_table"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
Dim cmd As New SqlCommand(strSQL, con)
con.Open()
Dim ds As New Data.DataSet
Dim daSchool As New SqlDataAdapter(cmd)
daSchool.Fill(ds, "SchName")
Return ds
con.Close()
End Using
End Function
Public Shared Function CheckSchoolData(ByVal strSchoolName As String) As String
' Get school city and state from school name
Dim strSQL As String
strSQL = "select city,state from fed_school_table where de_name= '" & strSchoolName & "' "
Return strSQL
End Function
Public Shared Function get_PF_School_Data(ByVal studToken As String) As String
' This query selects school information for perticular student by comparing student token
Dim strSQL As String
strSQL = "select fs.de_name as Full_Name_of_School,fs.city as City, fs.state as State " & _" from fed_school_table fs join prior_colleges_attended pca on fs.federal_school_token=pca.Federal_school_token " & _"join student s on pca.student_token=s.student_token where s.student_token= '" & studToken & "'"
Return strSQL
End Function
Public Shared Function CheckDataformEntry(ByVal awYear As String, ByVal stuID As String) As Boolean
Dim strSQL As String
Dim RetValue As Boolean
strSQL = "select d.award_year,d.last_name,d.first_name from DataForm d where d.award_year ='" & awYear & "' and d.student_ssn='" & stuID & "'"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString)
Dim cmd As New SqlCommand(strSQL, con)
con.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
If rdr.HasRows Then
RetValue = True
Else
RetValue = False
End If
con.Close()
Return RetValue
End Using
End Function
Public Shared Function ArchieveData(ByVal awYear As String, ByVal stuID As String) As Boolean
Dim strSQL, strDelete As String
strSQL = "insert into DataForm_archieve (student_ssn, award_year, Time_Stamp, last_name, first_name, street1," & _"street2, city, state, zip, phone, alt_phone, email1, email2, begfresh, HSGPA, StudType," & _"GradQuarter, GradYear, FallHours, WinterHours, SpringHours, SummerHours, Housing, HousingZip, Military, ChildCare, " & _"Aviation, financialAssistance, education, Payfeefirst, SapRequire, ReadSap, Certifyinfo, Pin)" & _"select student_ssn, award_year, Time_Stamp, last_name, first_name, street1," & _"street2, city, state, zip, phone, alt_phone, email1, email2, begfresh, HSGPA, StudType," & _"GradQuarter, GradYear, FallHours, WinterHours, SpringHours, SummerHours, Housing, HousingZip, Military, ChildCare, " & _"Aviation, financialAssistance, education, Payfeefirst, SapRequire, ReadSap, Certifyinfo, Pin " & _"from DataForm where student_ssn='" & stuID & "' and award_year='" & awYear & "'"
strDelete = "Delete from Dataform where student_ssn='" & stuID & "' and award_year='" & awYear & "'"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString)
Dim cmdinsert As SqlCommand
con.Open()
cmdinsert = New SqlCommand(strSQL, con)
cmdinsert.ExecuteNonQuery()
con.Close()
con.Open()
Dim cmddele As New SqlCommand(strDelete, con)
cmddele.ExecuteNonQuery()
con.Close()
End Using
Return True
End Function
Public Shared Function insertData(ByVal StudID As String, ByVal AwYear As String, ByVal lastname As String, ByVal firstname As String, ByVal street1 As String, _
ByVal street2 As String, ByVal city As String, ByVal statename As String, ByVal zip As String, ByVal phone As String, ByVal AltPhone As String, ByVal email As String, ByVal webmail As String, ByVal BegFreshman As Boolean, ByVal HSGPA As String, ByVal StudTYpe As String, _
ByVal GradQuarter As String, ByVal GradYear As String, ByVal FallHours As String, ByVal WinterHours As String, ByVal SpringHours As String, ByVal SummerHours As String, ByVal Housing As String, ByVal HousingZip As String, ByVal Military As Boolean, ByVal ChildCare As Boolean, _
ByVal Aviation As Boolean, ByVal financialAssistance As Boolean, ByVal education As Boolean, ByVal Payfeefirst As Boolean, ByVal SapRequire As Boolean, ByVal ReadSap As Boolean, ByVal Certifyinfo As Boolean, ByVal Pin As String, strTA As Boolean, strMilBranch As String, _
ByVal strTOPS As String, ByVal strworkULS As String, ByVal strover55 As String, ByVal strOutState As String, ByVal strNG As String, ByVal strROTC As String) As Boolean
Try
Dim strSQL As String
Dim BegFreshman1, Military1, Childcare1, Aviation1, FinancialAssistance1, Education1, PayFeeFirst1, SAPRequire1, ReadSAP1, CertifyInfo1, TA As Integer
If strTA = True Then
TA = 1
Else
TA = 0
End If
If BegFreshman = True Then
BegFreshman1 = 1
Else
BegFreshman1 = 0
End If
If Military = True Then
Military1 = 1
Else
Military1 = 0
End If
If ChildCare = True Then
Childcare1 = 1
Else
Childcare1 = 0
End If
If Aviation = True Then
Aviation1 = 1
Else
Aviation1 = 0
End If
If financialAssistance = True Then
FinancialAssistance1 = 1
Else
FinancialAssistance1 = 0
End If
If education = True Then
Education1 = 1
Else
Education1 = 0
End If
If Payfeefirst = True Then
PayFeeFirst1 = 1
Else
PayFeeFirst1 = 0
End If
If SapRequire = True Then
SAPRequire1 = 1
Else
SAPRequire1 = 0
End If
If ReadSap = True Then
ReadSAP1 = 1
Else
ReadSAP1 = 0
End If
If Certifyinfo = True Then
CertifyInfo1 = 1
Else
CertifyInfo1 = 0
End If
Dim timeStamp As DateTime
timeStamp = Now()
strSQL = "insert into DataForm (student_ssn, award_year, Time_Stamp, last_name, first_name, street1," & _"street2, city, state, zip, phone, alt_phone, email1, email2, begfresh, HSGPA, StudType," & _"GradQuarter, GradYear, FallHours, WinterHours, SpringHours, SummerHours, Housing, HousingZip, Military, ChildCare, " & _"Aviation, financialAssistance, education, Payfeefirst, SapRequire, ReadSap, Certifyinfo, Pin,exported,MilitaryServiceBranch,TuitionAssistance, " & _"TOPSDATA,WORKULS,Over55YR,OUtofState,NATGuard,ROTC)" & _"Values ('" & StudID & "', '" & AwYear & "','" & timeStamp & "', '" & lastname & "', '" & firstname & "', " & _"'" & street1 & "', '" & street2 & "', '" & city & "', '" & statename & "', '" & zip & "', " & _"'" & phone & "', '" & AltPhone & "', '" & email & "', '" & webmail & "', " & BegFreshman1 & ", '" & HSGPA & "', " & _"'" & StudTYpe & "', '" & GradQuarter & "', '" & GradYear & "', '" & FallHours & "', " & _"'" & WinterHours & "', '" & SpringHours & "', '" & SummerHours & "', '" & Housing & "','" & HousingZip & "', " & Military1 & ", " & _"" & Childcare1 & "," & Aviation1 & ", " & _" " & FinancialAssistance1 & ", " & Education1 & ", " & PayFeeFirst1 & ", " & _"" & SAPRequire1 & ", " & ReadSAP1 & ", " & CertifyInfo1 & ", '" & Pin & "',0, '" & strMilBranch & "'," & TA & ", " & _" '" & strTOPS & "','" & strworkULS & "','" & strover55 & "','" & strOutState & "','" & strNG & "','" & strROTC & "' )"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString)
con.Open()
Dim cmdinsert As SqlCommand
cmdinsert = New SqlCommand(strSQL, con)
cmdinsert.ExecuteNonQuery()
con.Close()
End Using
Dim NumRecs, AuthenSQL, Grad_Date, Permit, HousingMIL, ChildcareCosts, AviationCosts, DtFormDate As String
Dim poetoken1, poeload1, poetoken2, poeload2, poetoken3, poeload3, poetoken4, poeload4, pattern, patterncode, numquarter, MILTA As String
pattern = ""
If strTA = True Then
MILTA = "Y"
Else
MILTA = ""
End If
If Aviation = True Then
AviationCosts = "Y"
Else
AviationCosts = ""
End If
If ChildCare = True Then
ChildcareCosts = "Y"
Else
ChildcareCosts = ""
End If
If Military = True Then
HousingMIL = "Y"
Else
HousingMIL = ""
End If
If Payfeefirst = True Then
Permit = "S"
Else
Permit = "U"
End If
Select Case True
Case UCase(GradQuarter) = "FALL"
Grad_Date = "1130" + GradYear
Case UCase(GradQuarter) = "WINTER"
Grad_Date = "0330" + GradYear
Case UCase(GradQuarter) = "SPRING"
Grad_Date = "0530" + GradYear
Case UCase(GradQuarter) = "SUMMER"
Grad_Date = "0830" + GradYear
End Select
If FallHours <> "" Then
If Trim(FallHours) <> "0" Then
poetoken1 = getPoeToken("FA", AwYear)
poeload1 = getPoeLoad(FallHours, StudTYpe)
pattern = "FALL"
End If
End If
If WinterHours <> "" Then
If WinterHours <> "0" Then
poetoken2 = getPoeToken("WN", AwYear)
poeload2 = getPoeLoad(WinterHours, StudTYpe)
pattern = pattern + "WINTER"
End If
End If
If SpringHours <> "" Then
If SpringHours <> "0" Then
poetoken3 = getPoeToken("SP", AwYear)
poeload3 = getPoeLoad(SpringHours, StudTYpe)
pattern = pattern + "SPRING"
End If
End If
If SummerHours <> "" Then
If SummerHours <> "0" Then
poetoken4 = getPoeToken("SU", AwYear)
poeload4 = getPoeLoad(SummerHours, StudTYpe)
pattern = pattern + "SUMMER"
End If
End If
Dim tempPatternData As String
Dim patternAray As String()
tempPatternData = getpatterndata(pattern)
patternAray = tempPatternData.Split("|")
patterncode = patternAray(0)
numquarter = patternAray(1)
If Len(Trim(phone)) = 12 Then
phone = Replace(phone, "-", "")
Else
phone = ""
End If
If Len(Trim(AltPhone)) = 12 Then
AltPhone = Replace(AltPhone, "-", "")
Else
AltPhone = ""
End If
Dim GPAbeforPt, GPAafterPT As String
GPAafterPT = HSGPA.Substring(HSGPA.IndexOf(".") + 1)
GPAbeforPt = Left(HSGPA, 1)
If Len(GPAafterPT) < 2 Then
GPAafterPT = GPAafterPT & "0"
End If
HSGPA = GPAbeforPt & GPAafterPT
Using cn As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
Dim strSQLDate, month, day, year, todaysdate As String
strSQLDate = "Select DatePart(MM, GetDate()), DatePart(DD, GetDate()), DatePart(YYYY, GetDate())"
Dim cmdDate As New SqlCommand(strSQLDate, cn)
cn.Open()
Dim rdrDate As SqlDataReader = cmdDate.ExecuteReader(Data.CommandBehavior.Default)
rdrDate.Read()
month = rdrDate(0).ToString
day = rdrDate(1).ToString
year = rdrDate(2).ToString
If Len(month) < 2 Then
month = "0" & month
End If
If Len(day) < 2 Then
day = "0" & day
End If
todaysdate = month & day & year
cn.Close()
cn.Open()
Dim strCheck As String
Dim FlgExists As Boolean
FlgExists = False
strCheck = "Select * from external_data where ssn = '" & StudID & "' and award_year_token = '" & AwYear & "' "
Dim cmdFlg As New SqlCommand(strCheck, cn)
Dim rdrFlg As SqlDataReader = cmdFlg.ExecuteReader(Data.CommandBehavior.Default)
If rdrFlg.HasRows Then
FlgExists = True
Else
FlgExists = False
End If
cn.Close()
If FlgExists = False Then
Dim SQLInsert As String
cn.Open()
If AwYear = "2013" Then
SQLInsert = "Insert Into External_data(ssn, award_year_token, loaded, last_name, first_name, " & _"primary_street1, primary_street2, primary_city, primary_state, primary_zip, " & _"primary_telephone, cellular_telephone, email_address, email_address_2, high_school_gpa, " & _"grad_date, string2_field_id, string2_value, string3_field_id, string3_value, " & _"string4_field_id, string4_value, string5_field_id, " & _"string5_value, housing, string6_field_id, string6_value, string7_field_id, string7_value, " & _"string8_field_id, string8_value, string10_field_id, string10_value, " & _" poe1_update_id, poe1_class_load, poe2_update_id, poe2_class_load, " & _"poe3_update_id, poe3_class_load, poe4_update_id, poe4_class_load, dateint2_field_id, dateint2_value, " & _"dateint3_field_id, dateint3_value,dateint5_field_id, dateint5_value, dateint1_field_id, dateint1_value,string1_field_id, string1_value,string11_field_id, string11_value ) " & _"Values ('" & StudID & "', '" & AwYear & "', 'N', '" & lastname & "', '" & firstname & "', " & _"'" & street1 & "', '" & street2 & "', '" & city & "', '" & statename & "', '" & zip & "', " & _"'" & phone & "', '" & AltPhone & "', '" & email & "', '" & webmail & "', '" & HSGPA & "', " & _" '" & Grad_Date & "', '4113', '" & FallHours & "', '4114', '" & WinterHours & "', " & _"'4115', '" & SpringHours & "', '4116', '" & SummerHours & "', '" & Housing & "', '4102', '" & HousingMIL & "', " & _"'4117', '" & ChildcareCosts & "', '4103', '" & AviationCosts & "', " & _"'2820', '" & Permit & "', '" & poetoken1 & "', '" & poeload1 & "', " & _"'" & poetoken2 & "', '" & poeload2 & "', '" & poetoken3 & "', '" & poeload3 & "', " & _"'" & poetoken4 & "', '" & poeload4 & "', '2703', '" & patterncode & "', '2720', '" & numquarter & "', '7246', '" & HousingZip & "', " & _"'2505', '" & todaysdate & "', '7466', ' " & strMilBranch & "', '7467', '" & MILTA & "') "
Else
SQLInsert = "Insert Into External_data(ssn, award_year_token, loaded, last_name, first_name, " & _"primary_street1, primary_street2, primary_city, primary_state, primary_zip, " & _"primary_telephone, cellular_telephone, email_address, email_address_2, high_school_gpa, " & _"grad_date, dateint6_field_id, dateint6_value, dateint7_field_id, dateint7_value, " & _" dateint8_field_id, dateint8_value, dateint9_field_id, " & _"dateint9_value, housing, string6_field_id, string6_value, string7_field_id, string7_value, " & _"string8_field_id, string8_value, string10_field_id, string10_value, " & _" poe1_update_id, poe1_class_load, poe2_update_id, poe2_class_load, " & _"poe3_update_id, poe3_class_load, poe4_update_id, poe4_class_load, dateint2_field_id, dateint2_value, " & _"dateint3_field_id, dateint3_value,dateint5_field_id, dateint5_value, dateint1_field_id, dateint1_value,string1_field_id, string1_value,string11_field_id, string11_value, " & _" string2_field_id, string2_value,string3_field_id, string3_value ," & _" string4_field_id, string4_value,string5_field_id, string5_value ," & _" string19_field_id, string19_value,string20_field_id, string20_value ) " & _"Values ('" & StudID & "', '" & AwYear & "', 'N', '" & lastname & "', '" & firstname & "', " & _"'" & street1 & "', '" & street2 & "', '" & city & "', '" & statename & "', '" & zip & "', " & _"'" & phone & "', '" & AltPhone & "', '" & email & "', '" & webmail & "', '" & HSGPA & "', " & _" '" & Grad_Date & "', '7283', '" & FallHours & "', '7284', '" & WinterHours & "', " & _"'7285', '" & SpringHours & "', '7286', '" & SummerHours & "', '" & Housing & "', '4102', '" & HousingMIL & "', " & _"'4117', '" & ChildcareCosts & "', '4103', '" & AviationCosts & "', " & _"'2820', '" & Permit & "', '" & poetoken1 & "', '" & poeload1 & "', " & _"'" & poetoken2 & "', '" & poeload2 & "', '" & poetoken3 & "', '" & poeload3 & "', " & _"'" & poetoken4 & "', '" & poeload4 & "', '2703', '" & patterncode & "', '2720', '" & numquarter & "', '7246', '" & HousingZip & "', " & _"'2505', '" & todaysdate & "', '7466', ' " & strMilBranch & "', '7467', '" & MILTA & "', " & _" '7477','" & strTOPS & "', '7479','" & strworkULS & "','7480','" & strover55 & "','7481','" & strOutState & "','7482','" & strNG & "','7484','" & strROTC & "') "
End If
Dim cmdinsert As SqlCommand
cmdinsert = New SqlCommand(SQLInsert, cn)
cmdinsert.ExecuteNonQuery()
cn.Close()
Else
' Dim sqlUpdate As String
'cn.Open()
' If AwYear = 2013 Then
'sqlUpdate = "Update External_data set last_name ='" & lastname & "', first_name='" & firstname & "', loaded='N', " & _
' "primary_street1 ='" & street1 & "', primary_street2='" & street2 & "', primary_city='" & city & "', primary_state= '" & statename & "', primary_zip= '" & zip & "', " & _
' "primary_telephone='" & phone & "', cellular_telephone='" & AltPhone & "', email_address='" & email & "', high_school_gpa= '" & HSGPA & "', " & _
' "grad_date='" & Grad_Date & "', string2_field_id= '4113', string2_value='" & FallHours & "', string3_field_id= '4114', string3_value= '" & WinterHours & "', " & _
' "string4_field_id='4115', string4_value='" & SpringHours & "', string5_field_id= '4116', " & _
'' "string5_value='" & SummerHours & "', housing=" & Housing & "', string6_field_id='4102', string6_value='" & HousingMIL & "', string7_field_id='4117', string7_value='" & ChildcareCosts & "', " & _
' "string8_field_id='4103', string8_value='" & AviationCosts & "', string10_field_id='2820', string10_value= '" & Permit & "', " & _
' " poe1_update_id='" & poetoken1 & "', poe1_class_load='" & poeload1 & "', poe2_update_id='" & poetoken2 & "', poe2_class_load='" & poeload2 & "', " & _
' "poe3_update_id='" & poetoken3 & "', poe3_class_load='" & poeload3 & "', poe4_update_id='" & poetoken4 & "', poe4_class_load='" & poeload4 & "', dateint2_field_id= '2703', dateint2_value='" & patterncode & "', " & _
' "dateint3_field_id='2720', dateint3_value='" & numquarter & "',dateint5_field_id= '7246', dateint5_value= '" & HousingZip & "', dateint1_field_id='2505', dateint1_value='" & todaysdate & "',string1_field_id= '7466', string1_value= ' " & strMilBranch & "',string11_field_id='7467', string11_value ='" & MILTA & "' " & _
' " where ssn='" & StudID & "' and award_year_token= '" & AwYear & "' "
' Else
' sqlUpdate = "Update External_data set last_name ='" & lastname & "', first_name='" & firstname & "', loaded='N', " & _
' "primary_street1 ='" & street1 & "', primary_street2='" & street2 & "', primary_city='" & city & "', primary_state= '" & statename & "', primary_zip= '" & zip & "', " & _
' "primary_telephone='" & phone & "', cellular_telephone='" & AltPhone & "', email_address='" & email & "', high_school_gpa= '" & HSGPA & "', " & _
' "grad_date='" & Grad_Date & "', dateint6_field_id= '7283', dateint6_value='" & FallHours & "', dateint7_field_id= '7284', dateint7_value= '" & WinterHours & "', " & _
' "dateint8_field_id='7285', dateint8_value='" & SpringHours & "', dateint9_field_id= '7286', " & _
' "dateint9_value='" & SummerHours & "', housing=" & Housing & "', string6_field_id='4102', string6_value='" & HousingMIL & "', string7_field_id='4117', string7_value='" & ChildcareCosts & "', " & _
' "string8_field_id='4103', string8_value='" & AviationCosts & "', string10_field_id='2820', string10_value= '" & Permit & "', " & _
' " poe1_update_id='" & poetoken1 & "', poe1_class_load='" & poeload1 & "', poe2_update_id='" & poetoken2 & "', poe2_class_load='" & poeload2 & "', " & _
' "poe3_update_id='" & poetoken3 & "', poe3_class_load='" & poeload3 & "', poe4_update_id='" & poetoken4 & "', poe4_class_load='" & poeload4 & "', dateint2_field_id= '2703', dateint2_value='" & patterncode & "', " & _
'"dateint3_field_id='2720', dateint3_value='" & numquarter & "',dateint5_field_id= '7246', dateint5_value= '" & HousingZip & "', dateint1_field_id='2505', dateint1_value='" & todaysdate & "',string1_field_id= '7466', string1_value= ' " & strMilBranch & "',string11_field_id='7467', string11_value ='" & MILTA & "' " & _
' " where ssn='" & StudID & "' and award_year_token= '" & AwYear & "' "
'
'End If
'Dim cmdUpdate As New SqlCommand(sqlUpdate, cn)
' cmdUpdate.ExecuteNonQuery()
' cmdUpdate.Dispose()
' cn.Close()
Return False
End If
End Using
Return True
Catch ex As Exception
Return False
End Try
End Function
Public Shared Function getPoeToken(ByVal Quarter As String, ByVal AwYear As String) As String
Dim strsql As String
Dim poeToken As String
strsql = "select poe_token from poe where award_year_token = '" & AwYear & "' and UPPER(Left(attend_desc, 2)) ='" & Quarter & "'"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
con.Open()
Dim cmd As New SqlCommand(strsql, con)
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
rdr.Read()
poeToken = rdr("poe_token").ToString
con.Close()
End Using
Return poeToken
End Function
Public Shared Function getPoeLoad(ByVal Hours As String, ByVal studType As String) As String
Dim load As String
If UCase(studType) = "GRADUATE" Then
If Hours = "1" Or Hours = "2" Then
load = "4"
ElseIf Hours = "3" Then
load = "3"
ElseIf Hours = "4" Or Hours = "5" Then
load = "2"
Else
load = "1"
End If
ElseIf UCase(studType) = "UNDERGRADUATE" Then
If Hours = "1" Or Hours = "2" Or Hours = "3" Then
load = "4"
ElseIf Hours = "4" Or Hours = "5" Then
load = "3"
ElseIf Hours = "6" Or Hours = "7" Then
load = "2"
Else
load = "1"
End If
End If
Return load
End Function
Public Shared Function getpatterndata(ByVal pattern As String) As String
Dim strsql, patternCode As String
strsql = "Select code, numquarters from pattern " & _"where quarter = '" & pattern & "'"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString())
Dim cmd As New SqlCommand(strsql, con)
con.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
rdr.Read()
patternCode = rdr(0).ToString & "|" & rdr(1).ToString
con.Close()
End Using
Return patternCode
End Function
Public Function FormatTodaysDate() As String
Dim strSQLDate, month, day, year, todaysdate As String
strSQLDate = "Select DatePart(MM, GetDate()), DatePart(DD, GetDate()), DatePart(YYYY, GetDate())"
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString())
Dim cmd As New SqlCommand(strSQLDate, con)
con.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
rdr.Read()
month = rdr(0).ToString
day = rdr(1).ToString
year = rdr(2).ToString
If Len(month) < 2 Then
month = "0" & month
End If
If Len(day) < 2 Then
day = "0" & day
End If
todaysdate = month & day & year
con.Close()
End Using
Return todaysdate
End Function
Public Shared Function insertInstitute(ByVal studToken As String, ByVal stuid As String, ByVal awyear As String, ByVal School As String, ByVal city As String, ByVal statename As String, ByVal datefrom As String, ByVal dateto As String, ByVal Inst_Num As Integer) As String
Dim SQLInsert, sqldele, strsql, MsgToCounselor As String
MsgToCounselor = ""
Dim citystate As String
citystate = city & "," & statename
Dim flgDelete As Boolean
flgDelete = False
School = UCase(School)
city = UCase(city)
statename = UCase(statename)
sqldele = "delete from Educational " & _"where student_ssn = '" & stuid & "' and Award_Year = '" & awyear & "' and Inst_num = " & Inst_Num & " "
SQLInsert = "Insert into Educational(student_ssn, award_year, school, citystate, datefrom, dateto, Inst_num,exported) " & _"Values('" & stuid & "', '" & awyear & "', '" & School & "', '" & citystate & "', " & _" '" & datefrom & "', '" & dateto & "', " & Inst_Num & ",0) "
strsql = "select * from Educational " & _"where student_ssn = '" & stuid & "' and Award_Year = '" & awyear & "' and Inst_num = " & Inst_Num & " "
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString())
con.Open()
Dim cmd As New SqlCommand(strsql, con)
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
If rdr.HasRows Then
flgDelete = True
Else
flgDelete = False
End If
con.Close()
If flgDelete = True Then
con.Open()
Dim cmddele As New SqlCommand(sqldele, con)
cmddele.ExecuteNonQuery()
con.Close()
End If
con.Open()
Dim cmdinsert As SqlCommand
cmdinsert = New SqlCommand(SQLInsert, con)
cmdinsert.ExecuteNonQuery()
con.Close()
End Using
Return MsgToCounselor
End Function
Public Shared Function insertFinAssist(ByVal stuid As String, ByVal awyear As String, ByVal FinAsst As String, ByVal fallval As String, ByVal winterval As String, _
ByVal Springval As String, ByVal summerval As String, ByVal Asst_num As Integer) As Boolean
Dim SQLInsertFinAssist, sqldele, strsql As String
Dim flgDelete As Boolean
flgDelete = False
strsql = "select * from FinancialAssistance " & _"where student_ssn = '" & stuid & "' and Award_Year = '" & awyear & "' and Asst_num = " & Asst_num & " "
sqldele = "delete from FinancialAssistance " & _"where student_ssn = '" & stuid & "' and Award_Year = '" & awyear & "' and Asst_num = " & Asst_num & " "
SQLInsertFinAssist = "Insert into FinancialAssistance(student_ssn, award_year, aidname, fall, winter, spring, summer, asst_num,exported) " & _"Values('" & stuid & "', '" & awyear & "', '" & FinAsst & "', '" & fallval & "', " & _" '" & winterval & "', '" & Springval & "', '" & summerval & "', " & Asst_num & ",0) "
Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("webconn").ToString())
con.Open()
Dim cmd As New SqlCommand(strsql, con)
Dim rdr As SqlDataReader = cmd.ExecuteReader(Data.CommandBehavior.Default)
If rdr.HasRows Then
flgDelete = True
Else
flgDelete = False
End If
con.Close()
If flgDelete = True Then
con.Open()
Dim cmddele As New SqlCommand(sqldele, con)
cmddele.ExecuteNonQuery()
con.Close()
End If
con.Open()
Dim cmdinsert As SqlCommand
cmdinsert = New SqlCommand(SQLInsertFinAssist, con)
cmdinsert.ExecuteNonQuery()
con.Close()
End Using
Return True
End Function</script>
.aspx:
<%@ Page MasterPageFile="myaidmaster.master" Language="VB" codefile="techdataform.aspx.vb" Inherits="dataform" Title="My Aid - Dataform" EnableViewState="true" %><%@ Reference Control ="dataformcntrl.ascx" %><%@ Reference Control="~/usrcntrl.ascx" %><%@ Import Namespace= "Artisteer" %><%@ Register TagPrefix="artisteer" Namespace="Artisteer" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><asp:Content id="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1"><ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"><Services><asp:ServiceReference Path ="~/AutoComplete.asmx" /></Services></ajaxToolkit:ToolkitScriptManager> <div align="center" style="margin:25px 25px 25px 25px" ><h2 style="margin-top: 20px;text-align: center" >Louisiana Tech University</h2><asp:Label ID="lblH3" runat="server" Text=" Financial Aid Data Form " Font-Bold ="true" Font-Size ="Medium" ></asp:Label> <form style="padding: 15px ; " id="dataform" name="dataform" method="post" ><asp:Table runat="server" id="tbldataform" BorderStyle="none" width="100%" Cssclass="finaid-block" style="font-size:medium;margin-top : 25px;" ><asp:TableRow runat ="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top:10px; padding-bottom:10px;color:red ;font-size:smaller;text-align :center ;"><b>NOTE:</b> Your ESIGN# is required to electronically submit this online data form. If you do not have an ESIGN#, click <a href="forgotaccess.aspx">HERE</a> to request your ESIGN#.</asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" ColumnSpan="3" Height="40"><asp:Label runat="server" Text="Student's Name:" id="lblName"></asp:Label><asp:TextBox ID="txtName" runat="server" style="margin-left: 5px" width="450" ReadOnly="True"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" ColumnSpan="3" Height="40"><asp:Label runat="server" Text="Student's CWID/SSN #:" id="lblSS"></asp:Label><asp:TextBox ID="txtID" runat="server" style="margin-left: 5px" width="150" ReadOnly="True"></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" ColumnSpan="3" Height="40"><asp:Label runat="server" Text="Current Mailing Address:" id="lblAddress"></asp:Label><asp:TextBox ID="txtAddress" runat="server" style="margin-left: 5px" width="500" ></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtAddress" FilterType="UppercaseLetters, Numbers, LowercaseLetters,Custom" ValidChars =" " ></ajaxToolkit:FilteredTextBoxExtender></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" ColumnSpan="3" Height="0"><asp:TextBox ID="txtStreet2" runat="server" style="margin-left:185px" width="500" cellspacing="0" ></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="txtStreet2" FilterType="UppercaseLetters, Numbers, LowercaseLetters,Custom" ValidChars =" " ></ajaxToolkit:FilteredTextBoxExtender></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" Height="40" Width="0"><asp:Label runat="server" Text="City:" id="lblCity"></asp:Label><asp:TextBox ID="txtCity" runat="server" style="margin-left: 5px" width="100" ></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="txtCity" FilterType="UppercaseLetters, Numbers, LowercaseLetters,Custom" ValidChars =" " ></ajaxToolkit:FilteredTextBoxExtender></asp:TableCell><asp:TableCell runat ="server" Height="40" Width="50"><asp:Label runat="server" Text="State:" id="lblState"></asp:Label><asp:DropDownList style="margin-left: 5px" runat="server" id="drpState" AutoPostBack="True" ></asp:DropDownList></asp:TableCell><asp:TableCell runat ="server" Height="40"><asp:Label runat="server" Text="Zip:" id="lblZip" ></asp:Label><asp:TextBox ID="txtZip" runat="server" MaxLength="5" style="margin-left: 5px" width="50" ></asp:TextBox><asp:RegularExpressionValidator ID="RegValidZip" runat="server"
ErrorMessage="Enter valid Zip code" ValidationExpression="\d{5}(-\d{4})?"
Font-Size="Smaller" ControlToValidate ="txtZip"></asp:RegularExpressionValidator></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" Height ="40" ><asp:Label runat="server" Text="Phone #:" id="lblPhone"></asp:Label><asp:TextBox ID="txtPhone" runat="server" style="margin-left: 5px" width="100" ></asp:TextBox><asp:RegularExpressionValidator runat="server"
ErrorMessage="*Enter valid phone number(999-999-9999)" ForeColor="Red" id="regValidPhone1"
ControlToValidate="txtPhone" ValidationExpression="\d{3}-\d{3}-\d{4}"
Font-Size="Smaller" ToolTip="Format 999-999-9999"></asp:RegularExpressionValidator></asp:TableCell><asp:TableCell ID="TableCell3" runat ="server" Height ="40"><asp:Label runat="server" Text="Cell Phone #:" id="lblCellPhone"></asp:Label><asp:TextBox ID="txtCellPhone" runat="server" style="margin-left: 5px" width="100" ></asp:TextBox><asp:RegularExpressionValidator runat="server"
ErrorMessage="*Enter valid phone number" ForeColor="Red" id="regValidPhone2"
ControlToValidate="txtCellPhone" ValidationExpression="\d{3}-\d{3}-\d{4}"
Font-Size="Smaller" ToolTip="Format 999-999-9999"></asp:RegularExpressionValidator></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" Height ="40" ColumnSpan="3" ><asp:Label runat="server" Text="Personal Email:" id="lblEmail"></asp:Label><asp:TextBox ID="txtEmail" runat="server" style="margin-left: 5px" width="250" ></asp:TextBox><asp:RegularExpressionValidator runat="server" ErrorMessage="*Enter valid email address" ForeColor="Red" id="valRegExEmail" controltovalidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ></asp:RegularExpressionValidator></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" Height ="40" ColumnSpan="3" ><asp:Label runat="server" Text="Tech Email:" id="lblWebmail"></asp:Label><asp:TextBox ID="txtWebmail" runat="server" style="margin-left: 5px" width="250" ReadOnly="true" ></asp:TextBox></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat ="server" Height ="40" width="250" ><asp:Label runat="server" Text="Are you a beginning Freshman? " id="lblBegFreshman" ></asp:Label></asp:TableCell><asp:TableCell runat="server" Height="40" HorizontalAlign="Left"><asp:RadioButtonList ID="RdbBegFreshman" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" > <asp:ListItem Text="Yes" Value="Y"></asp:ListItem><asp:ListItem Text ="No" Value="N"></asp:ListItem></asp:RadioButtonList></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ID="tblRowBegFreshman" Visible="false" ><asp:TableCell runat="server" Height="40" ColumnSpan="3"><asp:Label runat="server" id="lblGPA" Text="Please provide your cumulative High School GPA. "></asp:Label><asp:TextBox runat="server" ID="txtGPA" MaxLength="4" Size="3"></asp:TextBox><asp:RegularExpressionValidator runat="server" controltovalidate="txtGPA" ErrorMessage="*Enter valid GPA" id="valregexGPA" ForeColor="Red" ValidationExpression="^[0]|[0-3]\.(\d?\d?)|[4].[0]$"></asp:RegularExpressionValidator></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" Height="40" ColumnSpan="3"><asp:Label runat="server" ID="lblStudType" Text="Are you a(n)? " ></asp:Label> <asp:DropDownList ID="drpStudentType" runat="server" style="margin-left: 10px;" AutoPostBack="true" ><asp:ListItem Text="Undergraduate" Value="Undergraduate"></asp:ListItem><asp:ListItem Text="Graduate" Value="Graduate"></asp:ListItem></asp:DropDownList></asp:TableCell></asp:TableRow> <asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" ><asp:Label runat="server" ID="lblGradInfo" Text="I plan to graduate from Louisiana Tech in the "></asp:Label><asp:DropDownList ID="drpGradQuarter" runat="server" style="margin-left: 10px;" AutoPostBack ="true" ><asp:ListItem Text="" Value=""></asp:ListItem><asp:ListItem Text="Fall" Value="Fall"></asp:ListItem><asp:ListItem Text="Winter" Value="Winter"></asp:ListItem><asp:ListItem Text="Spring" Value="Spring"></asp:ListItem><asp:ListItem Text="Summer" Value="Summer"></asp:ListItem></asp:DropDownList><asp:Label runat="server" ID="lblGradYear" Text="Quarter of " style="padding-left: 5px;"></asp:Label><asp:DropDownList ID="drpGradYear" runat="server" AutoPostBack="true" style="margin-left: 10px;"></asp:DropDownList><asp:Label runat="server" ID="lblyr" Text=" Academic year " style="padding-left: 5px;"></asp:Label></asp:TableCell></asp:TableRow><asp:Tablerow runat="server" ID="UGNote" Visible="false"><asp:TableCell ID="TableCell1" runat="server" ColumnSpan="3" ><asp:Label runat="server" ID="LblUGNote" style="padding-top: 5px; font-size:small ;color:red " Text="Note: If you will complete an undergraduate degree this year and plan to enter graduate school, you must be unconditionally admitted to be eligible for graduate level aid. You will also have to make a change on your FAFSA after your last undergraduate disbursement."></asp:Label></asp:TableCell></asp:Tablerow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3"><asp:Table runat ="server" style="font-size:medium;"><asp:TableRow runat ="server" ><asp:TableCell runat ="server" Height="40" Width="120" ><asp:Label runat ="server" ID="lblSchTerm" Text="School Term" Font-Bold="true" ></asp:Label></asp:TableCell><asp:TableCell runat="server" ColumnSpan="2" ><asp:Label runat ="server" ID="lblCrHour" Text="Credit Hours Planned" Font-Bold ="true" ></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ID="FallHour" ><asp:TableCell runat ="server" HorizontalAlign="center" Height="40" ><asp:Label runat="server" ID="lblfallHours" Text="Fall"></asp:Label></asp:TableCell><asp:TableCell runat="server" ColumnSpan="2"><asp:DropDownList runat="server" AutoPostBack="true" ID="drpFallHours" ><asp:ListItem Text ="0" Value="0"></asp:ListItem><asp:ListItem Text ="1" Value="1"></asp:ListItem><asp:ListItem Text ="2" Value="2"></asp:ListItem><asp:ListItem Text ="3" Value="3"></asp:ListItem><asp:ListItem Text ="4" Value="4"></asp:ListItem><asp:ListItem Text ="5" Value="5"></asp:ListItem><asp:ListItem Text ="6" Value="6"></asp:ListItem><asp:ListItem Text ="7" Value="7"></asp:ListItem><asp:ListItem Text ="8" Value="8"></asp:ListItem><asp:ListItem Text ="9" Value="9"></asp:ListItem><asp:ListItem Text ="10" Value="10"></asp:ListItem><asp:ListItem Text ="11" Value="11"></asp:ListItem><asp:ListItem Text ="12+" Value="12"></asp:ListItem></asp:DropDownList></asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ><asp:TableCell runat ="server" HorizontalAlign="center" ><asp:Label runat="server" ID="lblWntrHours" Text="Winter" ></asp:Label></asp:TableCell><asp:TableCell runat ="server" Width="250" ><asp:DropDownList runat="server" AutoPostBack="true" ID="drpWinterHours" ><asp:ListItem Text ="0" Value="0"></asp:ListItem><asp:ListItem Text ="1" Value="1"></asp:ListItem><asp:ListItem Text ="2" Value="2"></asp:ListItem><asp:ListItem Text ="3" Value="3"></asp:ListItem><asp:ListItem Text ="4" Value="4"></asp:ListItem><asp:ListItem Text ="5" Value="5"></asp:ListItem><asp:ListItem Text ="6" Value="6"></asp:ListItem><asp:ListItem Text ="7" Value="7"></asp:ListItem><asp:ListItem Text ="8" Value="8"></asp:ListItem><asp:ListItem Text ="9" Value="9"></asp:ListItem><asp:ListItem Text ="10" Value="10"></asp:ListItem><asp:ListItem Text ="11" Value="11"></asp:ListItem><asp:ListItem Text ="12+" Value="12"></asp:ListItem></asp:DropDownList></asp:TableCell><asp:TableCell runat ="server" HorizontalAlign ="left" Font-Underline="true" >
Full-time credit hours are 8+ (undergraduate) 6+ (graduate)</asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ><asp:TableCell runat ="server" HorizontalAlign="center" height="40" ><asp:Label runat="server" ID="lblSpringHours" Text="Spring" ></asp:Label></asp:TableCell><asp:TableCell runat ="server" Width="150" ><asp:DropDownList runat="server" AutoPostBack="true" ID="drpSpringHours" ><asp:ListItem Text ="0" Value="0"></asp:ListItem><asp:ListItem Text ="1" Value="1"></asp:ListItem><asp:ListItem Text ="2" Value="2"></asp:ListItem><asp:ListItem Text ="3" Value="3"></asp:ListItem><asp:ListItem Text ="4" Value="4"></asp:ListItem><asp:ListItem Text ="5" Value="5"></asp:ListItem><asp:ListItem Text ="6" Value="6"></asp:ListItem><asp:ListItem Text ="7" Value="7"></asp:ListItem><asp:ListItem Text ="8" Value="8"></asp:ListItem><asp:ListItem Text ="9" Value="9"></asp:ListItem><asp:ListItem Text ="10" Value="10"></asp:ListItem><asp:ListItem Text ="11" Value="11"></asp:ListItem><asp:ListItem Text ="12+" Value="12"></asp:ListItem></asp:DropDownList> </asp:TableCell><asp:TableCell runat ="server" Font-Underline="true" >
Half-time credit hours are 4+ (undergraduate) 3+ (graduate)</asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ><asp:TableCell runat ="server" ID="cellSummerLabel" ><asp:Label runat="server" ID="lblSummerHours" Text="Summer" ></asp:Label></asp:TableCell><asp:TableCell runat ="server" ID="cellSummer"><asp:DropDownList runat="server" AutoPostBack="true" ID="drpSummerHours" ><asp:ListItem Text ="0" Value="0"></asp:ListItem><asp:ListItem Text ="1" Value="1"></asp:ListItem><asp:ListItem Text ="2" Value="2"></asp:ListItem><asp:ListItem Text ="3" Value="3"></asp:ListItem><asp:ListItem Text ="4" Value="4"></asp:ListItem><asp:ListItem Text ="5" Value="5"></asp:ListItem><asp:ListItem Text ="6" Value="6"></asp:ListItem><asp:ListItem Text ="7" Value="7"></asp:ListItem><asp:ListItem Text ="8" Value="8"></asp:ListItem><asp:ListItem Text ="9" Value="9"></asp:ListItem><asp:ListItem Text ="10" Value="10"></asp:ListItem><asp:ListItem Text ="11" Value="11"></asp:ListItem><asp:ListItem Text ="12+" Value="12"></asp:ListItem></asp:DropDownList> </asp:TableCell></asp:TableRow></asp:Table></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell ID="TableCell2" ColumnSpan="3" runat ="server" ForeColor="Red" Font-Bold ="true" Font-Size ="Smaller" ><asp:Label runat="server" ID="lblEstiAidNote" Text="**Financial aid budgets are estimated on credit hours planned, but are adjusted based on actual enrollment hours."></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ><asp:TableCell runat="server" ColumnSpan="3" Height="40"><asp:Label runat="server" ID="lblHousingPlan" Text ="What are your housing plans?"></asp:Label><asp:DropDownList runat="server" ID="drpHousing" AutoPostBack="true" style="margin-left: 20px;"><asp:ListItem Text="" Value ="" Selected="True" ></asp:ListItem><asp:ListItem Text ="1. On Campus- University Housing" Value="1" ></asp:ListItem><asp:ListItem Text="2. With Parents" Value ="2"></asp:ListItem><asp:ListItem Text="3. Off-campus (not residing with relatives)" Value ="3"></asp:ListItem></asp:DropDownList><asp:Label runat="server" ID="lblHousingExplain" Font-Size="X-Small" Font-Bold="true" ></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ID="HousingInfo" Visible="false"><asp:TableCell runat ="server" ColumnSpan="3" ><asp:Table runat ="server" style="font-size:medium;" ><asp:TableRow runat="server" ><asp:TableCell runat="server" Height="40" ><asp:Label runat="server" ID="lblHousingZip" Text="ZIP Code for Housing"></asp:Label><asp:TextBox runat="server" ID="txtHousingZip" MaxLength="5" size="7" Style="margin-left: 20px;"></asp:TextBox><asp:RegularExpressionValidator ID="reghousingZip" runat="server"
ErrorMessage="Enter valid Zip code" ValidationExpression="\d{5}(-\d{4})?"
Font-Size="Smaller" ControlToValidate ="txtHousingZip"></asp:RegularExpressionValidator></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" Height="40" ><asp:CheckBox runat ="server" AutoPostBack="true" ID="chkMilitary" Text="I or my parents live in on-base military housing or in housing for which the military provides a basic housing allowance (BAH)." /></asp:TableCell></asp:TableRow></asp:Table></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ID="New2013" ><asp:TableCell runat="server" ColumnSpan="3"><asp:Table runat="server" Font-Size="Medium" ><asp:TableRow runat="server" ><asp:TableCell runat="server" Height="40" ><asp:CheckBox runat ="server" AutoPostBack="true" ID="chkInMilitary" Text="Select if you are military." /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ID="MilBranch" Visible="false" ><asp:TableCell runat="server" Height="40"><asp:Label runat="server" ID="lblMilBranch" Text="Branch of Service:"></asp:Label><asp:DropDownList runat="server" ID="drpMilBranch" AutoPostBack="true" style="margin-left: 20px;" ToolTip="Select military branch" ></asp:DropDownList></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" Height="40"><asp:CheckBox runat="server" ID="chkTA" Text="Select if eligible for Tuition Assistance(TA)." /></asp:TableCell></asp:TableRow></asp:Table></asp:TableCell></asp:TableRow><%-- <asp:TableRow runat="server" ><asp:TableCell runat ="server" ColumnSpan="3" ><b>Loan Information</b>:Loan Information: If you seek Federal Direct Stafford loans at Louisiana Tech and did not have a Federal Direct Stafford loan disbursement in 2011-2012, you will need to complete a Stafford Master Promissory Note (MPN) and Stafford Entrance Counseling at <a href="http://www.studentloans.gov" target="new">www.studentloans.gov</a>.
You will need your FAFSA PIN to sign in to Manage My Direct Loan.</asp:TableCell></asp:TableRow>--%><asp:TableHeaderRow runat="server" ><asp:TableCell runat="server" style="padding-top :15px;"><asp:Label runat="server" ID="lblfinAssistHeader" Font-Bold="true" Font-Underline="true" Text="Financial Assistance:-"></asp:Label></asp:TableCell></asp:TableHeaderRow><asp:TableRow runat="server" ID="finassistNew" Visible="false" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;"><asp:Table runat="server" ID="tblFinAssistNew"><asp:TableRow runat="server" ><asp:TableCell runat="server" style="padding-top: 10px"><asp:CheckBox runat="server" Font-Size="Medium" ID="chkTOPS" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" style="padding-top: 10px"><asp:CheckBox runat="server" Font-Size="Medium" ID="chkULSEmployee" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" style="padding-top: 10px"><asp:Label runat="server" ID="lbllblFinassistNew" Font-Bold="true" Text="I expect to receive (check all that apply):"></asp:Label><asp:CheckBox runat="server" Font-Size="Medium" ID="chkOver55" Text="Over 55 Fee waiver" /><asp:CheckBox runat="server" Font-Size="Medium" ID="chkOutofState" Text="Out-of-State Fee Waiver" /><asp:CheckBox runat="server" Font-Size="Medium" ID="chkNG" Text="National Guard" /><asp:CheckBox runat="server" Font-Size="Medium" ID="chkROTC" Text="ROTC" /></asp:TableCell></asp:TableRow> </asp:Table></asp:TableCell></asp:TableRow><asp:TableRow runat ="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;">
Will you be receiving any financial assistance, other than <asp:Label runat ="server" ID="lblFinAssist" Font-Underline="true" Text =" Federal financial aid" ToolTip ="Pell grants, Stafford Loans, SEOG, Federal Work-Study." ></asp:Label> , to attend Louisiana Tech this year?
If yes, then list ALL other financial assistance you expect to receive to attend Louisiana Tech this year. (Enter name and $ per quarter).
Include assistance such as Vocational Rehabilitation, Barksdale tuition assistance, Americorp, University or outside scholarships, etc. <b>NOTE: Please do not include special characters in the name of any Financial Aid Scholarships. </b><asp:DropDownList ID="drpFinancialAssistance" runat="server" AutoPostBack ="true" style="margin-left: 10px;"><asp:ListItem Text ="" Value="" Selected="True" ></asp:ListItem><asp:ListItem Text="Yes" Value="Yes"></asp:ListItem><asp:ListItem Text="No" Value="No" ></asp:ListItem></asp:DropDownList></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ID="RowFinAssist" visible="false" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top : 10px;"><asp:Table runat="server" Font-Size="Medium" ><asp:TableRow runat ="server"><asp:TableCell runat="server" ><asp:GridView ID="grdFinancialAssistance" runat="server" AutoGenerateColumns="false"
EnableModelValidation="True" Width="700" HorizontalAlign="Center" showfooter="true" ><Columns><asp:TemplateField HeaderText="Financial Aid Scholarships"><ItemTemplate ><asp:TextBox ID="txtFinancialAssistance" runat ="server" size="50" ></asp:TextBox> </ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Fall"><ItemTemplate><asp:TextBox ID="txtfall" runat="server" size="9" ></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="txtFall" FilterType="Numbers" ></ajaxToolkit:FilteredTextBoxExtender></ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="Winter"><ItemTemplate><asp:TextBox runat="server" size="9" ID="txtWinter"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="txtWinter" FilterType="Numbers" ></ajaxToolkit:FilteredTextBoxExtender></ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="Spring"><ItemTemplate><asp:TextBox runat="server" size="9" ID="txtSpring"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" TargetControlID="txtSpring" FilterType="Numbers" ></ajaxToolkit:FilteredTextBoxExtender></ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="Summer"><ItemTemplate><asp:TextBox runat="server" size="9" ID="txtSummer"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="txtSummer" FilterType="Numbers" ></ajaxToolkit:FilteredTextBoxExtender></ItemTemplate> <FooterStyle HorizontalAlign="Right" /><FooterTemplate><span class="finaid-button-wrapper" style="vertical-align:baseline" > <span class="finaid-button-l"> </span><span class="finaid-button-r" > </span><asp:Button ID="ButtonAdd" runat="server" OnClick ="ButtonAdd_Click" Text="Add Row" CssClass="finaid-button" Font-Size="X-Small" ></asp:Button></FooterTemplate></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Remove</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns></asp:GridView></asp:TableCell></asp:TableRow></asp:Table></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top :15px;" ><asp:Label runat="server" ID="lblSchoolInfoHeading" Text="Educational History:-" Font-Bold="true" Font-Underline="true" ></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3"><asp:Label runat="server" ID="lblSchoolInfo" Text="Have you attended any educational institutions since high school? List your most recent school first. "></asp:Label><asp:DropDownList ID="drpSchoolInfo" runat="server" AutoPostBack ="true" style="margin-left: 10px;"><asp:ListItem Text="" Value="" Selected="True"></asp:ListItem><asp:ListItem Text="Yes" Value="Yes"></asp:ListItem><asp:ListItem Text="No" Value="No" ></asp:ListItem></asp:DropDownList></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ID="RowSchoolInfo" Visible="false"><asp:TableCell runat="server" ColumnSpan="3" ><asp:Table ID="Table1" runat="server" Font-Size="Medium" ><asp:TableRow runat="server" ><asp:TableCell runat="server" ><asp:Label runat="server" ID="lblNote" Text="<br><b>NOTE:</b><i> If you are a dual-enrolled/early start student, be sure to have the college send a transcript to Louisiana Tech. This information is very important. If you are transferring to Louisiana Tech, please have official copies of your transcript(s) sent to Admissions/Registrar's Office.</i> <b>IMPORTANT: 'From' and 'To' dates must be entered in MM/YYYY format.<b>"></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat ="server"><asp:TableCell runat="server" style="padding-top : 10px;"><asp:GridView ID="grdSchoolInfo" runat="server" AutoGenerateColumns="false"
EnableModelValidation="True" Width="100%" HorizontalAlign="Center" showfooter="true" ><Columns><asp:TemplateField HeaderText="Full Name of School"><ItemTemplate ><asp:TextBox ID="txtSchoolName" runat ="server" size="70" OnTextChanged ="SchoolCheck" AutoPostBack="true" ></asp:TextBox> <ajaxToolkit:AutoCompleteExtender ID="autoComplete1" TargetControlID="txtSchoolName" ServicePath="~/AutoComplete.asmx"
ServiceMethod="GetCompletionList" MinimumPrefixLength="2"
CompletionInterval="100"
EnableCaching="FALSE"
CompletionSetCount="20" runat="server"></ajaxToolkit:AutoCompleteExtender></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="City"><ItemTemplate><asp:TextBox ID="txtSchoolCity" runat="server" size="20" ></asp:TextBox></ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="State"><ItemTemplate><asp:TextBox runat="server" size="5" ID="txtSchState"></asp:TextBox> </ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="From"><ItemTemplate><asp:TextBox runat="server" size="7" ID="txtSchFrom"></asp:TextBox><asp:RegularExpressionValidator runat="server" controltovalidate="txtSchFrom" ToolTip ="Enter mm/yyyy format only" ErrorMessage="*" id="valregexSchFrom" ForeColor="Red" ValidationExpression="^((0[1-9])|(1[0-2]))\/(\d{4})$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender1" Format ="MM/yyyy" runat="server" TargetControlID ="txtschfrom"></ajaxToolkit:CalendarExtender></ItemTemplate> </asp:TemplateField><asp:TemplateField HeaderText="To"><ItemTemplate><asp:TextBox runat="server" size="7" ID="txtSchTo"></asp:TextBox><asp:RegularExpressionValidator runat="server" controltovalidate="txtSchTo" ToolTip ="Enter mm/yyyy format only" ErrorMessage="*" id="valregexSchTo" ForeColor="Red" ValidationExpression="^((0[1-9])|(1[0-2]))\/(\d{4})$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID ="txtschto" Format ="MM/yyyy"></ajaxToolkit:CalendarExtender></ItemTemplate> <FooterStyle HorizontalAlign="Right" /><FooterTemplate><span class="finaid-button-wrapper" style="vertical-align:baseline" > <span class="finaid-button-l"> </span><span class="finaid-button-r" > </span><asp:Button ID="ButtonAddSchool" runat="server" OnClick ="ButtonAddSchol_Click" Text="Add New Row" CssClass="finaid-button" Font-Size="X-Small" ></asp:Button></FooterTemplate></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click">Remove</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns></asp:GridView></asp:TableCell></asp:TableRow></asp:Table></asp:TableCell></asp:TableRow><asp:TableRow runat="server"><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 10px"><asp:Label runat="server" ID="lblExpenses" Text="Additional Expense(s): If you will incur any of the expenses below and would like your financial aid budget to be increased, please check below and go to http://www.latech.edu/finaid. Go to the Forms tab, choose the appropriate academic year, and find the form under Other Forms. If you indicate a(n) additional expense, your file will not be processed until the required document is furnished."></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 10px"><asp:CheckBox ID="chkAviation" runat="server" Text="Aviation Flight Costs: If you will incur flight costs as an Aviation major, you must furnish the Aviation Flight Fee Budget Increase form ." /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 10px"><asp:CheckBox ID="chkChildcare" runat="server" Text="Child Care Costs: If you will incur child care costs, you must furnish the Child Care Expense Budget Increase form" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;text-align: center "><b><u>Acknowledgements</u></b></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;font-size: small ;color: #f00"><asp:CheckBox ID="chkPayFirst" runat="server" /> </asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;font-size: small ;color: #f00"><asp:CheckBox ID="chkSAP" runat="server" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;font-size: small ;color: #f00"><asp:CheckBox ID="chkReadSAP" runat="server" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;font-size: small ;color: #f00"><asp:CheckBox ID="chkVerifyInfo" runat="server" /></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" ColumnSpan="3" style="padding-top: 15px;"><asp:Label ID="EnterESIGN" runat="server" text="By entering your ESIGN# and submitting this form, you are adding your signature and permitting Louisiana Tech University to accept this form electronically. "></asp:Label></asp:TableCell></asp:TableRow><asp:TableRow runat="server" ><asp:TableCell runat="server" style="padding-top: 15px;text-align: right "><asp:TextBox ID="txtESIGN" TextMode="Password" runat="server" MaxLength="7" Width="50" ToolTip ="Enter your ESIGN here" ></asp:TextBox></asp:TableCell><asp:TableCell runat="server" style="padding-top: 15px;text-align: left " ><span class="finaid-button-wrapper" style="vertical-align:baseline" > <span class="finaid-button-l"> </span><span class="finaid-button-r" > </span><asp:Button runat="server" Text="Submit" id="btnSubmit" CssClass="finaid-button" Width="90" ></asp:Button></span></asp:TableCell></asp:TableRow></asp:Table><br /><a href="/missingdocs.aspx">Cancel</a> and return to missing information.</form></div></asp:Content>
VB:
Option Explicit On
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports System.Xml
Imports System.Text.RegularExpressions
Partial Class dataform
Inherits System.Web.UI.Page
Dim tmpyear, tmpyear1 As Integer
Public strSAYT, strStudToken, strAddress, strStreet2, strCity, strState, strZip, strName, strEmail, strWebmail, strPhone, strCellPhone, strFName, StrLName, strID As String
Public rowCounter As Integer
Protected Sub RdbBegFreshman_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RdbBegFreshman.SelectedIndexChanged
If RdbBegFreshman.SelectedValue.ToString = "Y" Then
tblRowBegFreshman.Visible = True
Else
tblRowBegFreshman.Visible = False
End If
End Sub
Protected Sub drpHousing_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles drpHousing.SelectedIndexChanged
If drpHousing.SelectedItem.Value = "1" Then
lblHousingExplain.Text = "(University controlled housing assigned by th ehousing office.)"
ElseIf drpHousing.SelectedItem.Value = "2" Then
lblHousingExplain.Text = "(Living at your parent's home and commuting regularly to campus.)"
ElseIf drpHousing.SelectedItem.Value = "3" Then
lblHousingExplain.Text = "(Living in a leased/purchased housing not with parents or other relatives who are not students.)"
End If
If drpHousing.SelectedItem.Value = "2" Or drpHousing.SelectedItem.Value = "3" Then
HousingInfo.Visible = True
Else
HousingInfo.Visible = False
End If
End Sub
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache)
HttpContext.Current.Response.Cache.SetNoServerCaching()
HttpContext.Current.Response.Cache.SetNoStore()
Try
tmpyear = Session("Award_Year")
tmpyear1 = tmpyear + 1
strName = Session("Name")
strStudToken = Session("strStudToken")
strSAYT = Session("strSAYT")
lblH3.Text = lblH3.Text & tmpyear & "-" & Right(tmpyear1, 2)
Using cn As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
cn.Open()
Dim cmdStudent As New SqlCommand(ASP.UsrCntrl.getStuInfo(strStudToken), cn)
Dim rdrstudent As SqlDataReader = cmdStudent.ExecuteReader(Data.CommandBehavior.CloseConnection)
If rdrstudent.HasRows Then
rdrstudent.Read()
strFName = rdrstudent("first_name").ToString
strFName = strFName.Replace("'", "''")
StrLName = rdrstudent("last_name").ToString
StrLName = StrLName.Replace("'", "''")
strAddress = rdrstudent("primary_street1").ToString
strStreet2 = rdrstudent("primary_street2").ToString()
strCity = rdrstudent("primary_city").ToString
strState = rdrstudent("primary_state").ToString
strZip = rdrstudent("primary_zipcode").ToString
strPhone = rdrstudent("primary_phone_number").ToString
strCellPhone = rdrstudent("cellular_telephone").ToString
strEmail = rdrstudent("email_address").ToString
strWebmail = rdrstudent("email_address_2").ToString
End If
cn.Close()
End Using
txtAddress.Text = strAddress
txtStreet2.Text = strStreet2
txtCity.Text = strCity
txtEmail.Text = strEmail
txtWebmail.Text = strWebmail
If strPhone <> "" Then
txtPhone.Text = strPhone.Substring(0, 3) + "-" + strPhone.Substring(3, 3) + "-" + strPhone.Substring(6, 4)
Else
txtPhone.Text = ""
End If
If strCellPhone <> "" Then
txtCellPhone.Text = strCellPhone.Substring(0, 3) + "-" + strCellPhone.Substring(3, 3) + "-" + strCellPhone.Substring(6, 4)
Else
txtCellPhone.Text = ""
End If
If Session("Award_Year") <> 2012 Then
New2013.Visible = True
Else
New2013.Visible = False
End If
txtZip.Text = strZip
txtID.Text = "*** - ** - " & Right(Session("SSN"), 4)
txtName.Text = strName
drpGradYear.Items.Clear()
drpGradYear.Items.Add("")
drpGradYear.Items.Add(tmpyear)
drpGradYear.Items.Add(tmpyear + 1)
drpGradYear.Items.Add(tmpyear + 2)
drpGradYear.Items.Add(tmpyear + 3)
drpGradYear.Items.Add(tmpyear + 4)
drpGradYear.Items.Add(tmpyear + 5)
drpGradYear.Items.Add(tmpyear + 6)
drpGradYear.Items.Add(tmpyear + 7)
Dim frmAviation, frmChildcare, frmAwYear, linkfile As String
If (tmpyear = 2014) Then frmAwYear = tmpyear - 2000 & tmpyear - 1999 Else frmAwYear = tmpyear - 2000 & tmpyear - 1999
If (tmpyear = 2014) Then linkfile = "faf" & frmAwYear & "095.pdf" Else linkfile = tmpyear & "-" & tmpyear - 1999 & "/" & "faf" & frmAwYear & "095.pdf"
frmAviation = "http://www.latech.edu/financial_aid/" & "forms" & frmawyear & ".shtml#A" '& frmAwYear & "048.pdf"'
frmChildcare = "http://www.latech.edu/financial_aid/docs/" & linkfile
lblExpenses.Text = Replace(lblExpenses.Text, "Additional Expense(s)", "<b>Additional Expense(s)</b>")
lblExpenses.Text = Replace(lblExpenses.Text, "http://www.latech.edu/finaid", "<a href=""http://www.latech.edu/finaid"" target=""_Blank"">http://www.latech.edu/finaid</a>")
chkAviation.Text = Replace(chkAviation.Text, "Aviation Flight Costs:", "<b>Aviation Flight Costs:</b>")
chkAviation.Text = Replace(chkAviation.Text, "Aviation Flight Fee Budget Increase form", "<a href=" & frmAviation & " target=""_Blank"">Aviation Flight Fee Budget Increase form</a>")
chkChildcare.Text = Replace(chkChildcare.Text, "Child Care Costs:", "<b>Child Care Costs:</b>")
chkChildcare.Text = Replace(chkChildcare.Text, "Child Care Expense Budget Increase form", "<a href=" & frmChildcare & " target=""_Blank"">Child Care Expense Budget Increase form</a>")
chkPayFirst.Text = "I permit Louisiana Tech University to use any Title IV federal aid I receive to pay any institutional fees, charges, and fees related to my attendance at Louisiana Tech University. "
chkPayFirst.Text = chkPayFirst.Text + "This permission pertains to charges for the award year for which I am receiving financial aid and minor prior year charges up to $200. I understand that I may rescind (in writing) "
chkPayFirst.Text = chkPayFirst.Text + "this permission at any time. Allowable charges include tuition and fees, residence hall "
chkPayFirst.Text = chkPayFirst.Text + "rent, meal plans, debit card (Tech Express), late registration fee, returned check fee, "
chkPayFirst.Text = chkPayFirst.Text + "library fines and lost book charges, traffic fines, application fee, housing room deposit, "
chkPayFirst.Text = chkPayFirst.Text + "miscellaneous housing charges and fines, SGA loans, bookstore charges, athletic book "
chkPayFirst.Text = chkPayFirst.Text + "charges, married student housing rent, lost ID card fee, and various departmental charges and fines."
chkSAP.Text = "I understand I must meet the Satisfactory Academic Progress requirements for Louisiana Tech University in order to be eligible for and retain federal financial aid. "
chkReadSAP.Text = "I acknowledge that I have read the <a href=""http://www.latech.edu/financial_aid/maineligsappolicy.shtml"" target=""_Blank"">Satisfactory Academic Progress policy</a>."
chkVerifyInfo.Text = "I certify that the above information is true and correct to the best of my knowledge. If this form has been completed with intent to receive federal financial aid on the basis of false or incomplete information, I understand that I am subject to denial of aid and possible federal prosecution. "
drpMilBranch.Items.Clear()
drpMilBranch.Items.Add(New ListItem("Select One", ""))
drpMilBranch.Items.Add(New ListItem("Air Force", "AF"))
drpMilBranch.Items.Add(New ListItem("Air Force National Guard", "AFNG"))
drpMilBranch.Items.Add(New ListItem("Air Force Reserve", "AFR"))
drpMilBranch.Items.Add(New ListItem("Army", "AR"))
drpMilBranch.Items.Add(New ListItem("Army National Guard", "ARNG"))
drpMilBranch.Items.Add(New ListItem("Army Reserve", "ARR"))
drpMilBranch.Items.Add(New ListItem("Marine Corps", "MC"))
drpMilBranch.Items.Add(New ListItem("Marine Corps Reserve", "MCR"))
drpMilBranch.Items.Add(New ListItem("Navy", "NV"))
drpMilBranch.Items.Add(New ListItem("NVR", "NVR"))
If Session("Award_Year") = 2015 Or 2014 Then
cellSummer.Visible = False
cellSummerLabel.ColumnSpan = 3
lblSummerHours.BackColor = Drawing.Color.Yellow
lblSummerHours.Text = "Request for aid for Summer (June-Aug) will not be processed at this time and will not appear on your award letter. An e-mail notice will be sent to students when a form is available to request Summer aid."
finassistNew.Visible = True
chkTOPS.Text = "Based on my high school GPA, ACT score, and TOPS core coursework, I expect to receive the Louisiana TOPS Scholarships."
chkULSEmployee.Text = "I, my parent(s), or my spouse work for Louisiana Tech University or another University of Louisiana System (ULS) school as a full-time employee.<i> NOTE: Do <u>NOT</U> include federal or institutional work-study as a student employee</i>"
End If
Catch ex As Exception
UserMsgBox(Me, "Error occured")
Response.Redirect("Default.aspx")
End Try
End Sub
Protected Sub grdFinancialAssistance_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdFinancialAssistance.RowCreated
If e.Row.RowType = DataControlRowType.DataRow Then
Dim dt As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
Dim lb As LinkButton = DirectCast(e.Row.FindControl("LinkButton1"), LinkButton)
If lb IsNot Nothing Then
If dt.Rows.Count > 1 Then
If e.Row.RowIndex = dt.Rows.Count - 1 Then
lb.Visible = False
End If
Else
lb.Visible = False
End If
End If
End If
End Sub
Protected Sub grdSchoolInfo_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdSchoolInfo.RowCreated
If e.Row.RowType = DataControlRowType.DataRow Then
Dim dt1 As DataTable = DirectCast(ViewState("mytable"), DataTable)
Dim lb As LinkButton = DirectCast(e.Row.FindControl("LinkButton2"), LinkButton)
If dt1 IsNot Nothing Then
If lb IsNot Nothing Then
If dt1.Rows.Count > 1 Then
If e.Row.RowIndex = dt1.Rows.Count - 1 Then
lb.Visible = False
End If
Else
lb.Visible = False
End If
End If
End If
End If
End Sub
Protected Sub grdFinancialAssistance_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdFinancialAssistance.RowDataBound
' e.Row.Cells(5).Visible = False
If e.Row.RowType = DataControlRowType.Header Then
End If
End Sub
Protected Sub drpFinancialAssistance_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles drpFinancialAssistance.SelectedIndexChanged
If drpFinancialAssistance.SelectedItem.Text = "Yes" Then
RowFinAssist.Visible = True
Else
RowFinAssist.Visible = False
End If
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("CurrSession") = False Then
Response.Redirect("Default.aspx")
End If
If ASP.UsrCntrl.checkExternalTbl(Session("SSN"), Session("Award_Year")) = True Then
UserMsgBox(Me, "NOTE: If you previously tried submitting this form and received an error, please log out and wait 30 minutes before trying again.")
Response.AddHeader("REFRESH", "5;URL=MissingDocs.aspx")
End If
rowCounter = 0
Me.MaintainScrollPositionOnPostBack = True
If Page.IsPostBack = False Then
EsignMsg(Me, "Your ESIGN# is required to electronically submit this online data form. If you do not have an ESIGN#,")
fil_DrpState()
drpState.SelectedIndex = drpState.Items.IndexOf(drpState.Items.FindByValue(strState))
SetInitialRow()
SetInitialSchoolRow()
End If
End Sub
Private Sub SetInitialRow()
Dim dt As New DataTable()
Dim dr As DataRow = Nothing
dt.Columns.Add(New DataColumn("Financial Aid_Scholaships", GetType(String)))
dt.Columns.Add(New DataColumn("Fall", GetType(String)))
dt.Columns.Add(New DataColumn("Winter", GetType(String)))
dt.Columns.Add(New DataColumn("Spring", GetType(String)))
dt.Columns.Add(New DataColumn("Summer", GetType(String)))
dr = dt.NewRow()
dr("Financial Aid_Scholaships") = String.Empty
dr("Fall") = String.Empty
dr("Winter") = String.Empty
dr("Spring") = String.Empty
dr("Summer") = String.Empty
dt.Rows.Add(dr)
'dr = dt.NewRow();
'Store the DataTable in ViewState
ViewState("CurrentTable") = dt
grdFinancialAssistance.DataSource = dt
grdFinancialAssistance.DataBind()
End Sub
Private Sub SetInitialSchoolRow()
Dim dt As New DataTable()
Using cn As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
cn.Open()
Dim cmd As New SqlCommand(ASP.DataformControl.get_PF_School_Data(Session("strStudToken")), cn)
Dim rd As SqlDataReader = cmd.ExecuteReader(CommandBehavior.Default)
Dim ds As New DataSet
If rd.HasRows Then
dt.Load(rd)
ViewState("mytable") = dt
drpSchoolInfo.ClearSelection()
drpSchoolInfo.Items.FindByText("No").Selected = False
drpSchoolInfo.Items.FindByText("Yes").Selected = True
RowSchoolInfo.Visible = True
Dim rowIndex As Integer = 0
grdSchoolInfo.DataSource = dt
dt.Columns.Add(New DataColumn("FromDate", GetType(String)))
dt.Columns.Add(New DataColumn("ToDate", GetType(String)))
grdSchoolInfo.DataBind()
If dt.Rows.Count > 0 Then
For i As Integer = 0 To dt.Rows.Count - 1
Dim SchoolName As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(0).FindControl("txtSchoolName"), TextBox)
Dim City As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(1).FindControl("txtSchoolCity"), TextBox)
Dim State As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(2).FindControl("txtSchState"), TextBox)
Dim To1 As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(3).FindControl("txtSchTo"), TextBox)
Dim from As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(4).FindControl("txtSchFrom"), TextBox)
SchoolName.Text = dt.Rows(i)("Full_Name_of_School").ToString()
City.Text = dt.Rows(i)("City").ToString()
State.Text = dt.Rows(i)("State").ToString()
rowIndex = rowIndex + 1
Next
End If
Else
Dim dr As DataRow = Nothing
dt.Columns.Add(New DataColumn("Full_Name_of_School", GetType(String)))
dt.Columns.Add(New DataColumn("City", GetType(String)))
dt.Columns.Add(New DataColumn("State", GetType(String)))
dt.Columns.Add(New DataColumn("FromDate", GetType(String)))
dt.Columns.Add(New DataColumn("ToDate", GetType(String)))
dr = dt.NewRow()
dr("Full_Name_of_School") = String.Empty
dr("City") = String.Empty
dr("State") = String.Empty
dr("FromDate") = String.Empty
dr("ToDate") = String.Empty
dt.Rows.Add(dr)
grdSchoolInfo.DataSource = dt
grdSchoolInfo.DataBind()
ViewState("mytable") = dt
End If
cn.Close()
End Using
'dr = dt.NewRow();
'Store the DataTable in ViewState
End Sub
Public Sub EsignMsg(ByVal F As Object, ByVal sMsg As String)
Dim sb As New StringBuilder()
Dim oFormObject As System.Web.UI.Control = Nothing
Try
sMsg = sMsg.Replace("'", "\'")
sMsg = sMsg.Replace(Chr(34), "\" & Chr(34))
sMsg = sMsg.Replace(vbCrLf, "\n")
sMsg = "<script language='javascript'>alert('" & sMsg & "Please go to (Forgot ESIGN - Access Code?) page to request your ESIGN.\n\nTo Continue click OK.');</script>"
sb = New StringBuilder()
sb.Append(sMsg)
For Each oFormObject In F.Controls
If TypeOf oFormObject Is HtmlForm Then
Exit For
End If
Next
oFormObject.Controls.AddAt(oFormObject.Controls.Count, New LiteralControl(sb.ToString()))
Catch ex As Exception
End Try
End Sub
Public Sub UserMsgBox(ByVal F As Object, ByVal sMsg As String)
Dim sb As New StringBuilder()
Dim oFormObject As System.Web.UI.Control = Nothing
Try
sMsg = sMsg.Replace("'", "\'")
sMsg = sMsg.Replace(Chr(34), "\" & Chr(34))
sMsg = sMsg.Replace(vbCrLf, "\n")
sMsg = "<script language='javascript'>alert('" & sMsg & "');</script>"
sb = New StringBuilder()
sb.Append(sMsg)
For Each oFormObject In F.Controls
If TypeOf oFormObject Is HtmlForm Then
Exit For
End If
Next
oFormObject.Controls.AddAt(oFormObject.Controls.Count, New LiteralControl(sb.ToString()))
Catch ex As Exception
End Try
End Sub
Private Sub addNewRowtoGrid()
Dim rowindex As Integer = 0
If ViewState("CurrentTable") IsNot Nothing Then
Dim dtCurrentTable As DataTable
dtCurrentTable = DirectCast(ViewState("CurrentTable"), DataTable)
Dim drCurrentRow As DataRow = Nothing
If dtCurrentTable.Rows.Count > 0 Then
For i As Integer = 1 To dtCurrentTable.Rows.Count
'extract the TextBox values
Dim SchName As TextBox = DirectCast(grdFinancialAssistance.Rows(rowindex).Cells(0).FindControl("txtFinancialAssistance"), TextBox)
Dim SchFall As TextBox = DirectCast(grdFinancialAssistance.Rows(rowindex).Cells(1).FindControl("txtfall"), TextBox)
Dim schWinter As TextBox = DirectCast(grdFinancialAssistance.Rows(rowindex).Cells(2).FindControl("txtWinter"), TextBox)
Dim SchSpring As TextBox = DirectCast(grdFinancialAssistance.Rows(rowindex).Cells(3).FindControl("txtSpring"), TextBox)
Dim SchSummer As TextBox = DirectCast(grdFinancialAssistance.Rows(rowindex).Cells(4).FindControl("txtSummer"), TextBox)
If Trim(SchName.Text) = "" Then
UserMsgBox(Me, "Please Enter Scholarship name")
Exit Sub
End If
If Trim(SchFall.Text) = "" Or Trim(schWinter.Text) = "" Or Trim(SchSummer.Text) = "" Or Trim(SchSpring.Text) = "" Then
UserMsgBox(Me, "You listed aid or scholarship, but you did not fill in amounts. Please re-enter values without $ sign")
Exit Sub
End If
drCurrentRow = dtCurrentTable.NewRow()
dtCurrentTable.Rows(i - 1)("Financial Aid_Scholaships") = SchName.Text
dtCurrentTable.Rows(i - 1)("Fall") = SchFall.Text
dtCurrentTable.Rows(i - 1)("Winter") = schWinter.Text
dtCurrentTable.Rows(i - 1)("Spring") = SchSpring.Text
dtCurrentTable.Rows(i - 1)("Summer") = SchSummer.Text
rowindex = rowindex + 1
Next
dtCurrentTable.Rows.Add(drCurrentRow)
ViewState("CurrentTable") = dtCurrentTable
grdFinancialAssistance.DataSource = dtCurrentTable
grdFinancialAssistance.DataBind()
End If
End If
setpreviousData()
End Sub
Private Sub addNewRowtoSchoolGrid()
Dim rowindex As Integer = 0
If ViewState("mytable") IsNot Nothing Then
Dim dtCurrentTable As DataTable = DirectCast(ViewState("mytable"), DataTable)
Dim drCurrentRow As DataRow = Nothing
If dtCurrentTable.Rows.Count > 0 Then
For i As Integer = 1 To dtCurrentTable.Rows.Count
'extract the TextBox values
Dim SchoolName As TextBox = DirectCast(grdSchoolInfo.Rows(rowindex).Cells(0).FindControl("txtSchoolName"), TextBox)
Dim City As TextBox = DirectCast(grdSchoolInfo.Rows(rowindex).Cells(1).FindControl("txtSchoolCity"), TextBox)
Dim State As TextBox = DirectCast(grdSchoolInfo.Rows(rowindex).Cells(2).FindControl("txtSchState"), TextBox)
Dim FromDate As TextBox = DirectCast(grdSchoolInfo.Rows(rowindex).Cells(3).FindControl("txtSchFrom"), TextBox)
Dim to1 As TextBox = DirectCast(grdSchoolInfo.Rows(rowindex).Cells(4).FindControl("txtSchTo"), TextBox)
drCurrentRow = dtCurrentTable.NewRow()
dtCurrentTable.Rows(i - 1)("Full_Name_of_School") = SchoolName.Text
dtCurrentTable.Rows(i - 1)("City") = City.Text
dtCurrentTable.Rows(i - 1)("State") = State.Text
dtCurrentTable.Rows(i - 1)("FromDate") = FromDate.Text
dtCurrentTable.Rows(i - 1)("ToDate") = to1.Text
rowindex = rowindex + 1
Next
dtCurrentTable.Rows.Add(drCurrentRow)
ViewState("mytable") = dtCurrentTable
grdSchoolInfo.DataSource = dtCurrentTable
grdSchoolInfo.DataBind()
End If
End If
setpreviousSchoolData()
End Sub
Private Sub setpreviousData()
Dim rowIndex As Integer = 0
If ViewState("CurrentTable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
If dt.Rows.Count > 0 Then
For i As Integer = 0 To dt.Rows.Count - 1
Dim SchName As TextBox = DirectCast(grdFinancialAssistance.Rows(rowIndex).Cells(0).FindControl("txtFinancialAssistance"), TextBox)
Dim SchFall As TextBox = DirectCast(grdFinancialAssistance.Rows(rowIndex).Cells(1).FindControl("txtfall"), TextBox)
Dim schWinter As TextBox = DirectCast(grdFinancialAssistance.Rows(rowIndex).Cells(2).FindControl("txtWinter"), TextBox)
Dim SchSpring As TextBox = DirectCast(grdFinancialAssistance.Rows(rowIndex).Cells(3).FindControl("txtSpring"), TextBox)
Dim SchSummer As TextBox = DirectCast(grdFinancialAssistance.Rows(rowIndex).Cells(4).FindControl("txtSummer"), TextBox)
SchName.Text = dt.Rows(i)("Financial Aid_Scholaships").ToString()
SchFall.Text = dt.Rows(i)("Fall").ToString()
schWinter.Text = dt.Rows(i)("Winter").ToString()
SchSpring.Text = dt.Rows(i)("Spring").ToString()
SchSummer.Text = dt.Rows(i)("Summer").ToString()
rowIndex = rowIndex + 1
Next
End If
End If
End Sub
Private Sub setpreviousSchoolData()
Dim rowIndex As Integer = 0
If ViewState("mytable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("mytable"), DataTable)
If dt.Rows.Count > 0 Then
For i As Integer = 0 To dt.Rows.Count - 1
Dim SchoolName As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(0).FindControl("txtSchoolName"), TextBox)
Dim City As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(1).FindControl("txtSchoolCity"), TextBox)
Dim State As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(2).FindControl("txtSchState"), TextBox)
Dim To1 As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(3).FindControl("txtSchTo"), TextBox)
Dim from As TextBox = DirectCast(grdSchoolInfo.Rows(rowIndex).Cells(4).FindControl("txtSchFrom"), TextBox)
SchoolName.Text = dt.Rows(i)("Full_Name_of_School").ToString()
City.Text = dt.Rows(i)("City").ToString()
State.Text = dt.Rows(i)("State").ToString()
from.Text = dt.Rows(i)("FromDate").ToString()
To1.Text = dt.Rows(i)("ToDate").ToString()
rowIndex = rowIndex + 1
Next
End If
End If
End Sub
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim lb As LinkButton = DirectCast(sender, LinkButton)
Dim gvRow As GridViewRow = DirectCast(lb.NamingContainer, GridViewRow)
Dim rowID As Integer = gvRow.RowIndex + 1
If ViewState("CurrentTable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
If dt.Rows.Count > 1 Then
If gvRow.RowIndex < dt.Rows.Count - 1 Then
'Remove the Selected Row data
dt.Rows.Remove(dt.Rows(rowID))
End If
End If
'Store the current data in ViewState for future reference
ViewState("CurrentTable") = dt
'Re bind the GridView for the updated data
grdFinancialAssistance.DataSource = dt
grdFinancialAssistance.DataBind()
End If
'Set Previous Data on Postbacks
setpreviousData()
End Sub
Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim lb As LinkButton = DirectCast(sender, LinkButton)
Dim gvRow As GridViewRow = DirectCast(lb.NamingContainer, GridViewRow)
Dim rowID As Integer = gvRow.RowIndex + 1
If ViewState("mytable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("mytable"), DataTable)
If dt.Rows.Count > 1 Then
If gvRow.RowIndex < dt.Rows.Count - 1 Then
'Remove the Selected Row data
dt.Rows.Remove(dt.Rows(rowID))
End If
End If
'Store the current data in ViewState for future reference
ViewState("mytable") = dt
'Re bind the GridView for the updated data
grdSchoolInfo.DataSource = dt
grdSchoolInfo.DataBind()
End If
'Set Previous Data on Postbacks
setpreviousSchoolData()
End Sub
Protected Sub ButtonAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs)
addNewRowtoGrid()
End Sub
Protected Sub ButtonAddSchol_Click(ByVal sender As Object, ByVal e As System.EventArgs)
addNewRowtoSchoolGrid()
End Sub
Protected Sub grdSchoolInfo_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdSchoolInfo.RowDataBound
End Sub
Protected Sub drpSchoolInfo_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles drpSchoolInfo.SelectedIndexChanged
If drpSchoolInfo.SelectedItem.Text = "Yes" Then
RowSchoolInfo.Visible = True
Else
RowSchoolInfo.Visible = False
End If
End Sub
Protected Sub SchoolCheck(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim txtSchool As TextBox = TryCast(sender, TextBox)
Dim row As GridViewRow = TryCast(DirectCast(sender, TextBox).Parent.Parent, GridViewRow)
Dim txtcity, txtstate As TextBox
txtcity = row.Cells(1).FindControl("txtSchoolCity")
txtstate = row.Cells(1).FindControl("txtSchState")
Using cn As New SqlConnection(ConfigurationManager.ConnectionStrings("MyaidConn").ToString())
cn.Open()
Dim cmd As New SqlCommand(ASP.DataformControl.CheckSchoolData(txtSchool.Text), cn)
Dim rdr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
rdr.Read()
If rdr.HasRows Then
txtcity.Text = rdr(0).ToString
txtstate.Text = rdr(1).ToString
End If
cn.Close()
End Using
End Sub
Protected Sub validateData()
End Sub
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
If Len(Trim(txtAddress.Text)) > 30 Then
UserMsgBox(Me, "Address lengh is more than 30 characters")
txtAddress.Focus()
Exit Sub
End If
Dim MSGForCounselor, InsertMessage As String
'validateData()
Dim i As Integer
If Trim(txtAddress.Text) = "" Then
UserMsgBox(Me, "Address can not be blank")
txtAddress.Focus()
Exit Sub
End If
If Trim(txtCity.Text) = "" Then
UserMsgBox(Me, "City can not be blank")
txtCity.Focus()
Exit Sub
End If
'If Trim(txtState.Text) = "" Then
'UserMsgBox(Me, "State can not be blank")
'txtState.Focus()
'' Exit Sub
'End If
If Trim(txtZip.Text) = "" Then
UserMsgBox(Me, "Enter Zip code")
txtZip.Focus()
Exit Sub
End If
If Integer.TryParse(txtZip.Text, i) Then
Else
UserMsgBox(Me, "Please enter valid Zip code")
txtZip.Focus()
Exit Sub
End If
If Trim(txtPhone.Text) = "" Then
UserMsgBox(Me, "Primary Phone can not be blank")
txtPhone.Focus()
Exit Sub
End If
If RdbBegFreshman.SelectedValue = "" Then
UserMsgBox(Me, "If you are beginning freshman, please select Yes")
RdbBegFreshman.Focus()
Exit Sub
End If
If RdbBegFreshman.SelectedValue.ToString = "Y" And Trim(txtGPA.Text) = "" Then
UserMsgBox(Me, "You must enter your high school gpa if you are a beginning freshman.")
txtGPA.Focus()
Exit Sub
End If
If drpGradQuarter.Text = "" Then
UserMsgBox(Me, "Select approximate quarter you plan to graduate in")
drpGradQuarter.Focus()
Exit Sub
End If
If Trim(drpGradYear.Text) = "" Then
UserMsgBox(Me, "Select approximate year you plan to graduate in")
drpGradYear.Focus()
Exit Sub
End If
' If drpFallHours.SelectedValue = "0" And (drpWinterHours.Visible = False And drpSpringHours.Visible = False And drpSummerHours.Visible = False) Then
'' UserMsgBox(Me, "You can not get aid if you are not taking any hours. Please change number of hours if attending.")
' drpFallHours.Focus()
' Exit Sub
'End If
' If drpWinterHours.Visible = True And drpWinterHours.SelectedValue = "0" And drpFallHours.SelectedValue = "0" Then
'UserMsgBox(Me, "You can not get aid if you are not taking any hours for the winter quarter. Please change number of hours if attending.")
' drpFallHours.Focus()
' Exit Sub
' End If
' If drpSpringHours.Visible = True And drpSpringHours.SelectedValue = "0" And drpFallHours.SelectedValue = "0" And drpWinterHours.SelectedValue = "0" Then
' UserMsgBox(Me, "You can not get aid if you are not taking any hours for the spring quarter. Please change number of hours if attending.")
'drpFallHours.Focus()
' Exit Sub
' End If
If drpSummerHours.Visible = True And drpSummerHours.SelectedValue = "0" And drpSpringHours.SelectedValue = "0" And drpFallHours.SelectedValue = "0" And drpWinterHours.SelectedValue = "0" Then
UserMsgBox(Me, "You can not get aid if you are not taking any hours for the summer quarter. Please change number of hours if attending.")
drpFallHours.Focus()
Exit Sub
End If
If drpHousing.SelectedValue = "" Then
UserMsgBox(Me, "Housing Plans can not be blank")
drpHousing.Focus()
Exit Sub
End If
If (drpHousing.SelectedValue = "2" Or drpHousing.SelectedValue = "3") And txtHousingZip.Text = "" Then
UserMsgBox(Me, "As you don't live on campus, select your housing zip code")
txtHousingZip.Focus()
Exit Sub
End If
If chkInMilitary.Checked = True And MilBranch.Visible = True And drpMilBranch.SelectedItem.Value = "" Then
UserMsgBox(Me, "As you are in military, please select your branch of service")
drpMilBranch.Focus()
Exit Sub
End If
If chkPayFirst.Checked = False Or chkSAP.Checked = False Or chkReadSAP.Checked = False Or chkVerifyInfo.Checked = False Then
UserMsgBox(Me, "You must accept all Acknowledgements before submitting this form online.")
chkVerifyInfo.Focus()
Exit Sub
End If
If Trim(txtESIGN.Text) = "" Then
UserMsgBox(Me, "ESIGN Number can not be blank")
txtESIGN.Focus()
Exit Sub
End If
If drpFinancialAssistance.SelectedItem.Text = "" Then
UserMsgBox(Me, "Will you be receiving additional financial assistance? Please select appropriate option")
drpFinancialAssistance.Focus()
Exit Sub
End If
If drpSchoolInfo.SelectedItem.Text = "" Then
UserMsgBox(Me, "Please select appropriate option for educational history.")
drpSchoolInfo.Focus()
Exit Sub
End If
If drpSchoolInfo.SelectedItem.Text = "Yes" Then
For Each r As GridViewRow In grdSchoolInfo.Rows
Dim SchoolName As TextBox = DirectCast(r.Cells(0).FindControl("txtSchoolName"), TextBox)
Dim City As TextBox = DirectCast(r.Cells(1).FindControl("txtSchoolCity"), TextBox)
Dim State As TextBox = DirectCast(r.Cells(2).FindControl("txtSchState"), TextBox)
Dim To1 As TextBox = DirectCast(r.Cells(3).FindControl("txtSchTo"), TextBox)
Dim from As TextBox = DirectCast(r.Cells(4).FindControl("txtSchFrom"), TextBox)
If Trim(SchoolName.Text) = "" Or Trim(City.Text) = "" Or Trim(State.Text) = "" Then 'Or To1.Text = "" Or from.Text = ""
UserMsgBox(Me, "Please provide complete school information")
Exit Sub
End If
' Dim dtTo, dtFrom As String()
'If To1.Text <> "" And from.Text <> "" Then
' dtTo = To1.Text.Split("/")
' dtFrom = from.Text.Split("/")
' If dtFrom(1) <= dtTo(1) Then
' If dtTo(0) < dtFrom(0) Then
' UserMsgBox(Me, "From Date can not be greater than TO Date")
'Exit Sub
' End If
' ElseIf dtFrom(1) > dtTo(1) Then
'UserMsgBox(Me, "From Date can not be greater than TO Date")
' Exit Sub
' End If
' End If
Next
End If
If drpFinancialAssistance.SelectedItem.Text = "Yes" Then
For Each row As GridViewRow In grdFinancialAssistance.Rows
Dim SchName As TextBox = DirectCast(row.Cells(0).FindControl("txtFinancialAssistance"), TextBox)
Dim SchFall As TextBox = DirectCast(row.Cells(1).FindControl("txtfall"), TextBox)
Dim schWinter As TextBox = DirectCast(row.Cells(2).FindControl("txtWinter"), TextBox)
Dim SchSpring As TextBox = DirectCast(row.Cells(3).FindControl("txtSpring"), TextBox)
Dim SchSummer As TextBox = DirectCast(row.Cells(4).FindControl("txtSummer"), TextBox)
If Trim(SchName.Text) = "" Or Len(SchName.Text) = 0 Then
UserMsgBox(Me, "You indicated that you have Financial Assistance. You must enter in the financial assistance you are expecting.")
Exit Sub
End If
' If Trim(SchFall.Text) = "" Or Trim(schWinter.Text) = "" Or Trim(SchSpring.Text) = "" Or Trim(SchSummer.Text) = "" Then
'UserMsgBox(Me, "You listed aid or scholarship, but you did not fill in amounts. Please re-enter")
'Exit Sub
' End If
Next
End If
If ASP.UsrCntrl.check_ESIGN(Session("StrSAYT"), txtESIGN.Text) = False Then
UserMsgBox(Me, "Please enter valid ESIGN Number!")
txtESIGN.Focus()
Exit Sub
End If
MSGForCounselor = ""
Dim strBegFreshman, strMilitary, strAviation, strChildcare, strFinancialAssistance, strEducation, strPayFeeFirst, strSAPRequire, strReadSAP, strCertifyInfo, strTA As Boolean
Dim strhsGPA, strStudType, strGradQuarter, strgradYear, fallHours, SpringHours, WinterHours, SummerHours, strHousingPlan, strHousingZip, strESIGN, strMilBranch, strTOPS, strULSEmp, strOver55, strOutofState, strNG, strROTC As String
strAddress = UCase(txtAddress.Text)
strAddress = strAddress.Replace("'", "''")
strStreet2 = UCase(txtStreet2.Text)
strStreet2 = strStreet2.Replace("'", "''")
strCity = UCase(txtCity.Text)
strState = UCase(drpState.SelectedItem.Value)
strZip = txtZip.Text
If Len(Trim(txtPhone.Text)) = 12 Then
strPhone = Replace(txtPhone.Text, "-", "")
Else
strPhone = ""
End If
If Len(Trim(txtCellPhone.Text)) = 12 Then
strCellPhone = Replace(txtCellPhone.Text, "-", "")
Else
strCellPhone = ""
End If
strEmail = Trim(txtEmail.Text)
strWebmail = txtWebmail.Text
If RdbBegFreshman.SelectedValue.ToString = "Y" Then
strBegFreshman = True
strhsGPA = txtGPA.Text
Else
strBegFreshman = False
strhsGPA = ""
End If
strStudType = drpStudentType.SelectedItem.Value
strGradQuarter = drpGradQuarter.SelectedItem.Value
strgradYear = drpGradYear.SelectedItem.Value
fallHours = drpFallHours.SelectedItem.Value
WinterHours = drpWinterHours.SelectedItem.Value
SpringHours = drpSpringHours.SelectedItem.Value
SummerHours = drpSummerHours.SelectedItem.Value
strHousingPlan = drpHousing.SelectedItem.Value
If strHousingPlan = "1" Then
strHousingZip = ""
Else
strHousingZip = Trim(txtHousingZip.Text)
End If
If chkTOPS.Checked = True Then
strTOPS = "TOPS"
Else
strTOPS = ""
End If
If chkULSEmployee.Checked = True Then
strULSEmp = "ULS"
Else
strULSEmp = ""
End If
If chkOver55.Checked = True Then
strOver55 = "55YR"
Else
strOver55 = ""
End If
If chkOutofState.Checked = True Then
strOutofState = "OUT"
Else
strOutofState = ""
End If
If chkNG.Checked = True Then
strNG = "NG"
Else
strNG = ""
End If
If chkROTC.Checked = True Then
strROTC = "ROTC"
Else
strROTC = ""
End If
If chkMilitary.Checked = True Then
strMilitary = True
Else
strMilitary = False
End If
If chkAviation.Checked = True Then
strAviation = True
Else
strAviation = False
End If
If chkChildcare.Checked = True Then
strChildcare = True
Else
strChildcare = False
End If
If drpFinancialAssistance.SelectedItem.Text = "Yes" Then
strFinancialAssistance = True
Else
strFinancialAssistance = False
End If
If drpSchoolInfo.SelectedItem.Text = "Yes" Then
strEducation = True
Else
strEducation = False
End If
If chkPayFirst.Checked = True Then
strPayFeeFirst = True
Else
UserMsgBox(Me, "You must accept all Acknowledgements before submitting this form online.")
Exit Sub
End If
If chkSAP.Checked = True Then
strSAPRequire = True
Else
UserMsgBox(Me, "You must accept all Acknowledgements before submitting this form online.")
Exit Sub
End If
If chkReadSAP.Checked = True Then
strReadSAP = True
Else
UserMsgBox(Me, "You must accept all Acknowledgements before submitting this form online.")
Exit Sub
End If
If chkVerifyInfo.Checked = True Then
strCertifyInfo = True
Else
UserMsgBox(Me, "You must accept all Acknowledgements before submitting this form online.")
Exit Sub
End If
If ASP.UsrCntrl.check_ESIGN(Session("StrSAYT"), txtESIGN.Text) = False Then
UserMsgBox(Me, "Please enter valid ESIGN Number!")
txtESIGN.Focus()
Exit Sub
Else
strESIGN = txtESIGN.Text
End If
Dim arc As Boolean
Dim emilID As String
If New2013.Visible = True Then
If chkTA.Checked = True Then
strTA = True
Else
strTA = False
End If
If chkInMilitary.Checked = True Then
strMilBranch = drpMilBranch.SelectedItem.Value
Else
strMilBranch = ""
End If
Else
strTA = False
strMilBranch = ""
End If
' Check if data exists in Dataform Table for the same year
If ASP.DataformControl.CheckDataformEntry(Session("Award_Year"), Session("SSN")) = True Then
arc = ASP.DataformControl.ArchieveData(Session("Award_Year"), Session("SSN"))
End If
If Len(StrLName) > 16 Then
StrLName = ""
End If
If Len(strFName) > 11 Then
strFName = ""
End If
If ASP.DataformControl.insertData(Session("SSN"), Session("Award_Year"), StrLName, strFName, strAddress, strStreet2, strCity, strState, strZip, strPhone, strCellPhone, strEmail, strWebmail, strBegFreshman, _
strhsGPA, strStudType, strGradQuarter, strgradYear, fallHours, WinterHours, SpringHours, SummerHours, strHousingPlan, strHousingZip, strMilitary, strChildcare, strAviation, strFinancialAssistance, _
strEducation, strPayFeeFirst, strSAPRequire, strReadSAP, strCertifyInfo, strESIGN, strTA, strMilBranch, strTOPS, strULSEmp, strOver55, strOutofState, strNG, strROTC) = True Then
For Each row As GridViewRow In grdFinancialAssistance.Rows
Dim SchName As TextBox = DirectCast(row.Cells(0).FindControl("txtFinancialAssistance"), TextBox)
Dim SchFall As TextBox = DirectCast(row.Cells(1).FindControl("txtfall"), TextBox)
Dim schWinter As TextBox = DirectCast(row.Cells(2).FindControl("txtWinter"), TextBox)
Dim SchSpring As TextBox = DirectCast(row.Cells(3).FindControl("txtSpring"), TextBox)
Dim SchSummer As TextBox = DirectCast(row.Cells(4).FindControl("txtSummer"), TextBox)
ASP.DataformControl.insertFinAssist(Session("SSN"), Session("Award_Year"), SchName.Text, SchFall.Text, schWinter.Text, SchSpring.Text, SchSummer.Text, row.RowIndex + 1)
Next
For Each r As GridViewRow In grdSchoolInfo.Rows
Dim SchoolName As TextBox = DirectCast(r.Cells(0).FindControl("txtSchoolName"), TextBox)
Dim City As TextBox = DirectCast(r.Cells(1).FindControl("txtSchoolCity"), TextBox)
Dim State As TextBox = DirectCast(r.Cells(2).FindControl("txtSchState"), TextBox)
Dim To1 As TextBox = DirectCast(r.Cells(3).FindControl("txtSchTo"), TextBox)
Dim from As TextBox = DirectCast(r.Cells(4).FindControl("txtSchFrom"), TextBox)
InsertMessage = ASP.DataformControl.insertInstitute(Session("strStudToken"), Session("SSN"), Session("Award_Year"), SchoolName.Text, City.Text, State.Text, from.Text, To1.Text, r.RowIndex + 1)
If InsertMessage <> "NOMESSAGE" Then
MSGForCounselor = InsertMessage
End If
Next
emilID = ""
'If MSGForCounselor <> "NOMESSAGE" Then
'ASP.UsrCntrl.sendAwardletterConfirmation("falguni@latech.edu", "MessageforCounselor")
' End If
If strWebmail <> "" And strBegFreshman = False Then
emilID = strWebmail
Else
emilID = strEmail
End If
If ASP.UsrCntrl.updateDocStatus(Session("StrSAYT"), Session("Award_Year"), "TECHDATA") = True Then
ASP.UsrCntrl.sendAwardletterConfirmation(emilID, "confirmDataform")
UserMsgBox(Me, "Your Dataform has been submitted. Confirmation email was sent to " & emilID)
Response.AddHeader("REFRESH", "02;URL=Default.aspx")
End If
Else
UserMsgBox(Me, "Error occured, please wait 15-20 minutes and try again. If error continues to occur, contact Financial Aid office.")
Exit Sub
End If
Catch ex As Exception
UserMsgBox(Me, "Error occured, If are using special characters (i.e. #,$,% &, etc.) please remove them and try again. Verify information has been entered correctly.")
End Try
End Sub
Private Sub fil_DrpState()
Dim ds As New System.Data.DataSet
ds.ReadXml(server.mappath("/state_list.xml"))
drpState.DataSource = ds.Tables(0)
drpState.DataTextField = "name"
drpState.DataValueField = "abbreviation"
drpState.DataBind()
strZip = txtZip.Text
End Sub
Protected Sub drpGradYear_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles drpGradYear.SelectedIndexChanged
Dim ayear As String
ayear = Session("Award_Year")
If drpGradYear.SelectedItem.Value <> "" Then
If drpGradYear.SelectedItem.Value - ayear = 0 Then
If drpGradQuarter.SelectedItem.Value = "Fall" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = False
drpWinterHours.Visible = False
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value <> "Fall" Then
lblfallHours.Visible = False
drpFallHours.Visible = False
lblWntrHours.Visible = False
drpWinterHours.Visible = False
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
UGNote.Visible = False
UserMsgBox(Me, "You can no longer submit this form for that Award Year")
Exit Sub
End If
ElseIf drpGradYear.SelectedItem.Value - ayear = 1 Then
If drpGradQuarter.SelectedItem.Value = "Winter" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value = "Spring" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value = "Summer" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
Else
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
End If
Else
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
End If
End If
End Sub
Protected Sub drpGradQuarter_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles drpGradQuarter.SelectedIndexChanged
Dim ayear As String
ayear = Session("Award_Year")
If drpGradYear.SelectedItem.Value <> "" Then
If drpGradYear.SelectedItem.Value - ayear = 0 Then
If drpGradQuarter.SelectedItem.Value = "Fall" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = False
drpWinterHours.Visible = False
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value <> "Fall" Then
lblfallHours.Visible = False
drpFallHours.Visible = False
lblWntrHours.Visible = False
drpWinterHours.Visible = False
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
UGNote.Visible = False
UserMsgBox(Me, "You can no longer submit this form for that Award Year")
Exit Sub
End If
ElseIf drpGradYear.SelectedItem.Value - ayear = 1 Then
If drpGradQuarter.SelectedItem.Value = "Winter" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = False
drpSpringHours.Visible = False
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value = "Spring" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = False
drpSummerHours.Visible = False
If drpStudentType.Text = "Undergraduate" Then
UGNote.Visible = True
Else
UGNote.Visible = False
End If
ElseIf drpGradQuarter.SelectedItem.Value = "Summer" Then
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
Else
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
End If
Else
lblfallHours.Visible = True
drpFallHours.Visible = True
lblWntrHours.Visible = True
drpWinterHours.Visible = True
lblSpringHours.Visible = True
drpSpringHours.Visible = True
lblSummerHours.Visible = True
drpSummerHours.Visible = True
UGNote.Visible = False
End If
End If
End Sub
Protected Sub chkInMilitary_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkInMilitary.CheckedChanged
If chkInMilitary.Checked = True Then
MilBranch.Visible = True
Else
MilBranch.Visible = False
End If
End Sub
End Class