Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|		          RequestProductLocation		 	 |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<%
17
'------------ VARIABLE DEFINITION -------------
18
Dim rsQry
19
Dim IsProductInNewBom
20
Dim bgColor
21
Dim QueryName
22
Dim parBomId
23
'------------ CONSTANTS DECLARATION -----------
24
'------------ VARIABLE INIT -------------------
25
parBomId = Request("bom_id")
26
'------------ CONDITIONS ----------------------
27
'----------------------------------------------
28
%>
29
<%
30
'--------------------------------------------------------------------------------------------------------------
31
'--------------------------------------------------------------------------------------------------------------
32
%>
33
<%
34
'------------ RUN BEFORE PAGE RENDER ----------
35
If (Request("change_type") = "R") Then
36
	QueryName = "BomRemovedProductLocation.sql"
37
	IsProductInNewBom = FALSE
38
 
15 rsolanki 39
ElseIf (Request("change_type") = "U") Then
40
	QueryName = "BomUpdatedProductLocation.sql"
41
	IsProductInNewBom = FALSE
13 rsolanki 42
Else
43
 
44
	QueryName = "BomAddedProductLocation.sql"
45
	IsProductInNewBom = TRUE
46
 
47
End If
48
'----------------------------------------------
49
%>
50
 
51
 
52
		<table width="100%"  border="0" cellspacing="3" cellpadding="0">
53
          <%
54
		  OraDatabase.Parameters.Add "BOM_ID", 			Request("bom_id"),			ORAPARM_INPUT, ORATYPE_NUMBER 
55
		  OraDatabase.Parameters.Add "COMPARE_BOM_ID", 	Request("compare_bom_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
56
		  OraDatabase.Parameters.Add "PROD_ID",  		Request("prod_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
57
 
58
		  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )
59
 
60
		  bgColor = NULL
61
 
62
		  If rsQry.RecordCount < 1 Then
63
		  %>
64
		  <tr>
65
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.
66
			</td>
67
          </tr>
68
		  <%
69
		  End If
70
 
71
 
72
		  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
73
 
74
		  	If IsNull( bgColor ) Then
75
				bgColor = "bgcolor='#F5F5F5'"
76
			Else
77
				bgColor = NULL
78
			End If
79
		  %>
80
		  <tr>
81
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;
82
			<%If IsProductInNewBom Then%>
83
				<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQry("node_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("node_name")%></a>
84
				&nbsp;/&nbsp;<a href="OsDefault.asp?os_id=<%=rsQry("os_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("os_name") %></a>
85
				&nbsp;/&nbsp;<a href="ProdDefault.asp?os_id=<%=rsQry("os_id")%>&prod_id=<%=rsQry("prod_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("pkg_name") &" "& rsQry("pkg_version")%></a>
86
			<%Else%>
87
				<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQry("node_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("node_name")%></a>
88
				&nbsp;/&nbsp;<a href="OsDefault.asp?os_id=<%=rsQry("os_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("os_name") %></a>&nbsp;/&nbsp;
89
			<%End If%>
90
			</td>
91
          </tr>
92
	  	  <%
93
		  	rsQry.MoveNext
94
		  WEnd
95
 
96
		  OraDatabase.Parameters.Remove "BOM_ID"
97
		  OraDatabase.Parameters.Remove "PROD_ID"
98
 
99
		  rsQry.Close
100
		  Set rsQry = Nothing
101
		  %>
102
 
103
 
104
		</table>	
105
 
106
 
107
 
108
<%
109
'------------ RUN AFTER PAGE RENDER -----------
110
'----------------------------------------------
111
%><!--#include file="common/globals_destructor.asp"-->