if statement using vbscrip language

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikunthdivya
    New Member
    • Oct 2013
    • 3

    if statement using vbscrip language

    Code:
    If sIssueId <>rs("IssueId") Then%> <tr class=selsty> <td rowspan=2> <%= rs("ISSUENO")%> </td> <td rowspan=2> <%= rs("ITEM") %> </td> <td rowspan=2> <%= rs("COLOR") %> </td> <td rowspan=2><%= rs("SIZE") %> </td> <td align=right rowspan=2> <%= rs("ISSUEQTY") %> </td> <%		end if%>
    Last edited by Rabbit; Oct 29 '13, 03:16 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
  • vikunthdivya
    New Member
    • Oct 2013
    • 3

    #2
    asp

    thank you.i have lot of doubts.so i learn lot of things from

    Comment

    • vikunthdivya
      New Member
      • Oct 2013
      • 3

      #3
      Code:
      <%@ language=vbscript %>
      <!--#include file="axongeneral.asp"-->
      <!--#include file="GeneralFunctions.asp"-->
      <html>
      <head>
      	<title>Process</title>
      	<style>
      	font.title
      			{font-family:arial;
      			font-size:12px}
      		td{font-family:arial; font-size:11px}
      		.selsty{width:250px; font-family:arial; font-size:12px; font-weight:bolder; color:91008b; background:e7f8f7}
      	</style>
      </head>
      <body>
      <% 
      dim  cn, rs, squery
      Dim sIssueId
      
      if Request.QueryString("show")="detail" then
      	Response.Write("Issue")
      	squery =" Select I.Item,Clr.color,SZ.size,PIM.IssueNo,PID.IssueQty,PRD.RcptQty,PRD.RcptRate From Process_Rcpt_Det PRD "
      	squery = squery & "<br>" & " Inner Join Process_Iss_Mas PIM On PRD.IssueId=PIM.IssueId "
      	squery = squery & "<br>" & " Inner Join Process_Iss_Det PID On PRD.IssueDetId=PID.IssueDetId "
      	squery = squery & "<br>" & " Inner Join Item I On PID.itemid=I.itemid "
      	squery = squery & "<br>" & " Inner Join color Clr On PID.ColorId=Clr.colorId "
      	squery = squery & "<br>" & " Inner Join size SZ On PID.sizeid=SZ.sizeid "
      	'squery = squery & "<br>" & " Where IssueNo= '" & Request.QueryString("IssueNo") & "' "
      	'squery = squery & "<br>" & " and  storeId= " & Request.QueryString("store") & ""
      	'squery = squery & "<br>" & " and PID.IssueDetId= " & Request.QueryString("IssueDetId") & ""
      	Response.Write squery
      	'end response
      	squery = replace(squery,"<br>","")
      	Set rs =Server.CreateObject("ADODB.Recordset")
      	Rs.Open sQuery, Con, adOpenStatic, adLockReadOnly
      %>
      	<table align=Center border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
      	  <tr class=selsty align=Center  height=25>
      		<td align=CENTER><font size=3> <b>ISS DET DETAILS</b> </font> </td>
      	  </tr>
      	</table>
      	<BR>
      	<table  align=center  border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
      	  <tr class=selsty height=25 >
      		<td ALIGN=CENTER rowspan=2> <b>ISSUENO</b> </td>
      		<td ALIGN=CENTER rowspan=2> <b>ITEM</b> </td>
      		<td ALIGN=CENTER rowspan=2> <b>COLOR</b> </td>
      		<td ALIGN=CENTER rowspan=2> <b>SIZE</b> </td>
      		<td ALIGN=RIGHT rowspan=2> <b>ISSUEQTY</b> </td>
      		<td ALIGN=RIGHT> <b>RCPTQTY</b> </td>
      		<td ALIGN=RIGHT> <b>RCPTRATE</b> </td>
      	  </tr>
      	<%
      	rs.movefirst
      	sIssueId=0
      	while rs.EOF=False
      	    If sIssueId <>rs("IssueId") Then%>
      		
      		     
      	
      			<tr class=selsty>
      			<td rowspan=2> <%= rs("ISSUENO")%> </td>
      			<td rowspan=2> <%= rs("ITEM") %> </td>
      			<td rowspan=2> <%= rs("COLOR") %> </td>
      			<td rowspan=2><%= rs("SIZE") %> </td>
      			<td align=right rowspan=2> <%= rs("ISSUEQTY") %> </td>
      			
      <%		end if%>
                  <td align=right> <%= rs("RCPTQTY") %> </td>
      		    <td align=right> <%= rs("RCPTRATE") %> </td>
      		    </tr>
      		    sIssueId=rs("IssueId")
         <%
         rs.movenext
         wend%>			    
      </table>
      
      <%	Response.end
      end if
      %>
      
      <%
       Set rs =Server.CreateObject("ADODB.Recordset")
       squery = " Select PID.IssueDetId, PIM.IssueNo,PIM.IssueDate ,su.supplier,S.Store,P.process,PID.IssueQty,PIM.Remarks From Process_Iss_Det PID "
       squery = squery & "<br>" & " Inner Join Process_Iss_Mas PIM On PID.IssueId=PIM.IssueId " 
       squery = squery & "<br>" & " Inner Join supplier su On PIM.supplierid=su.supplierid " 
       squery = squery & "<br>" & " Inner Join Store S On PIM.StoreId=S.StoreId " 
       squery = squery & "<br>" & " Inner Join process P On PIM.processid=P.processid " 
       squery = squery & "<br>" & " Where 1=1"
       'Response.Write squery
       'end Response
       squery = replace(squery,"<br>","")
       Rs.Open sQuery, Con, adOpenStatic, adLockReadOnly
       %>
      <table align=Center border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
       <tr class=selsty  height=25>
      	<td align=CENTER > <font size=3> <b>ISSUE LISTING</b> </font> </td>
       </tr>
      </table>
      <BR>
      <table  align=center  border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
       <tr class=selsty height=25>
      	<td ALIGN=CENTER> <b>ISSUENO</b> </td>
      	<td ALIGN=CENTER> <b>ISSUEDATE</b> </td>
          <td ALIGN=CENTER> <b>SUPPLIER</b> </td>
      	<td ALIGN=CENTER> <b>STORE</b> </td>
      	<td ALIGN=CENTER> <b>PROCESS</b> </td>
      	<td ALIGN=CENTER> <b>ISSUEQTY</b> </td>
      </tr>	
      <%
       rs.movefirst
       do while not rs.eof%>
      	<tr class=selsty>
      	  <td> <%= rs("ISSUENO") %> </td>
      	  <td> <%= rs("ISSUEDATE") %> </td>
      	  <td> <%= rs("SUPPLIER") %> </td>
      	  <td> <%= rs("STORE") %> </td>
      	  <td> <%= rs("PROCESS") %> </td>
      	  <td align=right>
      	  <a href="Process.asp?IssueNo=<%=rs.Fields("IssueNo")%>&StoreId=<%=rs.Fields("Store")%>&IssueDetId=<%=rs.Fields("IssueDetId")%>&show=detail">
      	   <%= rs("ISSUEQTY") %> </a> </td>
      	</tr>  
      	<tr class=selsty >
      	  <td colspan=6><b>REMARKS:</b><%= rs("REMARKS") %> </td>
      	</tr>
      	<%
       rs.movenext
       loop 
      %> 
      </table>
      </body>
      </html>
      <%
      rs.close
      set rs=nothing
      %>
      Last edited by Rabbit; Oct 29 '13, 03:16 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You haven't asked a question...

        Comment

        Working...