Subversion Repositories DevTools

Rev

Rev 62 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
62 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddProdGetVersion		 	 |
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 parPkg_id_list
25
Dim objPopupMenuVersions
26
Dim aProductNames
27
Dim numOfRows
28
Dim rowNum
29
'------------ CONSTANTS DECLARATION -----------
30
'------------ VARIABLE INIT -------------------
31
parBom_id = Request("bom_id")
32
parPkg_id_list = Request("pkg_id_list")
33
parOs_id = Request("os_id")
34
'------------ CONDITIONS ----------------------
35
'Set objPopupMenuVersions = New PopupMenuControl
36
'----------------------------------------------
37
%>
38
<%
39
'--------------------------------------------------------------------------------------------------------------------------
40
Sub GetProductNames ( sPkg_id_list, outProductNames )
41
	Dim rsQry, query
42
 
43
	query = _
44
	" SELECT pkg.pkg_id, pkg.pkg_name "&_
45
	"   FROM PACKAGES pkg"&_
46
	"  WHERE pkg.pkg_id IN ("& sPkg_id_list &")"&_
47
	"  ORDER BY UPPER(pkg.pkg_name)"
48
 
49
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
50
 
51
	If rsQry.RecordCount > 0 Then
52
		outProductNames = rsQry.GetRows()
53
	End If
54
 
55
End Sub
56
'--------------------------------------------------------------------------------------------------------------------------
57
Function GetVersions ( nPkg_id )
58
	Dim rsQry, query
59
 
60
	query = _
61
	" SELECT pv.pv_id, pv.pkg_version "&_
62
	"   FROM PACKAGE_VERSIONS pv"&_
63
	"  WHERE pv.pkg_id = :PKG_ID"&_
64
	"  ORDER BY UPPER(pv.pkg_version)"
65
 
66
	OraDatabase.Parameters.Add "PKG_ID", nPkg_id,	ORAPARM_INPUT, ORATYPE_NUMBER
67
 
68
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
69
 
70
	If rsQry.RecordCount > 0 Then
71
		GetVersions = rsQry.GetRows()
72
	Else
73
		GetVersions = NULL
74
	End If
75
 
76
	OraDatabase.Parameters.Remove "PKG_ID"
77
 
78
End Function
79
'--------------------------------------------------------------------------------------------------------------------------
80
Sub RunRequirement ()
81
	On Error Resume Next
82
	objEH.ErrorRedirect = TRUE
83
 
84
	objEH.Try
85
		If Request("pkg_id_list") = "" Then
86
			Err.Raise 8, "Please select at least one Product.", ""
87
 
88
		End If
89
	objEH.Catch
90
 
91
End Sub
92
'--------------------------------------------------------------------------------------------------------------------------
93
%>
94
<%
95
'------------ RUN BEFORE PAGE RENDER ----------
96
objPMod.PersistInQryString ( Array("base_env_id") )
97
 
98
Call RunRequirement()
99
'----------------------------------------------
100
%>
101
<html>
102
<head>
103
<title>Deployment Manager</title>
104
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
105
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
106
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
107
<script language="JavaScript" src="scripts/common.js"></script>
108
</head>
109
 
110
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
111
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
112
  <tr>
113
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add Product </span> <br><br>
114
 
115
      </td>
116
  </tr>
117
  <%
118
  '-- FROM START ---------------------------------------------------------------------------------------------------------
119
  objFormComponent.FormName = "FormVersion"
120
  objFormComponent.Action = "_AddProd.asp"
121
  objFormComponent.OnSubmit = "ShowProgress();"
122
  Call objFormComponent.FormStart()
123
  %>
124
  <tr>
125
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
126
      <tr>
127
        <td><%=ProgressBar()%></td>
128
        <td align="right"><input name="btn" type="reset" class="form_btn" value="&laquo; Back" onClick="history.back();">
129
        <input name="btn" type="reset" class="form_btn" value="Next &raquo;" disabled>
130
        &nbsp;&nbsp;
131
        <input name="btn" type="submit" class="form_btn" value="Add">
132
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
133
      </tr>
134
    </table></td>
135
  </tr>
136
  <tr>
137
    <td>
138
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
139
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
140
      <tr>
141
        <td width="100%" valign="top" nowrap class="body_txt">Enter Product Version, optional Installation Comments and click Add.
142
 
143
          <table width="100%"  border="0" cellspacing="3" cellpadding="0">
144
            <tr>
145
              <td width="1" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
146
              <td width="100%" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
147
            </tr>
148
			<%
149
			Call GetProductNames ( parPkg_id_list, aProductNames )
150
			numOfRows = UBound( aProductNames, 2 )
151
 
152
			For rowNum = 0 To numOfRows
153
			%>
154
            <tr>
155
              <td align="right" valign="top" nowrap class="body_col">Product Name </td>
156
              <td class="body_txt"><img src="icons/i_product.gif" width="19" height="19" hspace="2" align="absmiddle"><%=aProductNames( 1, rowNum )%></td>
157
            </tr>
158
            <tr>
159
              <td align="right" valign="top" nowrap class="body_col">Version</td>
160
              <td class="body_rowg"><%=objFormComponent.ComboWithText ( "pkgid"& aProductNames( 0, rowNum ), NULL, GetVersions( aProductNames( 0, rowNum ) ), "class='form_ivalue'" )%></td>
161
            </tr>
162
            <tr>
163
              <td align="right" valign="top" nowrap class="body_col">Installation Comments</td>
164
              <td class="body_rowg"><%=objFormComponent.TextArea ( "comments"& aProductNames( 0, rowNum ), NULL, 5, 60, "class='form_ivalue'" )%><br><br><br></td>
165
            </tr>
166
            <tr>
167
              <td colspan="2" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
168
            </tr>
169
			<%
170
			Next
171
			%>
172
          </table></td>
173
        </tr>
174
 
175
    </table>
176
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
177
    </td>
178
  </tr>
179
  <%=objPMod.ComposeHiddenTags()%>
180
  <input type="hidden" name="pkg_id_list" value="<%=parPkg_id_list%>">
181
  <input type="hidden" name="action" value="true">
182
  <%
183
  Call objFormComponent.FormEnd()
184
  '-- FROM END ----------------------------------------------------------------------------------------------------------------
185
  %>
186
</table>
187
</body>
188
</html>
189
<%
190
'------------ RUN AFTER PAGE RENDER -----------
191
'Set objFormCollector = Nothing
192
Set objFormComponent = Nothing
193
'----------------------------------------------
194
%><!--#include file="common/globals_destructor.asp"-->