<% 'Page/form name: Space_rate_qry.asp 'Purpose : Display the Space rate 'Date : 18/07/2003 'Author : Himanshu Nigam dim strpagecode strpagecode= "FAIRG05" session("usertype")="SUS" %> View Space Rate - <%=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 Space Rate" Proc_TO_Display_NavigationPath NavigArray, "A" %>
Search Space Rate
<%dim rsspace set rsspace=server.CreateObject("ADODB.Recordset") rsspace.ActiveConnection=objConn rsspace.CursorType=1 rsspace.Open "SELECT SpaceId,Description FROM SpaceMaster ORDER BY Description ASC " %> <%dim rscategory set rscategory=server.CreateObject("ADODB.Recordset") rscategory.ActiveConnection=objConn rscategory.CursorType=1 rscategory.Open "SELECT CategoryId, Description, Isindian FROM AvailableToCatgMaster ORDER BY Description ASC" %>
Space
">
Category
"> " 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 a.SpaceId,a.CategoryId,a.Rate_INR,a.Rate_USD,b.Description space1,c.Description category1 from SpaceRateMaster a,SpaceMaster b, AvailableToCatgMaster c where b.SpaceId=a.SpaceId and c.CategoryId=a.CategoryId" 'if Request("hdCustomerSearch")="Y" then dim chspa, chCategory if Request("txtspace")="NA" or Request("txtspace")="" then chspa="%" else chspa=Replace(Request("txtspace"),"'","''") end if if Request("txtcategory")="NA" or Request("txtcategory")="" then chCategory="%" else chCategory=trim(Request("txtcategory")) end if strselect =strselect & " and a.SpaceId like '"& chspa &"' and a.CategoryId like '"& chCategory & "'" 'Response.Write strselect 'Response.End 'end if strselect=strselect & " order by Space1" '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 chCategory="%" then Response.write "All" else response.write "'" & request("hdcustname1") & "'" %>
<% dim iRowCount, ClassVal dim strSpace,strCategory dim minrate, maxrate if not(rsselect.EOF and rsselect.BOF) then Do While NOT (rsselect.EOF and rsselect.BOF) and (cint(maxpagerecs) < cint(maxrecs)) if rsselect("Rate_INR")="0" then minrate="-" else minrate=rsselect("Rate_INR") end if if rsselect("Rate_USD")="0" then maxrate="-" else maxrate=rsselect("Rate_USD") end if %> <% iRowCount = iRowCount + 1 rsselect.MoveNext maxpagerecs=cint(maxpagerecs) + 1 if rsselect.EOF then Exit Do Loop %> <% else %> <%end if%>
Space
Category
Rate (Indian Rs.)
Rate (US $)
Action
<%=rsselect("Space1")%> 
<%=rsselect("Category1")%> 
<%=minrate%> 
<%=maxrate%> 
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 rscategory.Close set rscategory=nothing rsselect.Close set rsselect=nothing %>