Subversion Repositories DevTools

Rev

Rev 29 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 5355
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|			          wRevertProducts                |
5
'|			          wRevertProducts                |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
Response.Expires = 0
11
Response.Expires = 0
12
%>
12
%>
13
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<%
17
<%
18
'------------ ACCESS CONTROL ------------------
18
'------------ ACCESS CONTROL ------------------
19
%>
19
%>
20
<!--#include file="_access_control_general.asp"-->
20
<!--#include file="_access_control_general.asp"-->
21
<%
21
<%
22
'------------ VARIABLE DEFINITION -------------
22
'------------ VARIABLE DEFINITION -------------
23
Dim rsQry
23
Dim rsQry
24
Dim aProducts
24
Dim aProducts
25
Dim numOfRows
25
Dim numOfRows
26
Dim rowNum
26
Dim rowNum
27
Dim objFormCollector
27
Dim objFormCollector
28
Dim currPkg_id
28
Dim currPkg_id
29
'------------ CONSTANTS DECLARATION -----------
29
'------------ CONSTANTS DECLARATION -----------
30
'------------ VARIABLE INIT -------------------
30
'------------ VARIABLE INIT -------------------
31
parBom_id = Request("bom_id")
31
parBom_id = Request("bom_id")
32
Set objFormCollector = CreateObject("Scripting.Dictionary")
32
Set objFormCollector = CreateObject("Scripting.Dictionary")
33
'------------ CONDITIONS ----------------------
33
'------------ CONDITIONS ----------------------
34
'----------------------------------------------
34
'----------------------------------------------
35
%>
35
%>
36
<%
36
<%
37
'----------------------------------------------------------------------------------------------------------------------------------
37
'----------------------------------------------------------------------------------------------------------------------------------
38
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
38
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
39
	Dim rsQry, query
39
	Dim rsQry, query
40
	OraDatabase.Parameters.Add "BOM_ID", 		nBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
40
	OraDatabase.Parameters.Add "BOM_ID", 		nBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
41
	
41
	
42
	query = _
42
	query = _
43
	"  SELECT rt.RTAG_ID, "&_
43
	"  SELECT rt.RTAG_ID, "&_
44
	"	      rt.RTAG_NAME, "&_
44
	"	      rt.RTAG_NAME, "&_
45
	"	      bo.PARENT_BOM_ID "&_
45
	"	      bo.PARENT_BOM_ID "&_
46
	"	 FROM RELEASE_TAGS rt,"&_
46
	"	 FROM RELEASE_TAGS rt,"&_
47
	"	 	   BOMS bo"&_
47
	"	 	   BOMS bo"&_
48
	"	WHERE bo.RTAG_ID_FK = rt.RTAG_ID"&_
48
	"	WHERE bo.RTAG_ID_FK = rt.RTAG_ID"&_
49
	"	  AND bo.BOM_ID = :BOM_ID"
49
	"	  AND bo.BOM_ID = :BOM_ID"
50
	
50
	
51
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
51
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
52
	If (NOT rsQry.BOF) AND (NOT rsQry.EOF)Then
52
	If (NOT rsQry.BOF) AND (NOT rsQry.EOF)Then
53
		outobjDetails.Item ("rtag_id_fk") = rsQry("rtag_id")
53
		outobjDetails.Item ("rtag_id_fk") = rsQry("rtag_id")
54
		outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
54
		outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
55
		outobjDetails.Item ("parent_bom_id") = rsQry("parent_bom_id")
55
		outobjDetails.Item ("parent_bom_id") = rsQry("parent_bom_id")
56
	End If
56
	End If
57
	
57
	
58
	
58
	
59
	OraDatabase.Parameters.Remove "BOM_ID"
59
	OraDatabase.Parameters.Remove "BOM_ID"
60
	
60
	
61
	rsQry.Close
61
	rsQry.Close
62
	Set rsQry = Nothing
62
	Set rsQry = Nothing
63
End Sub
63
End Sub
64
'----------------------------------------------------------------------------------------------------------------------------------
64
'----------------------------------------------------------------------------------------------------------------------------------
65
Sub RevertProducts()
65
Sub RevertProducts()
66
	Dim aDiffList, numOfRows, rowNum, OraParameter
