| 62 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| wAddProd |
|
|
|
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 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
17 |
<%
|
|
|
18 |
'------------ ACCESS CONTROL ------------------
|
|
|
19 |
%>
|
|
|
20 |
<!--#include file="_access_control_general.asp"-->
|
|
|
21 |
<%
|
|
|
22 |
'------------ VARIABLE DEFINITION -------------
|
|
|
23 |
Dim rsQry
|
|
|
24 |
Dim objFormCollector
|
|
|
25 |
Dim sMessage
|
|
|
26 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
27 |
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
|
|
|
28 |
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
|
|
|
29 |
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
|
|
|
30 |
'------------ VARIABLE INIT -------------------
|
|
|
31 |
sMessage = NULL
|
|
|
32 |
parBom_id = Request("bom_id")
|
|
|
33 |
parOs_id = Request("os_id")
|
|
|
34 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
35 |
'------------ CONDITIONS ----------------------
|
|
|
36 |
'----------------------------------------------
|
|
|
37 |
%>
|
|
|
38 |
<%
|
|
|
39 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
40 |
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
|
|
|
41 |
Dim rsQry, query
|
|
|
42 |
OraDatabase.Parameters.Add "BOM_ID", nBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
43 |
|
|
|
44 |
query = _
|
|
|
45 |
" SELECT bo.RTAG_ID_FK,"&_
|
|
|
46 |
" rm_proj.PROJ_ID,"&_
|
|
|
47 |
" rm_proj.PROJ_NAME,"&_
|
|
|
48 |
" rt.RTAG_NAME"&_
|
|
|
49 |
" FROM BOMS bo,"&_
|
|
|
50 |
" PROJECTS rm_proj,"&_
|
|
|
51 |
" RELEASE_TAGS rt"&_
|
|
|
52 |
" WHERE rt.PROJ_ID = rm_proj.PROJ_ID"&_
|
|
|
53 |
" AND bo.RTAG_ID_FK = rt.RTAG_ID"&_
|
|
|
54 |
" AND bo.BOM_ID = :BOM_ID"
|
|
|
55 |
|
|
|
56 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
57 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF)Then
|
|
|
58 |
outobjDetails.Item ("rtag_id_fk") = rsQry("rtag_id_fk")
|
|
|
59 |
outobjDetails.Item ("proj_id") = rsQry("proj_id")
|
|
|
60 |
outobjDetails.Item ("proj_name") = rsQry("proj_name")
|
|
|
61 |
outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
|
|
|
62 |
|
|
|
63 |
End If
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
67 |
|
|
|
68 |
rsQry.Close
|
|
|
69 |
Set rsQry = Nothing
|
|
|
70 |
End Sub
|
|
|
71 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
72 |
Sub AddProdToBaseEnv ()
|
|
|
73 |
On Error Resume Next
|
|
|
74 |
|
|
|
75 |
OraDatabase.Parameters.Add "PROD_ID_LIST", Request("prod_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
76 |
OraDatabase.Parameters.Add "BASE_ENV_ID", Request("base_env_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
77 |
OraDatabase.Parameters.Add "OS_ID", Request("os_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
78 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
objEH.TryORA ( OraSession )
|
|
|
82 |
|
|
|
83 |
OraDatabase.ExecuteSQL _
|
|
|
84 |
"BEGIN pk_Base_Env.Add_Product ( :PROD_ID_LIST, :BASE_ENV_ID, :OS_ID, :USER_ID ); END;"
|
|
|
85 |
|
|
|
86 |
objEH.CatchORA ( OraSession )
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
OraDatabase.Parameters.Remove "PROD_ID_LIST"
|
|
|
90 |
OraDatabase.Parameters.Remove "BASE_ENV_ID"
|
|
|
91 |
OraDatabase.Parameters.Remove "OS_ID"
|
|
|
92 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
93 |
End Sub
|
|
|
94 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
95 |
Sub AddProdToOs ()
|
|
|
96 |
On Error Resume Next
|
|
|
97 |
|
|
|
98 |
OraDatabase.Parameters.Add "PROD_ID_LIST", Request("prod_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
99 |
OraDatabase.Parameters.Add "OS_ID", Request("os_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
100 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
101 |
|
|
|
102 |
objEH.TryORA ( OraSession )
|
|
|
103 |
|
|
|
104 |
OraDatabase.ExecuteSQL _
|
|
|
105 |
"BEGIN pk_Product.Add_Product ( :PROD_ID_LIST, :OS_ID, :USER_ID ); END;"
|
|
|
106 |
|
|
|
107 |
objEH.CatchORA ( OraSession )
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
OraDatabase.Parameters.Remove "PROD_ID_LIST"
|
|
|
111 |
OraDatabase.Parameters.Remove "OS_ID"
|
|
|
112 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
113 |
End Sub
|
|
|
114 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
115 |
%>
|
|
|
116 |
<%
|
|
|
117 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
118 |
objPMod.PersistInQryString ( Array("base_env_id") )
|
|
|
119 |
|
|
|
120 |
If CBool(Request("action")) Then
|
|
|
121 |
If Request("prod_id_list") <> "" Then
|
|
|
122 |
|
|
|
123 |
'-- Add Product List
|
|
|
124 |
If Request("base_env_id") = "" Then
|
|
|
125 |
Call AddProdToOs()
|
|
|
126 |
Else
|
|
|
127 |
Call AddProdToBaseEnv()
|
|
|
128 |
End If
|
|
|
129 |
|
|
|
130 |
If objEH.Finally Then
|
|
|
131 |
Call OpenInParentWindow ( Request("rfile") &"?ADDED=OK"& objPMod.ComposeURLWithout("rfile,base_env_id") )
|
|
|
132 |
Call CloseWindow()
|
|
|
133 |
End If
|
|
|
134 |
|
|
|
135 |
Else
|
|
|
136 |
sMessage = "Please select Product(s) from Release Manager list then click Add."
|
|
|
137 |
|
|
|
138 |
End If
|
|
|
139 |
|
|
|
140 |
End If
|
|
|
141 |
|
|
|
142 |
Call GetFormDetails ( parBom_id, objFormCollector )
|
|
|
143 |
'----------------------------------------------
|
|
|
144 |
%>
|
|
|
145 |
<html>
|
|
|
146 |
<head>
|
|
|
147 |
<title>Deployment Manager</title>
|
|
|
148 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
149 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
150 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
|
|
151 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
152 |
</head>
|
|
|
153 |
|
|
|
154 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormSearch.prod_name.focus();">
|
|
|
155 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
156 |
<tr>
|
|
|
157 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Add Product </span> <br>
|
|
|
158 |
Search for Product, Create New Product or select from Release Manager list.
|
|
|
159 |
</td>
|
|
|
160 |
</tr>
|
|
|
161 |
|
|
|
162 |
<%
|
|
|
163 |
'-- FROM START ---------------------------------------------------------------------------------------------------------------
|
|
|
164 |
objFormComponent.FormName = "FormSearch"
|
|
|
165 |
objFormComponent.Action = "wAddProdBySearch.asp"
|
|
|
166 |
Call objFormComponent.FormStart()
|
|
|
167 |
%>
|
|
|
168 |
<tr>
|
|
|
169 |
<td background="images/bg_quicksearch.gif" class="body_txt"><table width="100" border="0" cellspacing="3" cellpadding="0">
|
|
|
170 |
<tr>
|
|
|
171 |
<td nowrap class="body_txtw"><strong>Product Search</strong> </td>
|
|
|
172 |
<td><input name="prod_name" type="text" class="body_txt" size="20"></td>
|
|
|
173 |
<td><input name="btn" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
|
|
|
174 |
</tr>
|
|
|
175 |
</table></td>
|
|
|
176 |
</tr>
|
|
|
177 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
178 |
<%
|
|
|
179 |
Call objFormComponent.FormEnd()
|
|
|
180 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
181 |
%>
|
|
|
182 |
|
|
|
183 |
<%
|
|
|
184 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
185 |
objFormComponent.FormName = "FormName"
|
|
|
186 |
objFormComponent.Action = SCRIPT_NAME
|
|
|
187 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
188 |
Call objFormComponent.FormStart()
|
|
|
189 |
%>
|
|
|
190 |
<tr>
|
|
|
191 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
192 |
<tr>
|
|
|
193 |
<td><%=ProgressBar()%></td>
|
|
|
194 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Add">
|
|
|
195 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
|
|
|
196 |
</tr>
|
|
|
197 |
</table></td>
|
|
|
198 |
</tr>
|
|
|
199 |
<tr>
|
|
|
200 |
<td>
|
|
|
201 |
<!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
202 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
|
|
203 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
204 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
205 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
206 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
207 |
<tr>
|
|
|
208 |
<td width="50%" valign="top" class="body_txt"><strong>Create New</strong><br>
|
|
|
209 |
<a href="wAddProdNew.asp?NEW=OK&<%=objPMod.ComposeURL()%>" class="menu_link"><img src="icons/i_product_new.gif" width="15" height="17" hspace="5" vspace="3" border="0" align="absmiddle">Product</a><br>
|
|
|
210 |
</td>
|
|
|
211 |
<td width="1" background="images/bg_bage_2.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
212 |
<td width="50%" valign="top" nowrap class="body_txt"><strong>Add from Release Manager</strong><br>
|
|
|
213 |
<%If (objFormCollector.Item("rtag_id_fk") <> "") Then%>
|
|
|
214 |
<%=objFormCollector.Item ("proj_name") &" / "& objFormCollector.Item ("rtag_name")%>
|
|
|
215 |
<%Else%>
|
|
|
216 |
<%Call Messenger ( "This BOM does not have Release Manager Reference release.<br>Please edit BOM properties first.<br>" , 1, "100%" )%>
|
|
|
217 |
<%End If%>
|
|
|
218 |
<br>
|
|
|
219 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
220 |
<tr>
|
|
|
221 |
<td width="1"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
222 |
<td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
223 |
</tr>
|
|
|
224 |
<%
|
|
|
225 |
' -- Only run if links with Release Manager
|
|
|
226 |
If (objFormCollector.Item("rtag_id_fk") <> "") Then
|
|
|
227 |
|
|
|
228 |
'===== Release Manager PRODUCTS =====
|
|
|
229 |
OraDatabase.Parameters.Add "RTAG_ID_FK", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
230 |
OraDatabase.Parameters.Add "enumPRODUCTS_BASE_VIEW_ID", enumPRODUCTS_BASE_VIEW_ID, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
231 |
OraDatabase.Parameters.Add "enumAUTOPRODUCTS_BASE_VIEW_ID", enumAUTOPRODUCTS_BASE_VIEW_ID, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
232 |
OraDatabase.Parameters.Add "OS_ID", parOs_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
233 |
|
|
|
234 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ReleaseManagerProductsView.sql"), ORADYN_DEFAULT )
|
|
|
235 |
|
|
|
236 |
If rsQry.RecordCount < 1 Then
|
|
|
237 |
Response.write "No Products Found."
|
|
|
238 |
End If
|
|
|
239 |
|
|
|
240 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
241 |
%>
|
|
|
242 |
<tr>
|
|
|
243 |
<td nowrap class="form_iname"><input type="checkbox" name="prod_id_list" value="<%=rsQry("prod_id")%>" <%=rsQry("used")%>></td>
|
|
|
244 |
<td nowrap class="body_txt"><%=Eval( rsQry("icon") )%><%=rsQry("pkg_name") &" "& rsQry("pkg_version")%></td>
|
|
|
245 |
</tr>
|
|
|
246 |
<%rsQry.MoveNext%>
|
|
|
247 |
<%
|
|
|
248 |
WEnd
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
%>
|
|
|
253 |
</table>
|
|
|
254 |
<br><br>
|
|
|
255 |
<!-- NEW PATCHES ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
256 |
<strong>Add New Patches</strong><br>
|
|
|
257 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
258 |
<%
|
|
|
259 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ReleaseManagerProductsUnusedPatches.sql"), ORADYN_DEFAULT )
|
|
|
260 |
|
|
|
261 |
If rsQry.RecordCount < 1 Then
|
|
|
262 |
Response.write "No New Patches Found."
|
|
|
263 |
End If
|
|
|
264 |
|
|
|
265 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
266 |
%>
|
|
|
267 |
<tr>
|
|
|
268 |
<td nowrap class="form_iname"><input type="checkbox" name="prod_id_list" value="<%=rsQry("prod_id")%>"></td>
|
|
|
269 |
<td nowrap class="body_txt"><%=LIMG_PRODUCT_PATCH%><%=rsQry("pkg_name") &" "& rsQry("pkg_version")%></td>
|
|
|
270 |
</tr>
|
|
|
271 |
<%rsQry.MoveNext%>
|
|
|
272 |
<%
|
|
|
273 |
WEnd
|
|
|
274 |
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
OraDatabase.Parameters.Remove "RM_BRANCH_ID"
|
|
|
278 |
OraDatabase.Parameters.Remove "enumPRODUCTS_BASE_VIEW_ID"
|
|
|
279 |
OraDatabase.Parameters.Remove "enumAUTOPRODUCTS_BASE_VIEW_ID"
|
|
|
280 |
OraDatabase.Parameters.Remove "OS_ID"
|
|
|
281 |
|
|
|
282 |
End If
|
|
|
283 |
%>
|
|
|
284 |
</table></td>
|
|
|
285 |
<td width="1" valign="top" class="body_txt"><img src="images/spacer.gif" width="1" height="320"></td>
|
|
|
286 |
</tr>
|
|
|
287 |
</table>
|
|
|
288 |
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
289 |
</td>
|
|
|
290 |
</tr>
|
|
|
291 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
292 |
<input type="hidden" name="action" value="true">
|
|
|
293 |
<%
|
|
|
294 |
Call objFormComponent.FormEnd()
|
|
|
295 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
296 |
%>
|
|
|
297 |
</table>
|
|
|
298 |
</body>
|
|
|
299 |
</html>
|
|
|
300 |
<%
|
|
|
301 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
302 |
Set objFormCollector = Nothing
|
|
|
303 |
'----------------------------------------------
|
|
|
304 |
%><!--#include file="common/globals_destructor.asp"-->
|