Home
>
Directories
>
Global Importers Directory
>
Search Hall
Search Hall Details
Hall
<% dim sqlHall,rsHalll sqlHall = "select ha.hallid,description from hallmaster hm,hallavailtocatgdetails ha where ha.hallid = hm.hallid " set rsHall = objconn.execute(sqlHall) %>
ALL
<%do while not (rsHall.eof or rsHall.bof) %>
" <%if trim(request.Form("cmnHallName")) = trim(rsHall("HallId")) then %> selected <%end if%> ><%=trim(rsHall("Description"))%>
<%rsHall.movenext loop %>
<%'response.Write trim(rsHall("HallId"))%>
Category
<% dim rs dim strQry set rs = server.CreateObject("adodb.recordset") %> <% strQry = "" strQry = "select distinct av.categoryid,description from hallavailtocatgdetails hc,AvailableToCatgMaster av where hc.categoryid = av.categoryid " on error resume next set rs = objconn.execute(strQry) if err <> 0 then response.Redirect "/inc/admin/error.asp?errortype=err_record§ion="&server.URLEncode("Add Hall") Response.End end if on error goto 0 %>
<% If not (rs.EOF and rs.BOF) then %>
--ALL--
<%do while not rs.EOF%>
" <%if trim(request.Form("cmbType")) = trim(rs("categoryid")) then%>selected<%end if%>><%=rs("description")%>
<% rs.MoveNext loop end if %>
">
<%'-----Filtering of records-----%> <% if trim(request.Form("cmnHallName"))<> "" and trim(request.Form("cmnHallName"))<> "ALL" then strHallName = " where hm.HallId = "&trim(request.Form("cmnHallName")) else strHallName = " where hm.HallId LIKE '%' " end if if trim(request.Form("cmbType"))<> "" and trim(request.Form("cmbType"))<> "-1" then strType = " and hm.TypeCode = '"&trim(request.Form("cmbType"))&"'" end if ' if trim(request.Form("cmbProduct"))<> "" and trim(request.Form("cmbProduct"))<> "-1" then ' strType = " and hm.TypeCode = "&trim(request.Form("cmbProduct")) ' ' end if %> <%'---- End of Filtering of records---%> <% dim sqlResultHall,rsResultHall ' sqlresultHall = "select prodid = (select product_desc from product_master"&_ ' " where product_code = prodid ),categoryid = (select description from availableToCatgMaster"&_ ' " where categoryid = ha.categoryid ),hm.hallid,description,typecode = (select codedesc from itpo_code where code = hm.typecode and codetype = 'hty' ),minbookbarespaceId,"&_ '' " maxbookbarespaceId,availforbook from hallmaster hm "&_ ' " left outer join hallavailtocatgdetails as ha on ha.hallid = hm.hallid "&_ ' " left outer join hallProdcatgdetails as hp on hp.hallid = hm.hallid " sqlresultHall = "select hm.hallid,description,typecode = (select codedesc from itpo_code where code = hm.typecode and codetype = 'hty' ),minbookbarespaceId,"&_ " maxbookbarespaceId,availforbook from hallmaster hm "'&_ '" left outer join hallavailtocatgdetails as ha on ha.hallid = hm.hallid "&_ '" left outer join hallProdcatgdetails as hp on hp.hallid = hm.hallid " ' if trim(request.Form("cmbCategory"))<> sqlresultHall = sqlresultHall & strHallName & strType ' response.Write sqlresultHall ' response.End ' set rsResultHall = objconn.execute(sqlresultHall) SetRecordset rsResultHall, sqlresultHall dim maxrecs maxrecs=0 dim maxpages maxpages = Cint(rsResultHall.Pagecount) maxrecs = Cint(rsResultHall.Pagesize) %>
<%'Values for search result dim hall,halltype,prod,cat hall = trim(request.Form("hallname")) if hall = "" or hall = "ALL" then hall = "ALL" end if halltype = trim(request.Form("cmbType")) if halltype = "" or halltype = "-1" then halltype = "ALL" end if %>
Search Results For : <%=hall & ", "& halltype%><%'=hall & ", "& halltype&", "&prod&", "&cat %>
<% ' ## Display RecordNumbers from To Band BEGIN if not(rsResultHall.eof or rsResultHall.bof) then %> <%=startrecno%> - <%=endrecno%> of <%=totalrecords%> records <%'else%> <%end if%>
Hall
Product
Category
Type
MinBookBare
Space
MaxBookBare
Space
Availability
<% Dim iRowCount, ClassVal iRowCount = 1 if not(rsResultHall.EOF and rsResultHall.BOF) then Do While NOT (rsResultHall.EOF and rsResultHall.BOF) and (cint(maxpagerecs) < cint(maxrecs)) if iRowCount Mod 2 = 0 then ClassVal = "greyrow" else ClassVal = "whiterow" end if %>
"> <%=trim(rsResultHall("Description"))%>
<%sqlProduct = "select prodid = (select productname from products_master"&_ " where prodid = hp.prodid )from hallProdcatgdetails hp where hallid = "&trim(rsResultHall("hallid"))&" " ' response.Write sqlProduct set rsProduct = objconn.execute(sqlProduct) %> <% do while not(rsProduct.eof) products = products & ","&trim(rsProduct("prodid")) rsProduct.movenext loop if len(products)>0 then products = mid(products,2,len(products)-1) end if %>
<%=products%><%'=trim(rsResultHall("ProdId"))%>
<%products = ""%> <%sqlCategory = "select categoryid = (select description from AvailableToCatgMaster"&_ " where categoryid = hp.categoryid )from hallavailtocatgdetails hp where hallid = "&trim(rsResultHall("hallid"))&" " ' response.Write sqlCategory set rsProduct = objconn.execute(sqlCategory) %> <% do while not(rsProduct.eof) category = category & ","&trim(rsProduct("categoryid")) rsProduct.movenext loop if len(category)>0 then category = mid(category,2,len(category)-1) end if %>
<%=category%><%'=trim(rsResultHall("CategoryId"))%>
<%category = ""%>
<%=trim(rsResultHall("typecode"))%>
<%=trim(rsResultHall("minbookbarespaceId"))%>
<%=trim(rsResultHall("maxbookbarespaceId"))%>
<%=trim(rsResultHall("availforbook"))%>
<% iRowCount = iRowCount + 1 maxpagerecs=cint(maxpagerecs) + 1 rsResultHall.MoveNext if rsResultHall.EOF then Exit Do loop %> <% else %>
No Records Found.
<%end if%> <%if rcount>rsResultHall.PageSize then%>
<% 'dim pagestring pagination rsResultHall.PageCount,pagestring,"frmsearch1" if err<>0 then response.Redirect "/inc/admin/error.asp?errortype=err_record§ion="&server.URLEncode("Add Hall") Response.end end if %>
<%end if%>