<%@ Language=VBScript%> <% dim strpagecode strpagecode= "4EXIS01" %> <% 'Page/form name:booking_status.asp 'Purpose:User interface to see booking status 'Date Modified:03-10-2001 'Author: Ashish Bansal %> <% 'code for Recordset Paging Dim maxpages Dim maxrecs Dim iCurrentPage if Request.QueryString("page")="" then iCurrentPage = 1 else iCurrentPage = cint(Request.QueryString("page")) end if %> <% dim strUserId dim strBookingStatus dim rsBookingStatus strUserId=Session("userid") strBookingStatus="select a.bookingno bookingno, b.exhibitionname exhibitionname, convert(char(10),a.bookingdate,103) as dtBookDate, convert(char(10),b.dtFmBooking,103) dtFmBookDate, convert(char(10),b.dtToBooking,103) dtToBookdate, b.status status,b.Remarks from Exhib_Booking_Org a, Exhib_Book_Proposed b where a.bookingno=b.bookingno and b.createuserid='" & strUserId & "' order by a.bookingdate desc" set rsBookingStatus=server.CreateObject("adodb.recordset") rsBookingStatus.Open strBookingStatus,objconn,adOpenStatic, adLockOptimistic dim rcount rcount=rsBookingStatus.RecordCount dim StartRecNo dim EndRecNo StartRecNo = 0 EndRecNo = 0 ReturnRecNumbers iCurrentPage, StartRecNo, EndRecNo, rCount%> Booking Status - <%=Application("Title")%>
Home > Exhibition Centre > Booking Status
<%if rcount>0 then%> <%else%> <%end if%> <% if not (rsBookingStatus.eof or rsBookingStatus.bof) then rsBookingStatus.PageSize =application("numrecords") rsBookingStatus.CacheSize = application("numrecords") rsBookingStatus.AbsolutePage = Cint(iCurrentPage) maxpages = Cint(rsBookingStatus.Pagecount) maxrecs = Cint(rsBookingStatus.Pagesize) Dim maxpagerecs maxpagerecs=0 do while not (rsBookingStatus.eof or rsBookingStatus.bof) and (cint(maxpagerecs) < cint(maxrecs))%> <%maxpagerecs=cint(maxpagerecs) + 1 rsBookingStatus.movenext loop%> <%else%> <%end if%>
Booking Status
<%=StartRecNo%> to <%=EndRecNo%> of <%=rCount%> Records 0 Records
Booking Date
Exhibition Name
Proposed Dates of Booking
Status
Remarks
<%=rsBookingStatus("dtBookDate")%>
<%=rsBookingStatus("exhibitionname")%>
<%=rsBookingStatus("dtFMBookDate")%> - <%=rsBookingStatus("dtToBookDate")%>
<%dim rsStatusDesc set rsStatusDesc=objconn.execute("select * from itpo_code where codetype='HBK' and code='" & rsBookingStatus("status") & "'") if not (rsStatusDesc.eof or rsStatusDesc.bof) then strStatusDesc=rsStatusDesc("codedesc") else strStatusDesc=rsBookingStatus("status") end if if UCASE(TRIM(rsBookingStatus("status")))="ALL" or UCASE(TRIM(rsBookingStatus("status")))="REJ" then strStatusDesc="Processed" end if rsStatusDesc.close set rsStatusDesc=nothing Response.write strStatusDesc %>
<%if not isnull(rsBookingStatus("Remarks")) then if trim(rsBookingStatus("Remarks"))<>"" then%> ">
<%if (instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE")=0 ) then%> );">Remarks
<%else%> ');" name="link1">Remarks <%end if%> <%end if end if%>
<% if cint(maxpages) > 1 then if cint(iCurrentPage) >1 then%> <<Prev   <%end if Dim Counter if iCurrentPage > 10 then if iCurrentPage mod 10 = 0 then Counter=(iCurrentPage - 10) +1 else Counter=(iCurrentPage - (iCurrentPage mod 10)) +1 end if else Counter =1 end if For cnt = 1 to 10 if counter <= maxpages then if counter <> CInt(iCurrentPage) Then %> <%=counter%> <%Else%> <%=counter%> <%End if Counter=Counter + 1 else exit for end if Next if cint(iCurrentPage) < cint(maxpages) then%> Next>>   <%end if end if%>
No Bookings have been done by you.
 
<% 'this procedure returns Start and End Record no. of the 'selected page. sub ReturnRecNumbers(lintPageNo, lStartRecNo, lEndRecNo, tot_recs) lEndRecNo = lintPageNo * Application("numrecords") lStartRecNo = (lEndRecNo - Application("numrecords")) + 1 if lEndRecNo >= tot_recs then lEndRecNo = tot_recs end if end sub %>