Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
62 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("current_bom_id")
26
'------------ CONDITIONS ----------------------
27
'----------------------------------------------
28
'------------ ACCESS CONTROL ------------------
29
%>
30
<!--#include file="_access_control_general.asp"-->
31
<%
32
'--------------------------------------------------------------------------------------------------------------
33
'--------------------------------------------------------------------------------------------------------------
34
%>
35
<%
36
'------------ RUN BEFORE PAGE RENDER ----------
37
If (Request("change_type") = "R") Then
38
	QueryName = "BomRemovedProductLocation.sql"
39
	IsProductInNewBom = FALSE
40
 
41
ElseIf (Request("change_type") = "U") Then
42
	QueryName = "BomUpdatedProductLocation.sql"
43
	IsProductInNewBom = FALSE
44
Else
45
 
46
	QueryName = "PatchCompare.sql"
47
	IsProductInNewBom = TRUE
48
 
49
End If
50
'----------------------------------------------
51
%>
52
 
53
 
54
		<table width="100%"  border="0" cellspacing="3" cellpadding="0">
55
          <%
56
 
57
		  OraDatabase.Parameters.Add "BOM_ID", 			Request("bom_id"),			ORAPARM_INPUT, ORATYPE_NUMBER 
58
		  OraDatabase.Parameters.Add "COMPARE_BOM_ID", 	Request("compare_bom_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
59
		  OraDatabase.Parameters.Add "PROD_ID",  		Request("prod_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
60
		  OraDatabase.Parameters.Add "PKG_ID",  		Request("pkg_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
61
		  OraDatabase.Parameters.Add "CURRENT_BOM_ID",  Request("current_bom_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
62
 
63
 
64
		  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )
65
 
66
		  bgColor = NULL
67
 
68
		  If rsQry.RecordCount < 1 Then
69
		  %>
70
		  <tr>
71
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.
72
			</td>
73
          </tr>
74
		  <%
75
		  End If
76
 
77
 
78
		  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
79
 
80
		  	If IsNull( bgColor ) Then
81
				bgColor = "bgcolor='#F5F5F5'"
82
			Else
83
				bgColor = NULL
84
			End If
85
		  %>
86
		  <tr>
87
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;
88
			<%If IsProductInNewBom Then%>
89
				<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><%=rsQry("node_name")%>
90
				&nbsp;/&nbsp;<%=rsQry("os_name") %>
91
				&nbsp;/&nbsp;<%=rsQry("pkg_name") &" "& rsQry("pkg_version")%>
92
			<%Else%>
93
				<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><%=rsQry("node_name")%>
94
				&nbsp;/&nbsp;<%=rsQry("os_name") %>&nbsp;/&nbsp;
95
			<%End If%>
96
			</td>
97
 
98
		<%
99
			Dim rsForm, Tester, Manager
100
			Tester = False
101
			Manager = False
102
			If objAccessControl.IsActive("ApprovedByManager") Then
103
				Manager = True
104
			ElseIf objAccessControl.IsActive("ApprovedByTester") Then
105
				Tester = True
106
			End If
107
 
108
 
109
			Set rsForm = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION WHERE PV_ID="&rsQry("prod_id")&" AND BOM_ID="&parBomId, ORADYN_DEFAULT)%>
110
			<%If rsForm.RecordCount = 0 Then%>
111
				<%If Tester Then%>
112
					<td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=rsQry("prod_id")%>&bom_id=<%=parBomId%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=rsQry("prod_id")%>&bom_id=<%=parBomId%>', 'Approval Form', 'height=220,width=600,scrollbars=yes,resizable=yes'); return false" target="_blank" style="text-decoration:none" class="body_txtr">Approve</a></td>
113
				<%ElseIf Manager Then%>
114
					<td class="body_txto">Awaiting Tester</td>
115
				<%Else%>
116
					<td class="body_txto"></td>
117
				<%End If%>	
118
			<%ElseIf IsNull(rsForm("is_official")) Then%>
119
				<%If NOT IsNull(rsForm("tester_id")) And Tester	Then %>
120
					<td class="body_txto">Awaiting</td>
121
				<%ElseIf NOT IsNull(rsForm("tester_id")) And Manager Then%>
122
					<td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=rsQry("prod_id")%>&bom_id=<%=parBomId%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=rsQry("prod_id")%>&bom_id=<%=parBomId%>', 'Approval Form', 'height=440,width=600,scrollbars=yes,resizable=yes'); return false" target="_blank" style="text-decoration:none" class="body_txtr">Approve</a></td>
123
				<%Else%>
124
					<td class="body_rowlite"></td>
125
				<%End If%>
126
			<%Else%>
127
				<td class="body_txtg">Approved</td>
128
			<%End If
129
 
130
			rsForm.Close()
131
			Set rsForm = nothing
132
			%>			
133
          </tr>
134
	  	  <%
135
		  	rsQry.MoveNext
136
		  WEnd
137
 
138
		  OraDatabase.Parameters.Remove "BOM_ID"
139
		  OraDatabase.Parameters.Remove "PROD_ID"
140
		  OraDatabase.Parameters.Remove "PKG_ID"
141
		  OraDatabase.Parameters.Remove "CURRENT_BOM_ID"
142
		  OraDatabase.Parameters.Remove "COMPARE_BOM_ID" 
143
 
144
		  rsQry.Close
145
		  Set rsQry = Nothing
146
		  %>
147
 
148
 
149
		</table>	
150
 
151
 
152
 
153
<%
154
'------------ RUN AFTER PAGE RENDER -----------
155
'----------------------------------------------
156
%><!--#include file="common/globals_destructor.asp"-->