Subversion Repositories DevTools

Rev

Rev 6371 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Patch Install Order
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="controls/ERGFormComponent/classFormComponent.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim parPatchId
Dim objFormComponent
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPatchId = Request("patch_id")
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
parPv_id = QStrPar("pv_id")
Set objFormComponent = New FormComponent
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Function GetInstallOrderList ( nPatchId )
   Dim rsQry, query

   OraDatabase.Parameters.Add "PATCH_ID",  nPatchId,   ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PV_ID",  parPv_id,   ORAPARM_INPUT, ORATYPE_NUMBER

   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("PatchInstallOrderList.sql"), ORADYN_DEFAULT )
   If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
      GetInstallOrderList = rsQry.GetRows()
   Else
      GetInstallOrderList = NULL
   End If

   rsQry.Close
   Set rsQry = Nothing

   OraDatabase.Parameters.Remove "PATCH_ID"
   OraDatabase.Parameters.Remove "PV_ID"
End Function
'--------------------------------------------------------------------------------------------------------------------------
Sub UpdateInstallOrder ()

   OraDatabase.Parameters.Add "PV_ID",          Request("pv_id"),          ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PATCH_ID",       Request("patch_id"),       ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "INSTALL_ORDER",  Request("install_order"),  ORAPARM_INPUT, ORATYPE_NUMBER

   objEH.ErrorRedirect = FALSE
   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL _
   "BEGIN Shift_Install_Order ( :PATCH_ID, :PV_ID, :INSTALL_ORDER );  END;"

   objEH.CatchORA ( OraSession )

   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "PATCH_ID"
   OraDatabase.Parameters.Remove "INSTALL_ORDER"

End Sub
'-----------------
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'Process submition
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn  Then
    Call UpdateInstallOrder ()
    If objEH.Finally Then
        Call OpenInParentWindow ( "patches.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
    End If
End If
%>
<%
Call Get_Pkg_Info ( parPatchId, parRtag_id )
%>
<html>
<head>
<title>Release Manager</title>
<link rel="shortcut icon" href="<%=FavIcon%>"/>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<%
'-- FROM START ---------------------------------------------------------------------------------------------------------------
objFormComponent.FormName = "FormSearch"
objFormComponent.FormClass = "form_tight"
objFormComponent.Action = scriptName
Call objFormComponent.FormStart()
%>
   <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--#include file="messages/_msg_inline.asp"-->
        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Patch</td>
               <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
               <%=pkgInfoHash.Item ("pkg_version")%></td>
            </tr>
            <tr>
               <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Install Order</td>
               <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                  <%=objFormComponent.Combo ( "install_order", GetInstallOrderList( parPatchId ), FALSE, "class='form_item'" )%>
                  <input type="hidden" name="pv_id" value="<%=parPv_id%>">
                  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
                  <input type="hidden" name="patch_id" value="<%=parPatchId%>">
                  <input type="hidden" name="action" value="true">
               </td>
            </tr>
         </table>
         </td>
      </tr>
      <tr>
         <td align="right">
            <input type="submit" name="btn" value="Update" class="form_btn_comp">
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
         </td>
      </tr>
   </table>
<%
Call objFormComponent.FormEnd()
'-- FROM END ----------------------------------------------------------------------------------------------------------------
%>
</body>
</html>
<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->