Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
129 ghuddy 4
'                  MAKE PENDING
119 ghuddy 5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
129 ghuddy 11
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 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
'------------ ACCESS CONTROL ------------------
23
%>
24
<!--#include file="_access_control_login.asp"-->
25
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_project.asp"-->
27
<%
28
'------------ Variable Definition -------------
29
Dim parPv_id
30
Dim parRfile
31
Dim retERRmsg
32
Dim retALRTmsg
33
Dim retParameters
34
Dim pkgType
35
'------------ Constants Declaration -----------
36
'------------ Variable Init -------------------
37
parPv_id = Request("pv_id")
38
parRfile = Request("rfile")
39
'------------ Constants Declaration -----------
40
'------------ Variable Init -------------------
41
'----------------------------------------------
42
%>
43
<%
44
Sub MakePending ()
121 hknight 45
 
129 ghuddy 46
   OraDatabase.Parameters.Add "PV_ID",    Request("pv_id"),        ORAPARM_INPUT, ORATYPE_NUMBER
47
   OraDatabase.Parameters.Add "RTAG_ID",  Request("rtag_id"),      ORAPARM_INPUT, ORATYPE_NUMBER
48
   OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
49
 
50
   objEH.TryORA ( OraSession )
51
   On Error Resume Next
52
 
53
   OraDatabase.ExecuteSQL " UPDATE package_versions "&_
54
                     " SET owner_id = :USER_ID"&_
55
                     " WHERE pv_id = :PV_ID"
56
 
57
   OraDatabase.ExecuteSQL _
58
   "BEGIN "&_
59
   " PK_ENVIRONMENT.MAKE_PENDING ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
60
   "END; "
61
 
62
   objEH.CatchORA ( OraSession )
63
 
64
   OraDatabase.Parameters.Remove "PV_ID"
65
   OraDatabase.Parameters.Remove "RTAG_ID"
66
   OraDatabase.Parameters.Remove "USER_ID"
67
 
119 ghuddy 68
End Sub
69
%>
70
<%
71
'-----------------------  MAIN LINE  ---------------------------
72
 
73
'--- Process submition ---
74
If ( Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
129 ghuddy 75
 
76
   Call CheckRequirementsForMakePending ( parPv_id, parRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
77
 
78
   If IsNull(retERRmsg) Then
79
      ' All Requirements OK
80
      'COMPLETE THE REQUEST...
81
 
153 ghuddy 82
      If (DaemonInstructionPreventsEditing(Request("rtag_id"), Request("pv_id"))) Then
83
         Call RaiseMsg(enum_MSG_ERROR, "This package version has one or more daemon instructions present.<br><br>"&_
84
                                       "Please delete them or allow them to be consumed before attempting to make the package version pending.")
129 ghuddy 85
      Else
153 ghuddy 86
         Call MakePending ( )
87
 
88
         If Request("rfile") <> "" Then
89
            Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
90
         Else
91
            Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
92
         End If
129 ghuddy 93
      End If
94
 
95
   Else
96
      Call RaiseMsg ( Eval(retERRmsg), parRtag_id &"|"& parPv_id    &"|"& retParameters &"|"& "N" )
97
   End If
98
 
119 ghuddy 99
Else
1376 dpurdie 100
   Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
129 ghuddy 101
   Response.write QSTR_All
119 ghuddy 102
End If
1376 dpurdie 103
 
119 ghuddy 104
%>
105
 
106
<!-- DESTRUCTOR ------->
129 ghuddy 107
<!--#include file="common/destructor.asp"-->