Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'                                  Import Release
'               --- 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"-->
<%
' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parFromRtag_id
Dim parToRtag_id
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parFromRtag_id = QStrPar("FromRtag_id")
parToRtag_id = QStrPar("ToRtag_id")
'----------------------------------------------
%>
<%
Function Import_Release ( NNFromRtag_id, NNToRtag_id )
        
        On Error Resume Next
        objEH.ErrorRedirect = TRUE
        
        
        OraDatabase.Parameters.Add "FROMRTAG_ID", NNFromRtag_id,        ORAPARM_INPUT, ORATYPE_NUMBER 
        OraDatabase.Parameters.Add "TORTAG_ID", NNToRtag_id,    ORAPARM_INPUT, ORATYPE_NUMBER 
        OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER 
        
        
        objEH.TryORA ( OraSession )
        
        ' Remove old Work in Progress Contents
        OraDatabase.ExecuteSQL _
                "BEGIN  PK_RELEASE.IMPORT_RELEASE_CONTENTS (:FROMRTAG_ID, :TORTAG_ID, :USER_ID); END;"
        
        objEH.CatchORA ( OraSession )
        
        
        
        OraDatabase.Parameters.Remove "FROMRTAG_ID"
        OraDatabase.Parameters.Remove "TORTAG_ID"
        OraDatabase.Parameters.Remove "USER_ID"
End Function

%>
<%
'-----------------------  MAIN LINE  ---------------------------
'--- Process submition ---
If (parFromRtag_id <> "") AND (parToRtag_id <> "") Then
        ' All mandatory parameters FOUND
        
        
        'COMPLETE THE REQUEST...
        Call Import_Release ( parFromRtag_id, parToRtag_id )
        
        
        If objEH.Finally Then
                Response.Redirect("dependencies.asp?rtag_id="& parToRtag_id )
        End If
        
        
Else
        Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
        Response.write QSTR_All 
End If
%>

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