<% 'Page/form name: prod_catg_qry.asp 'Purpose : Display the Product category 'Date : 18/07/2003 'Author : Himanshu Nigam Dim strPageCode strPageCode="33IMP02" session("usertype")="SUS" %> Product Category - <%=Application("title")%>
<%if rcount>rsselect.PageSize then%> <%end if%>
<% dim NavigArray() Redim NavigArray(1,0) NavigArray(0,0) = "/fairregistration/admin/" NavigArray(1,0) = DIRECTORY_NAME Redim Preserve NavigArray(1,1) NavigArray(0,1) = RELATIVE_PATH NavigArray(1,1) = "View Product Category" Proc_TO_Display_NavigationPath NavigArray, "A" %>
Search Product Category
<%dim rsspace set rsspace=server.CreateObject("ADODB.Recordset") rsspace.ActiveConnection=objConn rsspace.CursorType=1 rsspace.Open "SELECT ProdID,ProductName FROM Products_Master ORDER BY ProductName ASC " %>
Product Category
">
Active
" ID="Hidden2"> " ID="Hidden3">
<%dim strselect, rsselect 'strselect = "Select a.SpaceId,a.Description aa,a.AvailforBook,c.Description bb from SpaceMaster a, SpaceAvailToDetails b,AvailableToCatgMaster c where a.SpaceId=b.SpaceId and b.CategoryId=c.CategoryId " strselect = "Select ProdId,ProductName,Active from Products_Master" 'if Request("hdCustomerSearch")="Y" then dim chspa, chActive if Request("txtspace")="NA" or Request("txtspace")="" then chspa="%" else chspa=Replace(Request("txtspace"),"'","''") end if if Request("txtactive")="ALL" or Request("txtactive")="" then chActive="%" else chActive=Request("txtactive") end if strselect =strselect & " where ProdId like '"& chspa &"' and Active like '"& chActive & "'" 'Response.Write strselect 'Response.End 'end if strselect=strselect & " order by ProductName" 'set rsselect=objconn.execute(strselect) set rsselect=Server.CreateObject("ADODB.Recordset") SetRecordset rsselect, strselect dim maxrecs maxrecs=0 dim maxpages maxpages = Cint(rsselect.Pagecount) maxrecs = Cint(rsselect.Pagesize) if ((maxpages>0) and (cint(intPageno)>cint(maxpages) or cint(intpageNo)<=0)) then Response.redirect "/config/inc/error.asp" Response.end end if %>
<%if rsselect.RecordCount > 0 then %> <%=StartRecNo%> to <%=EndRecNo%> of <%=totalrecords%> Matching Records <%Else%> 0 Matching Records <%End if %>
Search Results For : <% if chspa="%" then Response.write "All, " else response.write "'" & request("hdcustname") & "', " if chActive="Y" then Response.write "Yes" else if chActive="N" then Response.Write "No" else Response.Write "All" %>
<% dim iRowCount, ClassVal dim strSpace,strCategory dim rsSpaceCat dim strSpaceCat if not(rsselect.EOF and rsselect.BOF) then Do While NOT (rsselect.EOF and rsselect.BOF) and (cint(maxpagerecs) < cint(maxrecs)) %> <% if trim(rsselect("Active"))="Y" then ClassVal="Yes" else ClassVal="No" end if %> <% iRowCount = iRowCount + 1 rsselect.MoveNext maxpagerecs=cint(maxpagerecs) + 1 if rsselect.EOF then Exit Do Loop %> <% else %> <%end if%>
Category Code
Category Description
Available
Action
<%=rsselect("ProdID")%> 
<%=rsselect("ProductName")%> 
<%=ClassVal%> 
No Records Found.
<%%>
<% '--Pagination code--' pagination rsselect.PageCount,pagestring, "frmsearch1" %>
<%'dim pagestring if err<>0 then Response.Redirect "/config/inc/error.asp?errtype=err_record§ion=" & SectionName Response.end end if %>

 

 

<% rsspace.Close set rsspace=nothing rsselect.Close set rsselect=nothing %>