By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,660 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,660 IT Pros & Developers. It's quick & easy.

if statement using vbscrip language

P: 3
Expand|Select|Wrap|Line Numbers
  1. 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%>
Oct 29 '13 #1
Share this Question
Share on Google+
3 Replies


P: 3
thank you.i have lot of doubts.so i learn lot of things from
Oct 29 '13 #2

P: 3
Expand|Select|Wrap|Line Numbers
  1. <%@ language=vbscript %>
  2. <!--#include file="axongeneral.asp"-->
  3. <!--#include file="GeneralFunctions.asp"-->
  4. <html>
  5. <head>
  6.     <title>Process</title>
  7.     <style>
  8.     font.title
  9.             {font-family:arial;
  10.             font-size:12px}
  11.         td{font-family:arial; font-size:11px}
  12.         .selsty{width:250px; font-family:arial; font-size:12px; font-weight:bolder; color:91008b; background:e7f8f7}
  13.     </style>
  14. </head>
  15. <body>
  16. <% 
  17. dim  cn, rs, squery
  18. Dim sIssueId
  19.  
  20. if Request.QueryString("show")="detail" then
  21.     Response.Write("Issue")
  22.     squery =" Select I.Item,Clr.color,SZ.size,PIM.IssueNo,PID.IssueQty,PRD.RcptQty,PRD.RcptRate From Process_Rcpt_Det PRD "
  23.     squery = squery & "<br>" & " Inner Join Process_Iss_Mas PIM On PRD.IssueId=PIM.IssueId "
  24.     squery = squery & "<br>" & " Inner Join Process_Iss_Det PID On PRD.IssueDetId=PID.IssueDetId "
  25.     squery = squery & "<br>" & " Inner Join Item I On PID.itemid=I.itemid "
  26.     squery = squery & "<br>" & " Inner Join color Clr On PID.ColorId=Clr.colorId "
  27.     squery = squery & "<br>" & " Inner Join size SZ On PID.sizeid=SZ.sizeid "
  28.     'squery = squery & "<br>" & " Where IssueNo= '" & Request.QueryString("IssueNo") & "' "
  29.     'squery = squery & "<br>" & " and  storeId= " & Request.QueryString("store") & ""
  30.     'squery = squery & "<br>" & " and PID.IssueDetId= " & Request.QueryString("IssueDetId") & ""
  31.     Response.Write squery
  32.     'end response
  33.     squery = replace(squery,"<br>","")
  34.     Set rs =Server.CreateObject("ADODB.Recordset")
  35.     Rs.Open sQuery, Con, adOpenStatic, adLockReadOnly
  36. %>
  37.     <table align=Center border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
  38.       <tr class=selsty align=Center  height=25>
  39.         <td align=CENTER><font size=3> <b>ISS DET DETAILS</b> </font> </td>
  40.       </tr>
  41.     </table>
  42.     <BR>
  43.     <table  align=center  border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
  44.       <tr class=selsty height=25 >
  45.         <td ALIGN=CENTER rowspan=2> <b>ISSUENO</b> </td>
  46.         <td ALIGN=CENTER rowspan=2> <b>ITEM</b> </td>
  47.         <td ALIGN=CENTER rowspan=2> <b>COLOR</b> </td>
  48.         <td ALIGN=CENTER rowspan=2> <b>SIZE</b> </td>
  49.         <td ALIGN=RIGHT rowspan=2> <b>ISSUEQTY</b> </td>
  50.         <td ALIGN=RIGHT> <b>RCPTQTY</b> </td>
  51.         <td ALIGN=RIGHT> <b>RCPTRATE</b> </td>
  52.       </tr>
  53.     <%
  54.     rs.movefirst
  55.     sIssueId=0
  56.     while rs.EOF=False
  57.         If sIssueId <>rs("IssueId") Then%>
  58.  
  59.  
  60.  
  61.             <tr class=selsty>
  62.             <td rowspan=2> <%= rs("ISSUENO")%> </td>
  63.             <td rowspan=2> <%= rs("ITEM") %> </td>
  64.             <td rowspan=2> <%= rs("COLOR") %> </td>
  65.             <td rowspan=2><%= rs("SIZE") %> </td>
  66.             <td align=right rowspan=2> <%= rs("ISSUEQTY") %> </td>
  67.  
  68. <%        end if%>
  69.             <td align=right> <%= rs("RCPTQTY") %> </td>
  70.             <td align=right> <%= rs("RCPTRATE") %> </td>
  71.             </tr>
  72.             sIssueId=rs("IssueId")
  73.    <%
  74.    rs.movenext
  75.    wend%>                
  76. </table>
  77.  
  78. <%    Response.end
  79. end if
  80. %>
  81.  
  82. <%
  83.  Set rs =Server.CreateObject("ADODB.Recordset")
  84.  squery = " Select PID.IssueDetId, PIM.IssueNo,PIM.IssueDate ,su.supplier,S.Store,P.process,PID.IssueQty,PIM.Remarks From Process_Iss_Det PID "
  85.  squery = squery & "<br>" & " Inner Join Process_Iss_Mas PIM On PID.IssueId=PIM.IssueId " 
  86.  squery = squery & "<br>" & " Inner Join supplier su On PIM.supplierid=su.supplierid " 
  87.  squery = squery & "<br>" & " Inner Join Store S On PIM.StoreId=S.StoreId " 
  88.  squery = squery & "<br>" & " Inner Join process P On PIM.processid=P.processid " 
  89.  squery = squery & "<br>" & " Where 1=1"
  90.  'Response.Write squery
  91.  'end Response
  92.  squery = replace(squery,"<br>","")
  93.  Rs.Open sQuery, Con, adOpenStatic, adLockReadOnly
  94.  %>
  95. <table align=Center border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
  96.  <tr class=selsty  height=25>
  97.     <td align=CENTER > <font size=3> <b>ISSUE LISTING</b> </font> </td>
  98.  </tr>
  99. </table>
  100. <BR>
  101. <table  align=center  border=0 bgcolor=red Cellpadding=1 Cellspacing=1 WIDTH=100%>
  102.  <tr class=selsty height=25>
  103.     <td ALIGN=CENTER> <b>ISSUENO</b> </td>
  104.     <td ALIGN=CENTER> <b>ISSUEDATE</b> </td>
  105.     <td ALIGN=CENTER> <b>SUPPLIER</b> </td>
  106.     <td ALIGN=CENTER> <b>STORE</b> </td>
  107.     <td ALIGN=CENTER> <b>PROCESS</b> </td>
  108.     <td ALIGN=CENTER> <b>ISSUEQTY</b> </td>
  109. </tr>    
  110. <%
  111.  rs.movefirst
  112.  do while not rs.eof%>
  113.     <tr class=selsty>
  114.       <td> <%= rs("ISSUENO") %> </td>
  115.       <td> <%= rs("ISSUEDATE") %> </td>
  116.       <td> <%= rs("SUPPLIER") %> </td>
  117.       <td> <%= rs("STORE") %> </td>
  118.       <td> <%= rs("PROCESS") %> </td>
  119.       <td align=right>
  120.       <a href="Process.asp?IssueNo=<%=rs.Fields("IssueNo")%>&StoreId=<%=rs.Fields("Store")%>&IssueDetId=<%=rs.Fields("IssueDetId")%>&show=detail">
  121.        <%= rs("ISSUEQTY") %> </a> </td>
  122.     </tr>  
  123.     <tr class=selsty >
  124.       <td colspan=6><b>REMARKS:</b><%= rs("REMARKS") %> </td>
  125.     </tr>
  126.     <%
  127.  rs.movenext
  128.  loop 
  129. %> 
  130. </table>
  131. </body>
  132. </html>
  133. <%
  134. rs.close
  135. set rs=nothing
  136. %>
Oct 29 '13 #3

Rabbit
Expert Mod 10K+
P: 12,370
You haven't asked a question...
Oct 29 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.