adam2804
Posts: 34 Joined: 6/6/2006 Status: offline
|
RE: include leading zero in update query - 6/21/2006 10:26:32
Sorry, I didn't get any code come up before the page was loaded, here's the full code for the page:
<!--#include file="../../groupsecurity.inc"-->
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Modify Price Customer</title>
<meta name="Microsoft Theme" content="khaosintranet 1010, default">
<meta name="Microsoft Border" content="tlb, default">
</head>
<%
Testing = 0
NTLogin = Request.ServerVariables("AUTH_USER")
Access = 0
URL = Split(Request.ServerVariables("URL"), "/")
Page = URL(UBound(URL))
set cn=server.CreateObject("ADODB.Connection")
cn.Open "DSN=BureauManagerSQL", "FrontPage", "s0lution"
set rs=server.CreateObject("ADODB.Recordset")
%>
<body topmargin="0" leftmargin="0">
<p><b>
<!--webbot bot="Navigation" S-Orientation="horizontal" S-Rendering="html" S-Bar="Slashes" S-Btn-Nml="<A HREF="#URL#" TARGET="#TARGET#" STYLE="{text-decoration: none;}">#LABEL#</A>" S-Btn-Sel="#LABEL#" S-Btn-Sep=" / " S-Type="parent" B-Include-Home="FALSE" B-Include-Up="FALSE" -->
</b></p>
<% If AccessAllowed=0 Then %>
<p> <font color="#FF0000"> <b>!! You do not have access to this page: <%= Page %> !!</b></font></p>
<% Else %>
<% If Request("Action") = "Delete1" Then %>
<!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="BureauManagerSQL" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="DELETE TB_MasterPrices<br>WHERE<br> ID = '::ID::' AND<br> WorkType = '::WorkType::'" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="ID=&WorkType=" s-norecordsfound="Pricing details deleted." i-maxrecords="256" i-groupsize="0" botid="14" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" startspan b-WasTableFormat="FALSE" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="DELETE TB_MasterPrices WHERE ID = '::ID::' AND WorkType = '::WorkType::'"
fp_sDefault="ID=&WorkType="
fp_sNoRecords="Pricing details deleted."
fp_sDataConn="BureauManagerSQL"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=14
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="45936" --><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
<%
If Request("Auto") = 1 Then
strSQL = "DELETE TB_MasterPrices "
strSQL = strSQL & " WHERE WorkType = '" & Request("WorkType") & "'"
strSQL = strSQL & " AND ID IN (SELECT JobNumber FROM Jobs WHERE CustomerID = '" & Request("ID") & "' AND ISNULL(Delivered, 0) = 0)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
strSQL = "DELETE TB_MasterPrices "
strSQL = strSQL & " WHERE WorkType = '" & Request("WorkType") & "'"
strSQL = strSQL & " AND ID IN (SELECT RegularJobNumber FROM RegularJobs WHERE CustomerID = '" & Request("ID") & "' AND Active = 1)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
End If
%>
<%
If Request("Return") <> "" And Testing=0 Then
ReturnArray = Split(Request("Return"), "?")
For i = 1 to UBound(ReturnArray )
Return = Return & ReturnArray(i)
If i = 1 Then
Return = Return & "?"
Else
Return = Return & "&"
End If
Next
Response.Redirect Return
End If
%>
<% ElseIf Request("Action") = "Update" Then %>
<!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="BureauManagerSQL" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE TB_MasterPrices SET<br> Unit = ::Unit::,<br> Price = ::Price::,<br> Billing_ID = ::Billing_ID::<br>WHERE<br> ID = '::ID::' AND<br> WorkType = '::WorkType::'" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="Unit=&Price=&Billing_ID=&ID=&WorkType=" s-norecordsfound="Pricing details updated." i-maxrecords="256" i-groupsize="0" botid="15" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" startspan b-WasTableFormat="FALSE" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE TB_MasterPrices SET Unit = ::Unit::, Price = ::Price::, Billing_ID = ::Billing_ID:: WHERE ID = '::ID::' AND WorkType = '::WorkType::'"
fp_sDefault="Unit=&Price=&Billing_ID=&ID=&WorkType="
fp_sNoRecords="Pricing details updated."
fp_sDataConn="BureauManagerSQL"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=15
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="14475" -->
<%Response.write(fp_sQry)
Response.end%>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
<%
If Request("AutoRegular") = 1 Then
strSQL = "UPDATE TB_MasterPrices SET"
strSQL = strSQL & " Unit = " & Request("Unit")
strSQL = strSQL & ", Price = " & Request("Price")
strSQL = strSQL & ", Billing_ID = " & Request("Billing_ID")
strSQL = strSQL & " WHERE WorkType = '" & Request("WorkType") & "'"
strSQL = strSQL & " AND ID IN (SELECT JobNumber FROM Jobs WHERE CustomerID = '" & Request("ID") & "' AND ISNULL(Delivered, 0) = 0 AND RegularJobNo IS NOT NULL)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
strSQL = "UPDATE TB_MasterPrices SET"
strSQL = strSQL & " Unit = " & Request("Unit")
strSQL = strSQL & ", Price = " & Request("Price")
strSQL = strSQL & ", Billing_ID = " & Request("Billing_ID")
strSQL = strSQL & " WHERE WorkType = '" & Request("WorkType") & "'"
strSQL = strSQL & " AND ID IN (SELECT RegularJobNumber FROM RegularJobs WHERE CustomerID = '" & Request("ID") & "' AND Active = 1)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
strSQL = "INSERT INTO TB_MasterPrices (ID, WorkType, Unit, Price, Billing_ID, PriceType_ID)"
strSQL = strSQL & " SELECT JobNumber, '" & Request("WorkType") & "', " & Request("Unit") & ", " & Request("Price") & ", " & Request("Billing_ID") & ", 2"
strSQL = strSQL & " FROM Jobs WHERE CustomerID = '" & Request("ID") & "' AND ISNULL(Delivered, 0) = 0 AND RegularJobNo IS NOT NULL AND JobNumber NOT IN"
strSQL = strSQL & " (SELECT p.ID FROM TB_MasterPrices p INNER JOIN Jobs r ON p.ID=r.JobNumber"
strSQL = strSQL & " WHERE r.CustomerID = '" & Request("ID") & "' AND p.WorkType = '" & Request("WorkType") & "' AND p.PriceType_ID=3)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
strSQL = "INSERT INTO TB_MasterPrices (ID, WorkType, Unit, Price, Billing_ID, PriceType_ID)"
strSQL = strSQL & " SELECT RegularJobNumber, '" & Request("WorkType") & "', " & Request("Unit") & ", " & Request("Price") & ", " & Request("Billing_ID") & ", 2"
strSQL = strSQL & " FROM RegularJobs WHERE CustomerID = '" & Request("ID") & "' AND Active = 1 AND RegularJobNumber NOT IN"
strSQL = strSQL & " (SELECT p.ID FROM TB_MasterPrices p INNER JOIN RegularJobs r ON p.ID=r.RegularJobNumber"
strSQL = strSQL & " WHERE r.CustomerID = '" & Request("ID") & "' AND p.WorkType = '" & Request("WorkType") & "' AND p.PriceType_ID=2)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
End If
%>
<%
If Request("AutoSpot") = 1 Then
strSQL = "UPDATE TB_MasterPrices SET"
strSQL = strSQL & " Unit = " & Request("Unit")
strSQL = strSQL & ", Price = " & Request("Price")
strSQL = strSQL & ", Billing_ID = " & Request("Billing_ID")
strSQL = strSQL & " WHERE WorkType = '" & Request("WorkType") & "'"
strSQL = strSQL & " AND ID IN (SELECT JobNumber FROM Jobs WHERE CustomerID = '" & Request("ID") & "' AND ISNULL(Delivered, 0) = 0 AND RegularJobNo IS NULL)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
strSQL = "INSERT INTO TB_MasterPrices (ID, WorkType, Unit, Price, Billing_ID, PriceType_ID)"
strSQL = strSQL & " SELECT JobNumber, '" & Request("WorkType") & "', " & Request("Unit") & ", " & Request("Price") & ", " & Request("Billing_ID") & ", 2"
strSQL = strSQL & " FROM Jobs WHERE CustomerID = '" & Request("ID") & "' AND ISNULL(Delivered, 0) = 0 AND RegularJobNo IS NULL AND JobNumber NOT IN"
strSQL = strSQL & " (SELECT p.ID FROM TB_MasterPrices p INNER JOIN Jobs r ON p.ID=r.JobNumber"
strSQL = strSQL & " WHERE r.CustomerID = '" & Request("ID") & "' AND p.WorkType = '" & Request("WorkType") & "' AND p.PriceType_ID=3)"
If Testing=1 Then
response.write "<b>SQL = </b>" & strSQL & "<br>"
End If
cn.Execute strSQL
End If
%>
<%
If Request("Return") <> "" And Testing=0 Then
ReturnArray = Split(Request("Return"), "?")
For i = 1 to UBound(ReturnArray )
Return = Return & ReturnArray(i)
If i = 1 Then
Return = Return & "?"
Else
Return = Return & "&"
End If
Next
Response.Redirect Return
End If
%>
<% Else %>
<!--webbot bot="DatabaseRegionStart" s-columnnames="CustomerID,CompanyName,WorkType,Billing_ID,Unit,Price,Description" s-columntypes="200,200,200,3,3,5,200" s-dataconnection="BureauManagerSQL" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice="CustomerID" s-menuvalue="CustomerID" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns="CustomerID,CompanyName,WorkType,Billing_ID,Unit,Price,Description" s-criteria s-order s-sql="SELECT<br> p.ID AS CustomerID,<br> c.CompanyName,<br> p.WorkType,<br> b.ID AS Billing_ID,<br> p.Unit,<br> p.Price,<br> w.Description<br>FROM<br> TB_MasterPrices p INNER JOIN<br> WorkType w ON p.WorkType=w.WorkType INNER JOIN<br> Customers c ON p.ID=c.CUstomerID LEFT OUTER JOIN<br> TB_Billing b ON p.Billing_ID=b.ID<br>WHERE<br> p.ID = '::ID::' AND<br> p.WorkType = '::WorkType::'" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="ID=&WorkType=" s-norecordsfound="No Price Details found" i-maxrecords="256" i-groupsize="0" botid="5" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" startspan b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" b-ReplaceDatabaseRegion="FALSE" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT p.ID AS CustomerID, c.CompanyName, p.WorkType, b.ID AS Billing_ID, p.Unit, p.Price, w.Description FROM TB_MasterPrices p INNER JOIN WorkType w ON p.WorkType=w.WorkType INNER JOIN Customers c ON p.ID=c.CUstomerID LEFT OUTER JOIN TB_Billing b ON p.Billing_ID=b.ID WHERE p.ID = '::ID::' AND p.WorkType = '::WorkType::'"
fp_sDefault="ID=&WorkType="
fp_sNoRecords="No Price Details found"
fp_sDataConn="BureauManagerSQL"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="CustomerID"
fp_sMenuValue="CustomerID"
fp_sColTypes="&CustomerID=200&CompanyName=200&WorkType=200&Billing_ID=3&Unit=3&Price=5&Description=200&"
fp_iDisplayCols=7
fp_fCustomQuery=True
BOTID=5
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="62835" -->
<%
CustomerID = FP_FieldVal(fp_rs,"CustomerID")
CompanyName = FP_FieldVal(fp_rs,"CompanyName")
WorkType = FP_FieldVal(fp_rs,"WorkType")
Description = FP_FieldVal(fp_rs,"Description")
If Len(Request("Unit"))=0 Then
Unit = FP_FieldVal(fp_rs,"Unit")
Else
Unit = Request("Unit")
End If
If Len(Request("Price"))=0 Then
Price = FP_FieldVal(fp_rs,"Price")
Else
Price = Request("Price")
End If
If Len(Request("Billing_ID"))=0 Then
Billing_ID = FP_FieldVal(fp_rs,"Billing_ID")
Else
Billing_ID = Request("Billing_ID")
End If
%>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" --> <form method="POST" name="FrontPage_Form1" action="price_modify_customer.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript">
<table border="0" id="table1" cellspacing="5" cellpadding="0">
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Customer ID:</b></td>
<td>
<% =CustomerID %></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Company Name:</b></td>
<td>
<input type="hidden" name="ID" value="<% =CustomerID %>"><% =CompanyName %></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Work Type:</b></td>
<td>
<input type="hidden" name="WorkType" value="<% =WorkType %>"><% =WorkType %></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Description:</b></td>
<td>
<% =Description %></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Billing:</b></td>
<td>
<nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Description" s-columntypes="3,200" s-dataconnection="BureauManagerSQL" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="Description" s-menuvalue="ID" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource s-displaycolumns="ID,Description" s-criteria s-order s-sql="SELECT <br> ID,<br> Description<br>FROM<br> TB_Billing<br>ORDER BY<br> ID" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="16" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan b-InForm="TRUE" b-WasTableFormat="FALSE" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT ID, Description FROM TB_Billing ORDER BY ID"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="BureauManagerSQL"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="Description"
fp_sMenuValue="ID"
fp_sColTypes="&ID=3&Description=200&"
fp_iDisplayCols=2
fp_fCustomQuery=True
BOTID=16
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="43361" --><select NAME="Billing_ID" SIZE="1">
<option value="0"><- Select Billing Type -></option>
<!--webbot bot="AspInclude" clientside u-incfile="../../_fpclass/fpdbrgn1.inc" startspan --><!--#include file="../../_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="64934" -->
<option VALUE="<%=FP_FieldHTML(fp_rs,"ID")%>"
<%
if Billing_ID = FP_FieldHTML(fp_rs,"ID") then
response.write " selected"
end if
%>
>
<%=FP_FieldHTML(fp_rs,"Description")%></option>
<!--webbot bot="AspInclude" clientside u-incfile="../../_fpclass/fpdbrgn2.inc" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="64936" -->
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Bill Using:</b></td>
<td>
<nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Description" s-columntypes="200,200" s-dataconnection="BureauManagerSQL" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="Description" s-menuvalue="ID" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns="ID,Description" s-criteria s-order s-sql="SELECT T.WorkType AS ID, T.WorkType + ' - ' + T.Description AS Description<br>FROM Customers C INNER JOIN<br> TB_MasterPrices P ON C.CustomerID = P.ID INNER JOIN<br> WorkType T ON P.WorkType = T.WorkType INNER JOIN<br> TB_Billing b ON P.Billing_ID = b.ID INNER JOIN<br> TB_PriceType l ON P.PriceType_ID = l.ID<br>WHERE (C.CustomerID LIKE '::ID::') AND (T.WorkType LIKE P.WorkType)<br>ORDER BY T.WorkType" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="ID=" s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="17" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan b-InForm="TRUE" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT T.WorkType AS ID, T.WorkType + ' - ' + T.Description AS Description FROM Customers C INNER JOIN TB_MasterPrices P ON C.CustomerID = P.ID INNER JOIN WorkType T ON P.WorkType = T.WorkType INNER JOIN TB_Billing b ON P.Billing_ID = b.ID INNER JOIN TB_PriceType l ON P.PriceType_ID = l.ID WHERE (C.CustomerID LIKE '::ID::') AND (T.WorkType LIKE P.WorkType) ORDER BY T.WorkType"
fp_sDefault="ID="
fp_sNoRecords="No records returned."
fp_sDataConn="BureauManagerSQL"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="Description"
fp_sMenuValue="ID"
fp_sColTypes="&ID=200&Description=200&"
fp_iDisplayCols=2
fp_fCustomQuery=True
BOTID=17
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="45068" --><select NAME="BillUsing" SIZE="1">
<option><- Select Bill Using -></option>
<!--webbot bot="AspInclude" clientside u-incfile="../../_fpclass/fpdbrgn1.inc" startspan --><!--#include file="../../_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="64934" -->
<option VALUE="<%=FP_FieldHTML(fp_rs,"ID")%>"><%=FP_FieldHTML(fp_rs,"Description")%>
</option>
<!--webbot bot="AspInclude" clientside u-incfile="../../_fpclass/fpdbrgn2.inc" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="64936" -->
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Unit:</b></td>
<td>
<!--webbot bot="Validation" s-display-name="Unit No." s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="5" s-validation-constraint="Greater than" s-validation-value="0" --><input type="text" name="Unit" size="5" value="<% =Unit %>" maxlength="5"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" style="text-align: right"><b>Price:</b></td>
<td>
<!--webbot bot="Validation" s-display-name="Price" s-data-type="Number" s-number-separators=",." b-value-required="TRUE" i-minimum-length="1" i-maximum-length="7" --><input type="text" name="Price" size="7" value="<% =Price %>" maxlength="7"></td>
</tr>
<tr>
<td style="text-align: right" bgcolor="#C0C0C0">
<b>Auto update Spot Jobs:</b></td>
<td>
<input type="checkbox" name="AutoSpot" value="1" <% If Request("AutoSpot")=1 Then %> checked <% End If %> onClick="RefreshForm()"></td>
</tr>
<tr>
<td style="text-align: right" bgcolor="#C0C0C0">
<b>Auto update Regular Jobs:</b></td>
<td>
<input type="checkbox" name="AutoRegular" value="1" <% If Request("AutoRegular")=1 Then %> checked <% End If %> onClick="RefreshForm()"></td>
</tr>
<tr>
<td style="text-align: right">
<input type="submit" value="Update" name="Action"></td>
<td>
<p style="text-align: center">
<input type="button" value="Delete" name="DelBut" style="float: left" onClick="DeletePrice()"></td>
</tr>
</table>
<input type="hidden" value="<%= Request("Return") %>" name="Return">
</form>
<% End If %>
<% End If %>
<%
If Request("Return") <> "" Then
ReturnArray = Split(Request("Return"), "?")
For i = 1 to UBound(ReturnArray )
Return = Return & ReturnArray(i)
If i = 1 Then
Return = Return & "?"
Else
Return = Return & "&"
ENd If
Next
%>
<p>
<a href="<%= Return %>">Return to <%= ReturnArray(0) %></a>
</p>
<% End If %>
<script language="javascript">
<!--
function DeletePrice()
{
location.replace("price_delete_customer.asp?Action=Delete&AutoRegular=<% =Request("AutoRegular") %>&AutoSpot=<% =Request("AutoSpot") %>&ID=<% =Request("ID") %>&WorkType=<% =Request("WorkType") %>&return=<% =Request("Return") %>");
}
function RefreshForm(){ //v3.0
document.FrontPage_Form1.submit()
}
-->
</script>
</body>
</html>
|