Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
23 rsolanki 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
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
83
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
84
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
85
<script language="JavaScript" src="scripts/common.js"></script>
86
</head>
87
 
88
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
89
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
90
  <tr>
91
    <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>
92
 
93
      </td>
94
  </tr>
95
  <form name="FormSearch" method="post" action="wAddProcessBySearch.asp">
96
  <tr>
97
    <td background="images/bg_quicksearch.gif" class="body_txt"><table width="100" border="0" cellspacing="3" cellpadding="0">
98
 
99
        <tr>
100
          <td nowrap class="body_txtw"><strong>Process Search</strong> </td>
101
          <td><input name="prod_name" type="text" class="body_txt" size="20" value="<%=parProcess_name%>"></td>
102
          <td><input name="btnSearch" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
103
        </tr>
104
      </table></td>
105
  </tr>
106
  <%=objPMod.ComposeHiddenTags()%>
107
  </form>
108
  <form name="FormName" method="post" action="<%=ScriptName%>">
109
  <tr>
110
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
111
      <tr>
112
        <td>&nbsp;</td>
113
        <td align="right"><input name="btn" type="reset" class="form_btn" value="&laquo; Back" onClick="history.back();">
114
        &nbsp;&nbsp;
115
        <input name="btn" type="submit" class="form_btn" value="Add">
116
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
117
      </tr>
118
    </table></td>
119
  </tr>
120
  <tr>
121
    <td>
122
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
123
<%If parProcess_name <> "" Then%>
124
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
125
      <tr>
126
        <td width="100%" valign="top" nowrap class="body_txt">Search result for <strong><%=parProcess_name%></strong> <br>
127
          <br>
128
		  <%
129
		  Set rsQry = OraDatabase.DbCreateDynaset( SearchProcessNamesQuery ( parProcess_name ), ORADYN_DEFAULT )
130
		  %>
131
 
132
		  <%If rsQry.RecordCount < 1 Then%>
133
		  <!-- NO RESULTS -->
134
		  No Results Found.
135
		  <%Else%>
136
		  <!-- FOUND RESULTS -->
137
		  Select Process and click Add.
138
          <table width="100%"  border="0" cellspacing="2" cellpadding="0">
139
 
140
  <table>      
141
   			<tr>
142
              <td nowrap class="form_iname"></td>
143
              <td valign="top" nowrap class="body_txt"><b>Process Name</b></td>
144
 
145
              <td valign="top" nowrap class="body_txt"><b>Run As</b></td>
146
              <td valign="top" nowrap class="body_txt"><b>Pkg Owner</b></td>
147
              <td valign="top" nowrap class="body_txt"><b>Is Interface</b></td>
148
 			</tr>    
149
			<%
150
			While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
151
			%>
152
 
153
 			<tr>
154
              <td nowrap class="form_iname"><input type="checkbox" name="proc_id_list" value="<%=rsQry("proc_id")%>" <%=rsQry("checked")%>></td>
155
              <td valign="top" nowrap class="body_txt"><%=HighlightSubstring ( rsQry("proc_name"), parProcess_name )%></td>
156
 
157
              <td valign="top" nowrap class="body_txt"><%=rsQry("run_as")%></td>
158
              <td valign="top" nowrap class="body_txt"><%=rsQry("pkg_owner")%></td>
159
              <td valign="top" nowrap class="body_txt"><%=rsQry("is_interface")%></td>
160
 			</tr>
161
 
162
            <%rsQry.MoveNext%>
163
			<%
164
			WEnd
165
 
166
			rsQry.Close
167
			Set rsQry = Nothing
168
			%>
169
</table>
170
			<tr>
171
              <td width="1" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
172
              <td width="100%" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
173
            </tr>
174
          </table>
175
		  <%End If%>
176
 
177
		  </td>
178
        </tr>
179
 
180
    </table>
181
<%Else
182
	Response.Write("Click Back and Enter a Process Name!")
183
End If%>	
184
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
185
    </td>
186
  </tr>
187
  <input type="hidden" name="action" value="true">
188
  <%=objPMod.ComposeHiddenTags()%>
189
  </form>
190
</table>
191
</body>
192
</html>
193
<%
194
'------------ RUN AFTER PAGE RENDER -----------
195
'Set objFormCollector = Nothing
196
'----------------------------------------------
197
Call Destroy_All_Objects
198
%>