function Print_RefCodeByAgencyID(agencyid,org_agency_id,branchid,PrintTypeID)
dim TableField
if agencyid = "2651" then
print_ex_url="https://" & domainname & "/eServices/Secure/eBond/Print_RefCodes.asp?PrintTypeID=2"
set Cmd_PrintBondMarket_RefNo=Server.CreateObject("ADODB.Command")
with Cmd_PrintBondMarket_RefNo
.ActiveConnection = dbsecurecon
.CommandText = "up_GetWebCustomziedRpt_agent"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter ("@agencyID" ,adVarChar,adParamInput,10,agencyid)
.Parameters.Append .CreateParameter ("@ReportTypeID" ,adinteger,adParamInput,,1)
.Parameters.Append .CreateParameter ("@ReportBegDate",adDate,adParamInput,,"01/01/2010")
.Parameters.Append .CreateParameter ("@ReportToDate" ,adDate,adParamInput,,"01/30/2010")
.Execute()
end with
ipagesize=10
if request.form("cmdbondnavbutton")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.form("cmdbondnavbutton"))
end if
set Rs_PrintBondMarket_RefNo=Server.CreateObject("Adodb.RecordSet")
Rs_PrintBondMarket_RefNo.PageSize=ipagesize
Rs_PrintBondMarket_RefNo.CursorLocation=aduseClient
Rs_PrintBondMarket_RefNo.CacheSize=ipagesize
Rs_PrintBondMarket_RefNo.Open Cmd_PrintBondMarket_RefNo
ipagecount = Rs_PrintBondMarket_RefNo.pagecount
if ipagecurrent > ipagecount then
ipagecurrent = ipagecount
end if
if ipagecurrent < 1 then
ipagecurrent = 1
end if
if ipagecount = 0 then
p="<html>"
p=p & "<body>"
p=p & "<table><tr><td>No Transaction</td></tr></table>"
p=p & "</body>"
p=p & "</html>"
else
Rs_PrintBondMarket_RefNo.AbsolutePage=ipagecurrent
'/////////////////////////////////////////////////
p = "<html>"
'p = p & "<head><LINK rel=""stylesheet"" type=""text/css"" href=""/eservices/globalstyle.css""></head>"
p = p & "<body><table cellpadding=""5"" cellspacing=""2"">"
p = p & "<tr valign=""bottom""><td colspan=""5""><b>Marketing Reference Report</b><br>Submitted Date: " & date() & " (CST)<br>"
if PrintTypeID = "1" then
p = p & "<a href=javascript:print()><font color=""blue"">Print in html</font></a>"
p = p & " | "
p = p & "<a href=" & print_ex_url & "><font color=""blue"">Print in Excel</font></a>"
p = p & " | "
p = p & "<a href=javascript:close()><font color=""blue"">Close this page</font></a>"
end if
p = p & "</td>"
p = p & "</tr>"
p = p & "<tr valign=""bottom"">"
p = p & "<td><b><font size=""2"">Bond No.</font></b></td>"
p = p & "<td><b><font size=""2"">Marketing Ref. Code</font></b></td>"
p = p & "<td><b><font size=""2"">Bond Type</font></b></td>"
p = p & "<td><b><font size=""2"">Principal Name</font></b></td>"
p = p & "<td><b><font size=""2"">Bond Term</font></b></td>"
p = p & "<td><b><font size=""2"">Bond Amt.</font></b></td>"
p = p & "<td><b><font size=""2"">GWP</font></b></td>"
p = p & "<td><b><font size=""2"">Other Amount</font></b></td>"
p = p & "<td><b><font size=""2"">Agency Code</font></b></td>"
p = p & "<td><b><font size=""2"">CSI Payment Type</font></b></td>"
p = p & "<td><b><font size=""2"">Payment Number</font></b></td>"
p = p & "</tr>"
p = p & "<tr><td colspan=""1""><br></td></tr>"
iRecordShown=0
For Each TableField in Rs_PrintBondMarket_RefNo.Fields
p=p & "<tr>"
p=p & "<td>" & Rs_PrintBondMarket_RefNo.GetString(2,iPageSize) & "</td>"
p=p & "</tr>"
Next
'if agentnote <> "" then
'p=p & "<tr valign=""top""><td colspan=""11"">Note: " & agentnote & "</td></tr>"
'end if
end if
'/////////////////////////////////////////////////
p=p & "<tr><td colspan=""11"">"
p=p & "<hr size=""1"" color=""silver"">"
navurl="print_refcodes.asp"
p=p & "<form method=""post"" name=""frmbondnav"" action=" & navurl & ">"
for i = 1 to ipagecount
if i = ipagecurrent then
p=p & "<font size=""3""><b>" & i & "</b></font>" & " "
else
if i = request.form("page") then
fontsize="4"
color1="blue"
else
fontsize="1"
color1="black"
end if
p=p & "<input class=""nav_query_button"" type=""submit"" name=""cmdbondnavbutton"" value= " & i & "> "
end if
next
p=p & "<hr size=""1"" color=""silver""></td></tr>"
p=p & "</table></body></html>"
Rs_PrintBondMarket_RefNo.close
set Rs_PrintBondMarket_RefNo = Nothing
set Cmd_PrintBondMarket_RefNo = Nothing
else
p="<table><tr><td>You are not authorized to view this page. Please contact us if you have any question.</td></tr>"
p=p & "<tr><td><a href=javascript:close()>Close</a></td></tr></table>"
end if
Print_RefCodeByAgencyID=p
end function
|