Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	    MAKE PENDING
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"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parPv_id
29
Dim parRfile
30
Dim retERRmsg
31
Dim retALRTmsg
32
Dim retParameters
33
Dim pkgType
34
'------------ Constants Declaration -----------
35
'------------ Variable Init -------------------
36
parPv_id = Request("pv_id")
37
parRfile = Request("rfile")
38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
'----------------------------------------------
41
%>
42
<%
43
Sub MakePending ()
44
	Dim objWSH
45
	Set objWSH = Server.CreateObject("WScript.Shell")
46
 
47
 
48
	OraDatabase.Parameters.Add "PV_ID", 		Request("pv_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
49
	OraDatabase.Parameters.Add "RTAG_ID", 		Request("rtag_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
50
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId,	ORAPARM_INPUT, ORATYPE_NUMBER 
51
 
52
 
53
	OraSession.BeginTrans
54
 
55
	OraDatabase.ExecuteSQL _
56
	"BEGIN "&_
57
	" PK_ENVIRONMENT.MAKE_PENDING ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
58
	"END; "
59
 
60
	OraSession.CommitTrans
61
 
62
 
63
	OraDatabase.Parameters.Remove "PV_ID"
64
	OraDatabase.Parameters.Remove "RTAG_ID"
65
	OraDatabase.Parameters.Remove "USER_ID"
66
 
67
	objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:PostRun "&_
68
                 "/pv_id:"& Request("pv_id") , _
69
                 0, False 
70
 
71
 
72
End Sub
73
%>
74
<%
75
'-----------------------  MAIN LINE  ---------------------------
76
 
77
'--- Process submition ---
78
If ( Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
79
 
80
	Call CheckRequirementsForMakePending ( parPv_id, parRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
81
 
82
	If IsNull(retERRmsg) Then
83
		' All Requirements OK
84
		'COMPLETE THE REQUEST...
85
		Call MakePending ( )
86
 
87
		If Request("rfile") <> "" Then
88
			Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
89
		Else
90
			Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
91
		End If
92
 
93
	Else
94
		Call RaiseMsg ( Eval(retERRmsg), parRtag_id &"|"& parPv_id 	&"|"& retParameters &"|"& "N" )
95
 
96
	End If
97
 
98
Else
99
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
100
	Response.write QSTR_All 
101
End If
102
%>
103
 
104
<!-- DESTRUCTOR ------->
105
<!--#include file="common/destructor.asp"-->