Subversion Repositories DevTools

Rev

Rev 5506 | Rev 6053 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	    Destroy Release
5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0	' always load the page, dont store
12
%>
13
 
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
153 ghuddy 20
<!--#include file="common/daemon_instructions.asp"-->
119 ghuddy 21
<%
22
' Set rfile parameter. This is a return page after Login
23
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
24
'------------ ACCESS CONTROL ------------------
25
%>
26
<!--#include file="_access_control_login.asp"-->
27
<!--#include file="_access_control_general.asp"-->
28
<!--#include file="_access_control_project.asp"-->
29
<%
30
'------------ Variable Definition -------------
153 ghuddy 31
Dim csvStr
32
Dim subStrArr
33
Dim subStr
34
 
119 ghuddy 35
'------------ Constants Declaration -----------
36
'------------ Variable Init -------------------
37
'----------------------------------------------
38
%>
39
<%
40
Sub DestroyRelease ( )
153 ghuddy 41
 
119 ghuddy 42
	On Error Resume Next
43
	objEH.ErrorRedirect = TRUE
153 ghuddy 44
 
45
 
46
 
119 ghuddy 47
	OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id_list"), 	ORAPARM_INPUT, ORATYPE_NUMBER
48
	OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER
153 ghuddy 49
 
119 ghuddy 50
	objEH.TryORA ( OraSession )
153 ghuddy 51
 
52
 
119 ghuddy 53
	OraDatabase.ExecuteSQL _
54
	"BEGIN "&_
55
	" PK_RELEASE.DESTROY_RELEASE ( :RTAG_ID, :USER_ID ); "&_
56
	"END;"
153 ghuddy 57
 
119 ghuddy 58
	objEH.CatchORA ( OraSession )
153 ghuddy 59
 
60
 
119 ghuddy 61
	OraDatabase.Parameters.Remove "RTAG_ID"
62
	OraDatabase.Parameters.Remove "USER_ID"
63
End Sub
64
%>
65
<%
66
'-----------------------  MAIN LINE  ---------------------------
67
 
68
'--- Process submition ---
69
If (Request("rtag_id_list") <> "") AND (Request("proj_id") <> "")Then
153 ghuddy 70
 
71
   csvStr = Request("rtag_id_list")
72
   subStrArr = Split(csvStr,",")
73
 
74
   For Each subStr In subStrArr
75
      If DaemonInstructionPreventsReleaseDeletion(subStr) Then
76
         Call RaiseMsg(enum_MSG_ERROR, "One or more selected releases contain one or more daemon instructions.<br><br>"&_
77
                                       "Please delete them or allow them to be consumed before attempting to delete the release(s).")
78
      End If
79
      If is_daemon_enabled_release(subStr, FALSE) Then
80
         Call RaiseMsg(enum_MSG_ERROR, "One or more selected releases contain one or more daemon configurations.<br><br>"&_
81
                                       "Please wait for daemon activity to cease (pause the daemons if necessary), "&_
82
                                       "delete the build configurations to allow the build daemons to terminate, "&_
83
                                       "before attempting to delete the release(s).")
84
      End If
85
   Next
86
 
87
   Call DestroyRelease ()
88
 
89
   If objEH.Finally Then
5957 dpurdie 90
        Call Destroy_All_Objects
91
        Response.Redirect("rtree.asp?proj_id="& Request("proj_id") )
153 ghuddy 92
   End If
93
 
119 ghuddy 94
Else
95
	Response.write "Some parameters are missing!" & "<br>" 'TODO
96
End If
97
%>
98
<!-- DESTRUCTOR ------->
153 ghuddy 99
<!--#include file="common/destructor.asp"-->