Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5355 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddProdBySearch			 	 |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/config.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<%
24
'------------ VARIABLE DEFINITION -------------
25
Dim rsQry
26
Dim parProcess_name
27
Dim parPv_id
28
'------------ CONSTANTS DECLARATION -----------
29
'------------ VARIABLE INIT -------------------
30
parBom_id = Request("bom_id")
31
parProcess_name = Request("prod_name")
32
parOs_id = Request("os_id")
33
'------------ CONDITIONS ----------------------
34
'----------------------------------------------
35
%>
36
<%
37
'--------------------------------------------------------------------------------------------------------------------------
38
Function SearchProcessNamesQuery ( sProcess_name )
39
	Dim tempSTR
40
	tempSTR = GetQuery ("ProcessNameSearch.sql")
41
	SearchProcessNamesQuery = Replace ( tempSTR, ":PROCESS_NAME", sProcess_name )
42
End Function
43
'--------------------------------------------------------------------------------------------------------------------------
44
%>
45
<%
46
'------------ RUN BEFORE PAGE RENDER ----------
47
'objPMod.PersistInQryString ( Array("base_env_id") )
48
'----------------------------------------------
49
If CBool(Request("action")) Then
50
 
51
	On Error Resume Next
52
 
53
	OraDatabase.Parameters.Add "PROC_ID_LIST", 	Request("proc_id_list"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
54
	OraDatabase.Parameters.Add "PROD_ID", 		Request("prod_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER 
55
	OraDatabase.Parameters.Add "OS_ID", 		Request("os_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER 
56
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
57
 
58
	objEH.TryORA ( OraSession )
59
 
60
	OraDatabase.ExecuteSQL _
61
	"BEGIN   PK_OPERATING_SYSTEM.ADD_PACKAGE_PROCESS ( :PROC_ID_LIST, :PROD_ID, :OS_ID, :USER_ID );   END;"
62
 
63
	objEH.CatchORA ( OraSession )
64
 
65
	OraDatabase.Parameters.Remove "PROC_ID_LIST"
66
	OraDatabase.Parameters.Remove "PROD_ID"	
67
	OraDatabase.Parameters.Remove "OS_ID"
68
	OraDatabase.Parameters.Remove "USER_ID"	
69
 
70
 
71
 
72
	If objEH.Finally Then
73
		Call OpenInParentWindow ("Os_Processes.asp?bom_id="& parBom_id &"&os_id="& parOs_id)
74
		Call CloseWindow()
75
	End If	
76
 
77
End If
78
%>
79
<html>
80
<head>
81
<title>Release Manager</title>
82
<link rel="shortcut icon" href="<%=FavIcon%>"/>
83
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
84
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
85
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
86
<script language="JavaScript" src="scripts/common.js"></script>
87
</head>
88
 
89
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
90
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
91
  <tr>
92
    <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 Process </span> <br><br>
93
 
94
      </td>
95
  </tr>
96
  <form name="FormSearch" method="post" action="wAddProcessBySearch.asp">
97
  <tr>
98
    <td background="images/bg_quicksearch.gif" class="body_txt"><table width="100" border="0" cellspacing="3" cellpadding="0">
99
 
100
        <tr>
101
          <td nowrap class="body_txtw"><strong>Process Search</strong> </td>
102
          <td><input name="prod_name" type="text" class="body_txt" size="20" value="<%=parProcess_name%>"></td>
103
          <td><input name="btnSearch" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
104
        </tr>
105
      </table></td>
106
  </tr>
107
  <%=objPMod.ComposeHiddenTags()%>
108
  </form>
109
  <form name="FormName" method="post" action="<%=ScriptName%>">
110
  <tr>
111
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
112
      <tr>
113
        <td>&nbsp;</td>
114
        <td align="right"><input name="btn" type="reset" class="form_btn" value="&laquo; Back" onClick="history.back();">
115
        &nbsp;&nbsp;
116
        <input name="btn" type="submit" class="form_btn" value="Add">
117
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
118
      </tr>
119
    </table></td>
120
  </tr>
121
  <tr>
122
    <td>
123
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
124
<%If parProcess_name <> "" Then%>
125
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
126
      <tr>
127
        <td width="100%" valign="top" nowrap class="body_txt">Search result for <strong><%=parProcess_name%></strong> <br>
128
          <br>
129
		  <%
130
		  Set rsQry = OraDatabase.DbCreateDynaset( SearchProcessNamesQuery ( parProcess_name ), ORADYN_DEFAULT )
131
		  %>
132
 
133
		  <%If rsQry.RecordCount < 1 Then%>
134
		  <!-- NO RESULTS -->
135
		  No Results Found.
136
		  <%Else%>
137
		  <!-- FOUND RESULTS -->
138
		  Select Process and click Add.
139
          <table width="100%"  border="0" cellspacing="2" cellpadding="0">
140
 
141
  <table>      
142
   			<tr>
143
              <td nowrap class="form_iname"></td>
144
              <td valign="top" nowrap class="body_txt"><b>Process Name</b></td>
145
 
146
              <td valign="top" nowrap class="body_txt"><b>Run As</b></td>
147
              <td valign="top" nowrap class="body_txt"><b>Pkg Owner</b></td>
148
              <td valign="top" nowrap class="body_txt"><b>Is Interface</b></td>
149
 			</tr>    
150
			<%
151
			While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
152
			%>
153
 
154
 			<tr>
155
              <td nowrap class="form_iname"><input type="checkbox" name="proc_id_list" value="<%=rsQry("proc_id")%>" <%=rsQry("checked")%>></td>
156
              <td valign="top" nowrap class="body_txt"><%=HighlightSubstring ( rsQry("proc_name"), parProcess_name )%></td>
157
 
158
              <td valign="top" nowrap class="body_txt"><%=rsQry("run_as")%></td>
159
              <td valign="top" nowrap class="body_txt"><%=rsQry("pkg_owner")%></td>
160
              <td valign="top" nowrap class="body_txt"><%=rsQry("is_interface")%></td>
161
 			</tr>
162
 
163
            <%rsQry.MoveNext%>
164
			<%
165
			WEnd
166
 
167
			rsQry.Close
168
			Set rsQry = Nothing
169
			%>
170
</table>
171
			<tr>
172
              <td width="1" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
173
              <td width="100%" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
174
            </tr>
175
          </table>
176
		  <%End If%>
177
 
178
		  </td>
179
        </tr>
180
 
181
    </table>
182
<%Else
183
	Response.Write("Click Back and Enter a Process Name!")
184
End If%>	
185
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
186
    </td>
187
  </tr>
188
  <input type="hidden" name="action" value="true">
189
  <%=objPMod.ComposeHiddenTags()%>
190
  </form>
191
</table>
192
</body>
193
</html>
194
<%
195
'------------ RUN AFTER PAGE RENDER -----------
196
'Set objFormCollector = Nothing
197
'----------------------------------------------
198
Call Destroy_All_Objects
199
%>