Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                   wAddProc                        |
'|                                                   |
'=====================================================
%>
<%
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"-->
<!--#include file="_access_control_login.asp"-->
<%
'------------ VARIABLE DEFINITION -------------
Dim rsQry, healthTag, cmdInterface, pkgOwner, isInterface, package, procDesc
Dim sMessage
Dim SEQ_proc_id
'------------ CONSTANTS DECLARATION -----------
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
'------------ VARIABLE INIT -------------------
sMessage = NULL
isInterface = NULL
'parOs_id = Request("os_id")
'parBom_id = Request("bom_id")
Set objFormCollector = CreateObject("Scripting.Dictionary")
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%

%>
<%
'------------ RUN BEFORE PAGE RENDER ----------


If CBool(Request("action")) Then

   Dim Query_String

   If Request("isInterface") = "" Then
      isInterface = "F"
   Else
      isInterface = "T"
   End If

   Query_String = _
   "   SELECT * FROM PROCESSES WHERE PROC_NAME = '"& Request("healthTag") &"'"&_
   "   AND RUN_AS = '"& Request("cmdInterface") &"' AND PKG_OWNER = '"& Request("pkgOwner") &"'"&_
   "   AND IS_INTERFACE = '"& isInterface &"'"

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

   If rsTemp.RecordCount = 0 Then

      SEQ_proc_id = Get_From_DUAL("DEPLOYMENT_MANAGER.SEQ_PROC_ID.nextval")

      OraDatabase.Parameters.Add "PROC_ID",         SEQ_proc_id,              ORAPARM_INPUT, ORATYPE_NUMBER
      OraDatabase.Parameters.Add "PKG_HEALTH_TAG",  Request("healthTag"),     ORAPARM_INPUT, ORATYPE_VARCHAR2
      OraDatabase.Parameters.Add "PROC_DESC",       Request("procDesc"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
      OraDatabase.Parameters.Add "CMD_INTERFACE",   Request("cmdInterface"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
      OraDatabase.Parameters.Add "PKG_OWNER",       Request("pkgOwner"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
      OraDatabase.Parameters.Add "IS_INTERFACE",    isInterface,              ORAPARM_INPUT, ORATYPE_VARCHAR
      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 )
      On Error Resume Next

      OraDatabase.ExecuteSQL _
      "BEGIN  PK_PACKAGE.ADD_PROCESS( :PROC_ID, :PKG_HEALTH_TAG, :PROC_DESC, :CMD_INTERFACE, :PKG_OWNER, :IS_INTERFACE, :PV_ID, :USER_ID);  END;"

      objEH.CatchORA ( OraSession )

      OraDatabase.Parameters.Remove "PROC_ID"
      OraDatabase.Parameters.Remove "PKG_HEALTH_TAG"
      OraDatabase.Parameters.Remove "PROC_DESC"
      OraDatabase.Parameters.Remove "CMD_INTERFACE"
      OraDatabase.Parameters.Remove "PKG_OWNER"
      OraDatabase.Parameters.Remove "IS_INTERFACE"
      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

   Else
      Call RaiseMsg ( enum_MSG_PROCESS_EXISTS, Request("pv_id") )
   End If

   rsTemp.Close
   Set rsTemp = nothing

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();FormSearch.prod_name.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>
         Add a process for the package version.
      </td>
   </tr>
   <%
   '-- FROM START ---------------------------------------------------------------------------------------------------------------
   objFormComponent.FormName = "FormSearch"
   objFormComponent.Action = "wAddProcessBySearch.asp"
   Call objFormComponent.FormStart()
   %>
   <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"></td>
               <td><input name="btn" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
            </tr>
         </table>
      </td>
   </tr>
   <%=objPMod.ComposeHiddenTags()%>
   <%
   Call objFormComponent.FormEnd()
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
   %>

   <%
   '-- FROM START --------------------------------------------------------------------------------------------------------------
   objFormComponent.FormName = "FormName"
   objFormComponent.Action = ScriptName
   objFormComponent.OnSubmit = "ShowProgress();"
   Call objFormComponent.FormStart()

   %>
   <tr>
      <td background="images/bg_login.gif">
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
               <td><%=ProgressBar()%></td>
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Submit">
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
               </td>
            </tr>
         </table>
      </td>
   </tr>
   <tr>
      <td>
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
         <%Call Messenger ( sMessage , 3, "100%" )%>
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
         <!--#include file="messages/_msg_inline.asp"-->
         <table width="664" border="0">
            <tr>
               <td><span class="body_txt">Package Health Tag</span>&nbsp;</td>
               <td><input name="healthTag" type="text" class="body_txt" value="<%=healthTag%>">&nbsp;</td>
            </tr>
            <tr>
               <td><span class="body_txt">Process Description</span></td>
               <td><textarea name="procDesc" rows=3 cols=50 class="body_txt"><%=procDesc%></textarea></td>
            </tr>
            <tr>
               <td><span class="body_txt">Package/Product</span></td>
               <td>
                  <%
                  Dim rsTemp

                  Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT * FROM PACKAGE_VERSIONS PV, PACKAGES PKG WHERE PV.PKG_ID = PKG.PKG_ID AND PV.PV_ID ="& Request("pv_id") &"", cint(0))
                  Response.Write("<input name=""pkg_version"" type=""text"" class=""body_txt"" value="& rsTemp("pkg_name") &" size=70 disabled>")
                  rsTemp.Close
                  Set rsTemp = nothing
                  %>
               </td>
            </tr>
            <tr>
               <td><span class="body_txt">Command Interface</span></td>
               <td><input name="cmdInterface" type="text" class="body_txt" value="<%=cmdInterface%>" size=80></td>
            </tr>
            <tr>
               <td><span class="body_txt">Is Interface</span></td>
               <td><input type="checkbox" name="isInterface">
                  <span class="body_txt">(Checked If True)</span>
               </td>
            </tr>
            <tr>
               <td><span class="body_txt">Package Owner</span></td>
               <td><input name="pkgOwner" type="text" class="body_txt" value="<%=pkgOwner%>"></td>
            </tr>
            <tr>
               <td>&nbsp;</td>
               <td>&nbsp;</td>
            </tr>
         </table>
      </td>
   </tr>
   <%=objPMod.ComposeHiddenTags()%>
   <input type="hidden" name="action" value="true">
   <%
   Call objFormComponent.FormEnd()
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
   %>
</table>
</body>
</html>
<%
'------------ RUN AFTER PAGE RENDER -----------
Set objFormCollector = Nothing
'----------------------------------------------
Call Destroy_All_Objects
%>