66
	Dim aDiffList, numOfRows, rowNum, OraParameter
67
	Const os_id_column = 2
67
	Const os_id_column = 2
68
	Const old_prod_id_column = 1
68
	Const old_prod_id_column = 1
69
	
69
	
70
	'/* Get Updated Versions from Previous BOM */
70
	'/* Get Updated Versions from Previous BOM */
71
	OraDatabase.Parameters.Add "BOM_ID", parBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
71
	OraDatabase.Parameters.Add "BOM_ID", parBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
72
	OraDatabase.Parameters.Add "COMPARE_BOM_ID", objFormCollector.Item("parent_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER  
72
	OraDatabase.Parameters.Add "COMPARE_BOM_ID", objFormCollector.Item("parent_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER  
73
	
73
	
74
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RevertProducts.sql"), ORADYN_DEFAULT )
74
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RevertProducts.sql"), ORADYN_DEFAULT )
75
	
75
	
76
	
76
	
77
	'-- Get Rows
77
	'-- Get Rows
78
	If rsQry.RecordCount > 0 Then
78
	If rsQry.RecordCount > 0 Then
79
		aDiffList = rsQry.GetRows()
79
		aDiffList = rsQry.GetRows()
80
		
80
		
81
	Else
81
	Else
82
		'-- No differences compared to Previous BOM, hence exit
82
		'-- No differences compared to Previous BOM, hence exit
83
		OraDatabase.Parameters.Remove "BOM_ID"
83
		OraDatabase.Parameters.Remove "BOM_ID"
84
		OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
84
		OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
85
		Exit Sub
85
		Exit Sub
86
		
86
		
87
	End If
87
	End If
88
	
88
	
89
	
89
	
90
	
90
	
91
	'/* Revert Versions */
91
	'/* Revert Versions */
92
	On Error Resume Next
92
	On Error Resume Next
93
	
93
	
94
	OraDatabase.Parameters.Add "OLD_PROD_ID", 	0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
94
	OraDatabase.Parameters.Add "OLD_PROD_ID", 	0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
95
	OraDatabase.Parameters.Add "NEW_PROD_ID", 	0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
95
	OraDatabase.Parameters.Add "NEW_PROD_ID", 	0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
96
	OraDatabase.Parameters.Add "OS_ID", 		0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
96
	OraDatabase.Parameters.Add "OS_ID", 		0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
97
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
97
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
98
	
98
	
99
	Set OraParameter = OraDatabase.Parameters
99
	Set OraParameter = OraDatabase.Parameters
100
	
100
	
101
	
101
	
102
	
102
	
103
	objEH.TryORA ( OraSession )
103
	objEH.TryORA ( OraSession )
104
	
104
	
105
	numOfRows = UBound( aDiffList, 2 )
105
	numOfRows = UBound( aDiffList, 2 )
106
 
106
 
107
	
107
	
108
	For rowNum = 0 To numOfRows
108
	For rowNum = 0 To numOfRows
109
		
109
		
110
		If Request("revert_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) ) <> "" Then
110
		If Request("revert_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) ) <> "" Then
111
			OraParameter("OLD_PROD_ID").Value = aDiffList( old_prod_id_column, rowNum )
111
			OraParameter("OLD_PROD_ID").Value = aDiffList( old_prod_id_column, rowNum )
112
			OraParameter("NEW_PROD_ID").Value = Request("revert_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) )
112
			OraParameter("NEW_PROD_ID").Value = Request("revert_"& aDiffList( os_id_column, rowNum ) &"_"& aDiffList( old_prod_id_column, rowNum ) )
113
			OraParameter("OS_ID").Value = aDiffList( os_id_column, rowNum )
113
			OraParameter("OS_ID").Value = aDiffList( os_id_column, rowNum )
114
			
114
			
115
			OraDatabase.ExecuteSQL "BEGIN   pk_Product.Replace_Product ( :OLD_PROD_ID, :NEW_PROD_ID, :OS_ID, :USER_ID );   END;"
115
			OraDatabase.ExecuteSQL "BEGIN   pk_Product.Replace_Product ( :OLD_PROD_ID, :NEW_PROD_ID, :OS_ID, :USER_ID );   END;"
116
		End If
116
		End If
117
		
117
		
118
	Next
118
	Next
119
	
119
	
120
	
120
	
121
	'--- Log Action ---
121
	'--- Log Action ---
122
	'objEH.LogAction  _
122
	'objEH.LogAction  _
123
	'objAccessControl.UserId, _
123
	'objAccessControl.UserId, _
124
	'enumAT_EVENT_COMMENT, _
124
	'enumAT_EVENT_COMMENT, _
125
	'"Sub UpdateProducts for OS list="& Request("spos_id_list"), _
125
	'"Sub UpdateProducts for OS list="& Request("spos_id_list"), _
126
	'SCRIPT_NAME, _
126
	'SCRIPT_NAME, _
127
	'"Updated Products with new versions.", _
127
	'"Updated Products with new versions.", _
128
	'OraDatabase
128
	'OraDatabase
129
	
129
	
130
	
130
	
131
	objEH.CatchORA ( OraSession )	
131
	objEH.CatchORA ( OraSession )	
132
	
132
	
133
	OraDatabase.Parameters.Remove "BOM_ID"
133
	OraDatabase.Parameters.Remove "BOM_ID"
134
	OraDatabase.Parameters.Remove "RTAG_ID"
134
	OraDatabase.Parameters.Remove "RTAG_ID"
135
	OraDatabase.Parameters.Remove "OLD_PROD_ID"
135
	OraDatabase.Parameters.Remove "OLD_PROD_ID"
136
	OraDatabase.Parameters.Remove "NEW_PROD_ID"
136
	OraDatabase.Parameters.Remove "NEW_PROD_ID"
137
	OraDatabase.Parameters.Remove "OS_ID"
137
	OraDatabase.Parameters.Remove "OS_ID"
138
	OraDatabase.Parameters.Remove "USER_ID"
138
	OraDatabase.Parameters.Remove "USER_ID"
139
End Sub
139
End Sub
140
'----------------------------------------------------------------------------------------------------------------------------------
140
'----------------------------------------------------------------------------------------------------------------------------------
141
Function Get_Bom_Name( nBomId )
141
Function Get_Bom_Name( nBomId )
142
 
142
 
143
	OraDatabase.Parameters.Add "BOM_ID", 	nBomId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
143
	OraDatabase.Parameters.Add "BOM_ID", 	nBomId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
144
 
144
 
145
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomDetails.sql"), ORADYN_DEFAULT )
145
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomDetails.sql"), ORADYN_DEFAULT )
146
 
146
 
147
	Get_Bom_Name = rsQry("bom_name") + VBNewLine + rsQry("bom_version") + "." + rsQry("bom_lifecycle")
147
	Get_Bom_Name = rsQry("bom_name") + VBNewLine + rsQry("bom_version") + "." + rsQry("bom_lifecycle")
148
	
148
	
149
	rsQry.Close()
149
	rsQry.Close()
150
 
150
 
151
	Set rsQry = Nothing
151
	Set rsQry = Nothing
152
 
152
 
153
	OraDatabase.Parameters.Remove "BOM_ID"
153
	OraDatabase.Parameters.Remove "BOM_ID"
154
 
154
 
155
End Function
155
End Function
156
'----------------------------------------------------------------------------------------------------------------------------------
156
'----------------------------------------------------------------------------------------------------------------------------------
157
%>
157
%>
158
<%
158
<%
159
'------------ RUN BEFORE PAGE RENDER ----------
159
'------------ RUN BEFORE PAGE RENDER ----------
160
Call GetFormDetails ( parBom_id, objFormCollector )
160
Call GetFormDetails ( parBom_id, objFormCollector )
161
 
161
 
162
If Request("action") <> "" Then	
162
If Request("action") <> "" Then	
163
	' --- Form is Valid ---
163
	' --- Form is Valid ---
164
	Call RevertProducts()
164
	Call RevertProducts()
165
	
165
	
166
	If objEH.Finally Then
166
	If objEH.Finally Then
167
		Call OpenInParentWindow ( Request("rfile") &"?UPDATED=OK"& objPMod.ComposeURLWithout("rfile") )
167
		Call OpenInParentWindow ( Request("rfile") &"?UPDATED=OK"& objPMod.ComposeURLWithout("rfile") )
168
		Call CloseWindow()
168
		Call CloseWindow()
169
	End If
169
	End If
170
End If
170
End If
171
 
171
 
172
'----------------------------------------------
172
'----------------------------------------------
173
%>
173
%>
174
 
174
 
175
 
175
 
176
<html>
176
<html>
177
<head>
177
<head>
178
<SCRIPT LANGUAGE="JavaScript">
178
<SCRIPT LANGUAGE="JavaScript">
179
<!-- Begin
179
<!-- Begin
180
var checkflag = "false";
180
var checkflag = "false";
181
function check(field) {
181
function check(field) {
182
if (checkflag == "false") {
182
if (checkflag == "false") {
183
  for (i = 0; i < field.length; i++) {
183
  for (i = 0; i < field.length; i++) {
184
  field[i].checked = true;}
184
  field[i].checked = true;}
185
  checkflag = "true";
185
  checkflag = "true";
186
  return "Uncheck all"; }
186
  return "Uncheck all"; }
187
else {
187
else {
188
  for (i = 0; i < field.length; i++) {
188
  for (i = 0; i < field.length; i++) {
189
  field[i].checked = false; }
189
  field[i].checked = false; }
190
  checkflag = "false";
190
  checkflag = "false";
191
  return "Check all"; }
191
  return "Check all"; }
192
}
192
}
193
//  End -->
193
//  End -->
194
</script>
194
</script>
195
 
195
 
196
<title>Deployment Manager</title>
196
<title>Deployment Manager</title>
197
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
197
<link rel="shortcut icon" href="<%=FavIcon%>"/>
198
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
198
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
199
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
199
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
200
<script language="JavaScript" src="scripts/common.js"></script>
200
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
201
<style type="text/css">
201
<script language="JavaScript" src="scripts/common.js"></script>
202
<!--
202
<style type="text/css">
203
.style8 {font-size: 12px}
203
<!--
204
-->
204
.style8 {font-size: 12px}
205
</style>
205
-->
206
</head>
206
</style>
207
 
207
</head>
208
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
208
 
209
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
209
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
210
  <tr>
210
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
211
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Revert Products </span> <br>
211
  <tr>
212
    Revert Products, selecting the latest from the Parent BOM.
212
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Revert Products </span> <br>
213
    </td>
213
    Revert Products, selecting the latest from the Parent BOM.
214
  </tr>	
214
    </td>
215
<%
215
  </tr>	
216
'-- FROM START --------------------------------------------------------------------------------------------------------------
216
<%
217
objFormComponent.FormName = "FormName"
217
'-- FROM START --------------------------------------------------------------------------------------------------------------
218
objFormComponent.Action = SCRIPT_NAME
218
objFormComponent.FormName = "FormName"
219
objFormComponent.OnSubmit = "ShowProgress();"
219
objFormComponent.Action = SCRIPT_NAME
220
Call objFormComponent.FormStart()
220
objFormComponent.OnSubmit = "ShowProgress();"
221
%>    
221
Call objFormComponent.FormStart()
222
  <tr>
222
%>    
223
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
223
  <tr>
224
      <tr>
224
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
225
        <td><%=ProgressBar()%>
225
      <tr>
226
          <input name="btn" type="submit" class="form_btn" value="Revert">
226
        <td><%=ProgressBar()%>
227
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
227
          <input name="btn" type="submit" class="form_btn" value="Revert">
228
        <td align="left">&nbsp;        </td>
228
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
229
      </tr>
229
        <td align="left">&nbsp;        </td>
230
    </table></td>
230
      </tr>
231
  </tr>
231
    </table></td>
232
  <tr>
232
  </tr>
233
    <td>
233
  <tr>
234
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
234
    <td>
235
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
235
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
236
      <tr>
236
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
237
        <td width="100%" valign="top" nowrap class="body_txt">
237
      <tr>
238
		  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
238
        <td width="100%" valign="top" nowrap class="body_txt">
239
		  <!--#include file="messages/_msg_inline.asp"-->
239
		  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
240
		  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
240
		  <!--#include file="messages/_msg_inline.asp"-->
241
		  <%
241
		  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
242
		  If objFormCollector.Item("parent_bom_id") = "" Then
242
		  <%
243
			Call Messenger ( "This BOM does not have Parent BOM Reference release.", 1, "100%" )
243
		  If objFormCollector.Item("parent_bom_id") = "" Then
244
		  End If
244
			Call Messenger ( "This BOM does not have Parent BOM Reference release.", 1, "100%" )
245
		  %>
245
		  End If
246
		  <!-- REVERT PRODUCTS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
246
		  %>
247
		  Select Products and click Revert.
247
		  <!-- REVERT PRODUCTS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
248
          <table width="100%"  border="0" cellspacing="3" cellpadding="0">
248
		  Select Products and click Revert.
249
            <tr>
249
          <table width="100%"  border="0" cellspacing="3" cellpadding="0">
250
			  <td width="1%" nowrap background="images/bg_bage_0h.gif" class="body_col">Revert</td>
250
            <tr>
251
              <td width="40%" align="right" nowrap background="images/bg_bage_0h.gif" class="body_col"><div align="left">Location</div></td>
251
			  <td width="1%" nowrap background="images/bg_bage_0h.gif" class="body_col">Revert</td>
252
              <td width="20%" align="right" nowrap background="images/bg_bage_0h.gif" class="body_col"><div align="left">Current Version</div></td>
252
              <td width="40%" align="right" nowrap background="images/bg_bage_0h.gif" class="body_col"><div align="left">Location</div></td>
253
              <td align="right" background="images/bg_bage_0h.gif" class="body_col"><div align="left"><img src="images/spacer.gif" width="1" height="18" align="absmiddle"><%=Get_Bom_Name(objFormCollector.Item("parent_bom_id"))%></div>                <div align="left"></div></td>
253
              <td width="20%" align="right" nowrap background="images/bg_bage_0h.gif" class="body_col"><div align="left">Current Version</div></td>
254
              </tr>	  
254
              <td align="right" background="images/bg_bage_0h.gif" class="body_col"><div align="left"><img src="images/spacer.gif" width="1" height="18" align="absmiddle"><%=Get_Bom_Name(objFormCollector.Item("parent_bom_id"))%></div>                <div align="left"></div></td>
255
			<%
255
              </tr>	  
256
			OraDatabase.Parameters.Add "BOM_ID", parBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
256
			<%
257
			OraDatabase.Parameters.Add "COMPARE_BOM_ID", objFormCollector.Item("parent_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER 
257
			OraDatabase.Parameters.Add "BOM_ID", parBom_id,		ORAPARM_INPUT, ORATYPE_NUMBER 
258
			
258
			OraDatabase.Parameters.Add "COMPARE_BOM_ID", objFormCollector.Item("parent_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER 
259
			Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RevertProducts.sql"), ORADYN_DEFAULT )
259
			
260
			currPkg_id = 0
260
			Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RevertProducts.sql"), ORADYN_DEFAULT )
261
			%>
261
			currPkg_id = 0
262
			<%If rsQry.RecordCount < 1 Then%>
262
			%>
263
			<tr>
263
			<%If rsQry.RecordCount < 1 Then%>
264
              <td colspan="5" class="body_row">No Products to Revert.                 </td>
264
			<tr>
265
            </tr>
265
              <td colspan="5" class="body_row">No Products to Revert.                 </td>
266
			<%End If%>
266
            </tr>
267
			<%
267
			<%End If%>
268
			While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
268
			<%
269
		
269
			While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
270
			
270
		
271
			
271
			
272
			%>
272
			
273
			<%If currPkg_id <> rsQry("pkg_id") Then%>
273
			%>
274
            <tr>
274
			<%If currPkg_id <> rsQry("pkg_id") Then%>
275
			  <td nowrap><div align="left"><span class="body_row"><img src="icons/i_product.gif" width="19" height="19" hspace="2" align="absmiddle"><%=rsQry("prod_name")%>                                                                     				   </span></div></td>
275
            <tr>
276
              <td nowrap></td>
276
			  <td nowrap><div align="left"><span class="body_row"><img src="icons/i_product.gif" width="19" height="19" hspace="2" align="absmiddle"><%=rsQry("prod_name")%>                                                                     				   </span></div></td>
277
              <td nowrap class="body_row">&nbsp;</td>
277
              <td nowrap></td>
278
              <td nowrap class="body_row"><div align="center"></div></td>
278
              <td nowrap class="body_row">&nbsp;</td>
279
              <td nowrap class="body_row"></td>
279
              <td nowrap class="body_row"><div align="center"></div></td>
280
              </tr>
280
              <td nowrap class="body_row"></td>
281
			<tr>
281
              </tr>
282
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
282
			<tr>
283
            </tr>
283
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
284
			<%currPkg_id = rsQry("pkg_id")%>
284
            </tr>
285
			<%End If%>
285
			<%currPkg_id = rsQry("pkg_id")%>
286
			
286
			<%End If%>
287
            <tr>
287
			
288
              <td align="center" nowrap><input type="checkbox" name="revert_<%=rsQry("os_id") &"_"& rsQry("prod_id")%>" value="<%=rsQry("old_prod_id")%>"> </td>
288
            <tr>
289
              <td nowrap class="body_row"><img hspace="2" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><%=rsQry("prod_location")%></td>
289
              <td align="center" nowrap><input type="checkbox" name="revert_<%=rsQry("os_id") &"_"& rsQry("prod_id")%>" value="<%=rsQry("old_prod_id")%>"> </td>
290
              <td nowrap class="body_row"><%=rsQry("prod_version")%></td>
290
              <td nowrap class="body_row"><img hspace="2" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><%=rsQry("prod_location")%></td>
291
              <td nowrap class="body_row"><span class="body_txtr"><%=rsQry("old_pkg_version")%></span></td>
291
              <td nowrap class="body_row"><%=rsQry("prod_version")%></td>
292
              </tr>
292
              <td nowrap class="body_row"><span class="body_txtr"><%=rsQry("old_pkg_version")%></span></td>
293
			<tr>
293
              </tr>
294
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
294
			<tr>
295
            </tr>			
295
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
296
            <%rsQry.MoveNext
296
            </tr>			
297
			Wend
297
            <%rsQry.MoveNext
298
			%>
298
			Wend
299
		  
299
			%>
300
 
300
		  
301
			
301
 
302
			<tr>
302
			
303
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="3"></td>
303
			<tr>
304
            </tr>
304
              <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="3"></td>
305
          </table>
305
            </tr>
306
		  
306
          </table>
307
		  
307
		  
308
		  <%
308
		  
309
		  OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
309
		  <%
310
		  OraDatabase.Parameters.Remove "BOM_ID"
310
		  OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
311
		  rsQry.Close
311
		  OraDatabase.Parameters.Remove "BOM_ID"
312
		  Set rsQry = Nothing
312
		  rsQry.Close
313
		  %>		  </td>
313
		  Set rsQry = Nothing
314
        </tr>
314
		  %>		  </td>
315
    </table>
315
        </tr>
316
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
316
    </table>
317
    </td>
317
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
318
  </tr>
318
    </td>
319
  <%=objPMod.ComposeHiddenTags()%>
319
  </tr>
320
  <input type="hidden" name="action" value="true">
320
  <%=objPMod.ComposeHiddenTags()%>
321
<%
321
  <input type="hidden" name="action" value="true">
322
Call objFormComponent.FormEnd()
322
<%
323
'-- FROM END ----------------------------------------------------------------------------------------------------------------
323
Call objFormComponent.FormEnd()
324
%>
324
'-- FROM END ----------------------------------------------------------------------------------------------------------------
325
</table>
325
%>
326
</body>
326
</table>
327
</html>
327
</body>
328
<%
328
</html>
329
'------------ RUN AFTER PAGE RENDER -----------
329
<%
330
'----------------------------------------------
330
'------------ RUN AFTER PAGE RENDER -----------
331
%><!--#include file="common/globals_destructor.asp"-->
331
'----------------------------------------------
-
 
332
%><!--#include file="common/globals_destructor.asp"-->