Subversion Repositories DevTools

Rev

Rev 119 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                wAddProdBySearch                               |
'|                                                   |
'=====================================================
%>
<%
Option explicit
Response.Expires = 0
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_form_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ VARIABLE DEFINITION -------------
Dim rsQry
Dim parProcess_name
Dim parPv_id
Dim sMessage
'------------ CONSTANTS DECLARATION -----------
'------------ VARIABLE INIT -------------------
parRtag_id = Request("rtag_id")
parProcess_name = Request("prod_name")
parPv_id = Request("pv_id")

'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Function SearchProcessNamesQuery ( sProcess_name )
        Dim tempSTR
        tempSTR = GetQuery ("ProcessNameSearch.sql")
        SearchProcessNamesQuery = Replace ( tempSTR, ":PROCESS_NAME", sProcess_name )
End Function
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------
'objPMod.PersistInQryString ( Array("base_env_id") )
'----------------------------------------------
If CBool(Request("action")) Then

        On Error Resume Next
        
        OraDatabase.Parameters.Add "PROC_ID_LIST",      Request("proc_id_list"),        ORAPARM_INPUT, ORATYPE_VARCHAR2 
        OraDatabase.Parameters.Add "PV_ID",             Request("pv_id"),                       ORAPARM_INPUT, ORATYPE_NUMBER 
        OraDatabase.Parameters.Add "USER_ID",           objAccessControl.UserId,        ORAPARM_INPUT, ORATYPE_NUMBER 
        
        objEH.TryORA ( OraSession )
        
        OraDatabase.ExecuteSQL _
        "BEGIN   PK_PACKAGE.ADD_PACKAGE_PROCESS ( :PROC_ID_LIST, :PV_ID, :USER_ID );   END;"
                
        objEH.CatchORA ( OraSession )
        
        OraDatabase.Parameters.Remove "PROC_ID_LIST"
        OraDatabase.Parameters.Remove "PV_ID"
        OraDatabase.Parameters.Remove "USER_ID" 
        
        
        
        If objEH.Finally Then
                Call OpenInParentWindow ("process_dependencies.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id"))
                Call CloseWindow()
        End If  

End If
%>
<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="scripts/common.js"></script>
</head>

<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
  <tr>
    <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>
    
      </td>
  </tr>
  <form name="FormSearch" method="post" action="wAddProcessBySearch.asp">
  <tr>
    <td background="images/bg_quicksearch.gif" class="body_txt"><table width="100" border="0" cellspacing="3" cellpadding="0">
        <tr>
          <td nowrap class="body_txtw"><strong>Process Search</strong> </td>
          <td><input name="prod_name" type="text" class="body_txt" size="20" value="<%=parProcess_name%>"></td>
          <td><input name="btnSearch" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
        </tr>
      </table></td>
  </tr>
  <%=objPMod.ComposeHiddenTags()%>
  </form>
  <form name="FormName" method="post" action="<%=ScriptName%>">
  <tr>
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
        <td align="right"><input name="btn" type="reset" class="form_btn" value="&laquo; Back" onClick="history.back();">
        &nbsp;&nbsp;
        <input name="btn" type="submit" class="form_btn" value="Add">
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->            
<%If parProcess_name <> "" Then%>
        <table width="100%"  border="0" cellspacing="10" cellpadding="0">
      <tr>
        <td width="100%" valign="top" nowrap class="body_txt">Search result for <strong><%=parProcess_name%></strong> <br>
          <br>
                  <%
                  Set rsQry = OraDatabase.DbCreateDynaset( SearchProcessNamesQuery ( parProcess_name ), ORADYN_DEFAULT )
                  %>
                  
                  <%If rsQry.RecordCount < 1 Then%>
                  <!-- NO RESULTS -->
                  No Results Found.
                  <%Else%>
                  <!-- FOUND RESULTS -->
                  Select Process and click Add.
          <table width="100%"  border="0" cellspacing="2" cellpadding="0">
                  
  <table>      
                        <tr>
              <td nowrap class="form_iname"></td>
              <td valign="top" nowrap class="body_txt"><b>Process Name</b></td>

              <td valign="top" nowrap class="body_txt"><b>Run As</b></td>
              <td valign="top" nowrap class="body_txt"><b>Pkg Owner</b></td>
              <td valign="top" nowrap class="body_txt"><b>Is Interface</b></td>
                        </tr>    
                        <%
                        While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                        %>

                        <tr>
              <td nowrap class="form_iname"><input type="checkbox" name="proc_id_list" value="<%=rsQry("proc_id")%>" <%=rsQry("checked")%>></td>
              <td valign="top" nowrap class="body_txt"><%=HighlightSubstring ( rsQry("proc_name"), parProcess_name )%></td>

              <td valign="top" nowrap class="body_txt"><%=rsQry("run_as")%></td>
              <td valign="top" nowrap class="body_txt"><%=rsQry("pkg_owner")%></td>
              <td valign="top" nowrap class="body_txt"><%=rsQry("is_interface")%></td>
                        </tr>

            <%rsQry.MoveNext%>
                        <%
                        WEnd
                        
                        rsQry.Close
                        Set rsQry = Nothing
                        %>
</table>
                        <tr>
              <td width="1" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
              <td width="100%" background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="1"></td>
            </tr>
          </table>
                  <%End If%>
                  
                  </td>
        </tr>
                
    </table>
<%Else
        Response.Write("Click Back and Enter a Process Name!")
End If%>        
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
    </td>
  </tr>
  <input type="hidden" name="action" value="true">
  <%=objPMod.ComposeHiddenTags()%>
  </form>
</table>
</body>
</html>
<%
'------------ RUN AFTER PAGE RENDER -----------
'Set objFormCollector = Nothing
'----------------------------------------------
Call Destroy_All_Objects
%>