cursor = database.cursor("select count(partnumber)count from versitex.product where upper(description) like upper ('%" + request.search + "%') ");
cursor.next();
client.count = cursor.count;
cursor.close();
maxThisPage = parseInt(request.rowRef) + 19;
beginRow = request.rowRef;
beginRowPreviousPage = request.rowRef - 20;
write("");
write("");
write("");
if(client.PriceLevel == null) {
cursor = database.cursor("select (rownum)rowcount, id, partnumber, sub, c5desc, description, to_char(((consumerprice)/(" + client.cex + ")),'999,999.99')price from versitex.product where upper(description) like upper ('%" + request.search + "%') ") }
else {
cursor = database.cursor("select (rownum)rowcount, id, partnumber, sub, c5desc, description, to_char(((" + client.PriceLevel + ")/(" + client.cex + ")),'999,999.99')price from versitex.product where upper(description) like upper ('%" + request.search + "%') ") }
var f = 0;
var i = 0;
var rowLoopRef = parseInt(request.rowRef);
while(cursor.next()) {
if(i == maxThisPage)
break
if(cursor.rowcount == rowLoopRef) {
if(f == 0) {
if(cursor.c5desc != 'C') {
write("") }
else {
write("") }
f++;
}
else {
if(cursor.c5desc != 'C') {
write("") }
else {
write("") }
f = 0;
}
rowLoopRef++;
}
else {
}
i++;
}
cursor.close();
if(client.count == 0) {
write("")
}
else{
write("");
}
write("");
|