%
' ***********************************************************
' **
' ** 633 04/25/07 add comaker employer information
' ** 591 03/24/07 remove ability to change client codes (invoice issues)
' ** 589 10/15/06 Ability for collectors to logon to web site
' 06/24/2006 allow only manager/admin to change assignment type
' **
' ***********************************************************
' ***** Initialize Query *****
Dim ConnStr
Dim Conn
Dim rs
Dim SQL
Dim CaseID
Dim ClientID
Dim AgentID
Dim StatusID
Dim AssignID
Dim AcctNbr
Dim Lname
Dim Fname
Dim Addr1
Dim Addr2
Dim City
Dim State
Dim Zip
Dim Hphone
Dim Wphone
Dim SSN
Dim BirthDate
Dim Year
Dim Make
Dim Model
Dim VIN
Dim Plate
Dim PlateState
Dim Color
Dim KeyIgn
Dim EmpName
Dim EmpAddr
Dim EmpCity
Dim EmpState
Dim CoEmpName
Dim CoEmpAddr
Dim CoEmpCity
Dim CoEmpState
Dim AmtDue
Dim DueDate
Dim PymtAmt
Dim Balance
Dim Lienholder
Dim Desc1Addr
Dim Desc2Addr
Dim SpecInstr
Dim Tstamp
Dim strAgentName
Dim ContactID
Dim CoLName
Dim CoFName
Dim CoAddr1
Dim CoAddr2
Dim CoCity
Dim CoState
Dim CoZip
Dim CoWphone
Dim A1Addr1
Dim A1Addr2
Dim A1City
Dim A1State
Dim A1Zip
Dim A2Addr1
Dim A2Addr2
Dim A2City
Dim A2State
Dim A2Zip
CaseID = Request.QueryString("CaseID")
CaseID = trim(CaseID)
' ***************************************
' Connect to Database
' ***************************************
connectdb
If Err.number <> 0 Then
strErrorMsg = strErrorMsg & "305. Error Unable to connect to database.
"
Err.Clear
End If
' ***************************************
' Select Case Information
' ***************************************
SQL = "SELECT C.CaseID, "
SQL = SQL & "C.Status, "
SQL = SQL & "C.AssignType, "
SQL = SQL & "C.Agent, "
SQL = SQL & "C.ContactID, "
SQL = SQL & "R1.Lname, "
SQL = SQL & "R1.Fname, "
SQL = SQL & "R1.Addr1, "
SQL = SQL & "R1.Addr2, "
SQL = SQL & "R1.City, "
SQL = SQL & "R1.State, "
SQL = SQL & "R1.Zip, "
SQL = SQL & "R1.Hphone, "
SQL = SQL & "R1.Wphone, "
SQL = SQL & "C.SSN, "
SQL = SQL & "C.Birthdate, "
SQL = SQL & "C.Year, "
SQL = SQL & "C.Make, "
SQL = SQL & "C.Model, "
SQL = SQL & "C.Plate, "
SQL = SQL & "C.PlateState, "
SQL = SQL & "C.Color, "
SQL = SQL & "C.ClientAcct, "
SQL = SQL & "C.VIN, "
SQL = SQL & "C.KeyIgn, "
SQL = SQL & "C.EmpName, "
SQL = SQL & "C.EmpAddr, "
SQL = SQL & "C.EmpCity, "
SQL = SQL & "C.EmpState, "
SQL = SQL & "C.CoEmpName, "
SQL = SQL & "C.CoEmpAddr, "
SQL = SQL & "C.CoEmpCity, "
SQL = SQL & "C.CoEmpState, "
SQL = SQL & "C.AmtDue, "
SQL = SQL & "C.DueDate, "
SQL = SQL & "C.PymtAmt, "
SQL = SQL & "C.Balance, "
SQL = SQL & "C.TStamp, "
SQL = SQL & "C.AssignDate, "
SQL = SQL & "C.SpecInstr, "
SQL = SQL & "C.Lienholder, "
SQL = SQL & "C.Desc1Addr, "
SQL = SQL & "C.Desc2Addr, "
SQL = SQL & "R1.MasterID as ClientID "
SQL = SQL & "FROM tCase C, Rdex R1 "
SQL = SQL & "Where CaseID = " & CaseID & " "
SQL = SQL & "AND C.CaseID = R1.ID "
' ***** Run Query *****
Set rs = Conn.Execute(SQL)
if Not rs.EOF then
StatusID = rs.fields("Status")
AssignID = rs.fields("AssignType")
AgentID= rs.fields("Agent")
ContactID= rs.fields("ContactID")
ClientID= rs.fields("ClientID")
AcctNbr= rs.fields("ClientAcct")
if isnull(rs.fields("Lname")) then
Lname = ""
else
Lname= rs.fields("Lname")
end if
if isnull(rs.fields("Fname")) then
Fname = ""
else
Fname= rs.fields("Fname")
end if
if isnull(rs.fields("Addr1")) then
addr1 = ""
else
Addr1= rs.fields("Addr1")
end if
if isnull(rs.fields("Addr2")) then
addr2 = ""
else
Addr2= rs.fields("Addr2")
end if
if isnull(rs.fields("City")) then
City = ""
else
City= rs.fields("City")
end if
if isnull(rs.fields("State")) then
State = ""
else
State= rs.fields("State")
end if
if isnull(rs.fields("Zip")) then
Zip = ""
else
Zip= rs.fields("Zip")
end if
if isnull(rs.fields("Hphone")) then
Hphone = ""
else
Hphone= rs.fields("Hphone")
end if
if isnull(rs.fields("Wphone")) then
Wphone = ""
else
Wphone= rs.fields("Wphone")
end if
if isnull(rs.fields("SSN")) then
SSN = " "
else
SSN= rs.fields("SSN")
end if
if isnull(rs.fields("BirthDate")) then
BirthDate = " "
else
BirthDate = rs.fields("BirthDate")
end if
if isnull(rs.fields("Year")) then
Year = ""
else
Year= rs.fields("Year")
end if
if isnull(rs.fields("Make")) then
Make = ""
else
Make= rs.fields("Make")
end if
if isnull(rs.fields("Model")) then
Model = ""
else
Model= rs.fields("Model")
end if
if isnull(rs.fields("Plate")) then
Plate = ""
else
Plate= rs.fields("Plate")
end if
if isnull(rs.fields("PlateState")) then
PlateState = ""
else
PlateState= rs.fields("PlateState")
end if
if isnull(rs.fields("Color")) then
Color = ""
else
Color= rs.fields("Color")
end if
if isnull(rs.fields("VIN")) then
VIN = ""
else
VIN= rs.fields("VIN")
end if
if isnull(rs.fields("KeyIgn")) then
KeyIgn = " "
else
KeyIgn = rs.fields("KeyIgn")
end if
if isnull(rs.fields("EmpName")) then
EmpName = " "
else
EmpName = rs.fields("EmpName")
end if
if isnull(rs.fields("EmpAddr")) then
EmpAddr = " "
else
EmpAddr = rs.fields("EmpAddr")
end if
if isnull(rs.fields("EmpCity")) then
EmpCity = " "
else
EmpCity = rs.fields("EmpCity")
end if
if isnull(rs.fields("EmpState")) then
EmpState = " "
else
EmpState = rs.fields("EmpState")
end if
if isnull(rs.fields("CoEmpName")) then
CoEmpName = " "
else
CoEmpName = rs.fields("CoEmpName")
end if
if isnull(rs.fields("CoEmpAddr")) then
CoEmpAddr = " "
else
CoEmpAddr = rs.fields("CoEmpAddr")
end if
if isnull(rs.fields("CoEmpCity")) then
CoEmpCity = " "
else
CoEmpCity = rs.fields("CoEmpCity")
end if
if isnull(rs.fields("CoEmpState")) then
CoEmpState = " "
else
CoEmpState = rs.fields("CoEmpState")
end if
if isnull(rs.fields("AmtDue")) then
AmtDue = " "
else
AmtDue = rs.fields("AmtDue")
end if
if isnull(rs.fields("DueDate")) then
DueDate = " "
else
DueDate = rs.fields("DueDate")
end if
if isnull(rs.fields("PymtAmt")) then
PymtAmt = " "
else
PymtAmt = rs.fields("PymtAmt")
end if
if isnull(rs.fields("Balance")) then
Balance = " "
else
Balance = rs.fields("Balance")
end if
if isnull(rs.fields("Lienholder")) then
Lienholder = " "
else
Lienholder = rs.fields("Lienholder")
end if
if isnull(rs.fields("Desc1Addr")) then
Desc1Addr = " "
else
Desc1Addr = rs.fields("Desc1Addr")
end if
if isnull(rs.fields("Desc2Addr")) then
Desc2Addr = " "
else
Desc2Addr = rs.fields("Desc2Addr")
end if
SpecInstr = rs.fields("SpecInstr")
if len(SpecInstr) = 0 then
SpecInstr = " "
end if
if isnull(rs.fields("Tstamp")) then
Tstamp = ""
else
Tstamp= rs.fields("Tstamp")
end if
AssignDate = rs.fields("AssignDate")
end if
rs.close
set rs = nothing
' ***************************************
' Select Comaker Information
' ***************************************
SQL = "SELECT "
SQL = SQL & "Lname, "
SQL = SQL & "Fname, "
SQL = SQL & "Addr1, "
SQL = SQL & "Addr2, "
SQL = SQL & "City, "
SQL = SQL & "State, "
SQL = SQL & "Zip, "
SQL = SQL & "Wphone "
SQL = SQL & "FROM Rdex "
SQL = SQL & "Where MasterID = " & CaseID & " "
SQL = SQL & "AND Type = '5' "
' ***** Run Query *****
Set rs = Conn.Execute(SQL)
If Err.number <> 0 Then
strErrorMsg = strErrorMsg & "Error: Unable to read comaker information.
"
Err.Clear
End If
if Not rs.EOF then
if isnull(rs.fields("Lname")) then
CoLname = " "
else
CoLname= rs.fields("Lname")
end if
if isnull(rs.fields("Fname")) then
CoFname = " "
else
CoFname= rs.fields("Fname")
end if
if isnull(rs.fields("Addr1")) then
CoAddr1 = " "
else
CoAddr1= rs.fields("Addr1")
end if
if isnull(rs.fields("Addr2")) then
CoAddr2 = " "
else
CoAddr2 = rs.fields("Addr2")
end if
if isnull(rs.fields("City")) then
CoCity = " "
else
CoCity = rs.fields("City")
end if
if isnull(rs.fields("State")) then
CoState = " "
else
CoState = rs.fields("State")
end if
if isnull(rs.fields("Zip")) then
CoZip = " "
else
CoZip = rs.fields("Zip")
end if
if isnull(rs.fields("Wphone")) then
CoWphone = " "
else
CoWphone = rs.fields("Wphone")
end if
end if
rs.close
set rs = nothing
' ***************************************
' Select Address 1 Information
' ***************************************
SQL = "SELECT "
SQL = SQL & "Addr1, "
SQL = SQL & "Addr2, "
SQL = SQL & "City, "
SQL = SQL & "State, "
SQL = SQL & "Zip "
SQL = SQL & "FROM Rdex "
SQL = SQL & "Where MasterID = " & CaseID & " "
SQL = SQL & "AND Type = '6' "
' ***** Run Query *****
Set rs = Conn.Execute(SQL)
If Err.number <> 0 Then
strErrorMsg = strErrorMsg & "Error: Unable to read Address 1 information.
"
Err.Clear
End If
if Not rs.EOF then
if isnull(rs.fields("Addr1")) then
A1Addr1 = " "
else
A1Addr1= rs.fields("Addr1")
end if
if isnull(rs.fields("Addr2")) then
A1Addr2 = " "
else
A1Addr2 = rs.fields("Addr2")
end if
if isnull(rs.fields("City")) then
A1City = " "
else
A1City = rs.fields("City")
end if
if isnull(rs.fields("State")) then
A1State = " "
else
A1State = rs.fields("State")
end if
if isnull(rs.fields("Zip")) then
A1Zip = " "
else
A1Zip = rs.fields("Zip")
end if
end if
rs.close
set rs = nothing
' ***************************************
' Select Address 2 Information
' ***************************************
SQL = "SELECT "
SQL = SQL & "Addr1, "
SQL = SQL & "Addr2, "
SQL = SQL & "City, "
SQL = SQL & "State, "
SQL = SQL & "Zip "
SQL = SQL & "FROM Rdex "
SQL = SQL & "Where MasterID = " & CaseID & " "
SQL = SQL & "AND Type = '7' "
' ***** Run Query *****
Set rs = Conn.Execute(SQL)
If Err.number <> 0 Then
strErrorMsg = strErrorMsg & "Error: Unable to read Address 2 information.
"
Err.Clear
End If
if Not rs.EOF then
if isnull(rs.fields("Addr1")) then
A2Addr1 = " "
else
A2Addr1= rs.fields("Addr1")
end if
if isnull(rs.fields("Addr2")) then
A2Addr2 = " "
else
A2Addr2 = rs.fields("Addr2")
end if
if isnull(rs.fields("City")) then
A2City = " "
else
A2City = rs.fields("City")
end if
if isnull(rs.fields("State")) then
A2State = " "
else
A2State = rs.fields("State")
end if
if isnull(rs.fields("Zip")) then
A2Zip = " "
else
A2Zip = rs.fields("Zip")
end if
end if
rs.close
set rs = nothing
' *****************************************************************************
' Begin HTML
' *****************************************************************************
%>