Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'                                  Remove release reference 
'               --- PROCESS FORM ---
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0    ' always load the page, dont store
%>

<!--#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/common_dbedit.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim ProblemsString
Dim OverideWarnings
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
ProblemsString = NULL

OverideWarnings = "N"
If InStr( 1, Request("btn"), "YES", 1 ) > 0 Then OverideWarnings = "Y"

'----------------------------------------------
%>
<%
Sub RemoveReleaseReference      ( nRtagId, nRefRtagId, outProblemsString )
        
        OraDatabase.Parameters.Add "RTAG_ID",                   nRtagId,                ORAPARM_INPUT, ORATYPE_NUMBER 
        OraDatabase.Parameters.Add "REF_RTAG_ID",               nRefRtagId,     ORAPARM_INPUT, ORATYPE_NUMBER
        
        
        OraSession.BeginTrans
        
        OraDatabase.ExecuteSQL _
        " BEGIN "&_
        "       PK_RELEASE.REMOVE_RELEASE_REFERENCE ( :RTAG_ID, :REF_RTAG_ID ); "&_
        " END; "
        
        OraSession.CommitTrans
        
        
        OraDatabase.Parameters.Remove "RTAG_ID"
        OraDatabase.Parameters.Remove "REF_RTAG_ID"
End Sub
%>
<%
'-----------------------  MAIN LINE  ---------------------------

'------ ACCESS CONTROL ----------
If NOT objAccessControl.IsVisible("RemoveReleaseReference") Then
        Call OpenInWindow ( "Login.asp?message=4&rfile="& scriptName & objPMod.ComposeURLWithout("rfile") )
End If
'--------------------------------


If (Request("rtag_id") <> "")  AND  (Request("refrtag_id") <> "") Then
        
        '--- Process submition ---
        If InStr(Request("refrtag_id"), ",") = 0 Then
                Call RemoveReleaseReference ( Request("rtag_id"), Request("refrtag_id"), ProblemsString )
        End If
        
        Response.Redirect( "dependencies.asp?rtag_id="& Request("rtag_id") )
        
Else
        
        Err.Raise 8, "This page requires more paramaters to run.<br>"& objPMod.ComposeURL()
        
End If

'----------------------------------------------------------------
%>

<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->