Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	   Import Dependency
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
' Set rfile parameter. This is a return page after Login
22
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
23
'------------ ACCESS CONTROL ------------------
24
%>
25
<!--#include file="_access_control_login.asp"-->
26
<!--#include file="_access_control_general.asp"-->
27
<!--#include file="_access_control_project.asp"-->
28
<%
29
'------------ Variable Definition -------------
30
Dim parFromRtag_id
31
Dim parToRtag_id
32
'------------ Constants Declaration -----------
33
'------------ Variable Init -------------------
34
parFromRtag_id = QStrPar("FROMrtag_id")
35
parToRtag_id = QStrPar("ToRtag_id")
36
'----------------------------------------------
37
%>
38
<%
39
Function Import_Dependency ( NNFromRtag_id, NNToRtag_id )
40
 
41
	On Error Resume Next
42
	objEH.ErrorRedirect = TRUE
43
 
44
 
45
	OraDatabase.Parameters.Add "PV_ID", NNFromRtag_id, 	ORAPARM_INPUT, ORATYPE_NUMBER 
46
	OraDatabase.Parameters.Add "RTAG_ID", NNToRtag_id, 	ORAPARM_INPUT, ORATYPE_NUMBER 
47
	OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
48
 
49
 
50
	objEH.TryORA ( OraSession )
51
 
52
	' Remove old Work in Progress Contents
53
	OraDatabase.ExecuteSQL _
54
	"INSERT INTO RELEASE_CONTENT rc ( RTAG_ID, PV_ID, BASE_VIEW_ID, INSERT_STAMP, INSERTOR_ID, PKG_STATE )"&_
55
	"SELECT DISTINCT"&_
56
 	"  :RTAG_ID,"&_
57
 	"   qry.DPV_ID,"&_
58
 	"   7,"&_
59
 	"   ORA_SYSDATE,"&_
60
 	"   1,"&_
61
 	"   0"&_
62
    " FROM ("&_
63
 	"		SELECT dep.*,"&_
64
 	"			   LEVEL AS LEVEL_NUM"&_
65
 	"		  FROM PACKAGE_DEPENDENCIES dep"&_
66
 	"		START WITH dep.PV_ID IN ( :PV_ID ) "&_
67
 	"		CONNECT BY PRIOR dep.DPV_ID = dep.PV_ID"&_
68
 	"	) qry,"&_
69
 	"	PACKAGES pkg,"&_
70
	"	PACKAGE_VERSIONS pv"&_
71
 	" WHERE qry.PV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID"&_
72
	" and qry.dpv_id NOT IN (select pv_id from release_content where rtag_id = :RTAG_ID)"
73
 
74
 
75
 
76
 
77
 
78
 
79
	objEH.CatchORA ( OraSession )
80
 
81
 
82
 
83
	OraDatabase.Parameters.Remove "PV_ID"
84
	OraDatabase.Parameters.Remove "RTAG_ID"
85
	OraDatabase.Parameters.Remove "USER_ID"
86
End Function
87
 
88
%>
89
<%
90
'-----------------------  MAIN LINE  ---------------------------
91
'--- Process submition ---
92
If (parFromRtag_id <> "") AND (parToRtag_id <> "") Then
93
	' All mendatory parameters FOUND
94
 
95
 
96
	'COMPLETE THE REQUEST...
97
	Call Import_Dependency ( parFromRtag_id, parToRtag_id )
98
 
99
 
100
	If objEH.Finally Then
101
		Response.Redirect("dependencies.asp?rtag_id="& parToRtag_id )
102
	End If
103
 
104
 
105
Else
106
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
107
	Response.write QSTR_All 
108
End If
109
%>
110
 
111
 
112
<!-- DESTRUCTOR ------->
113
<!--#include file="common/destructor.asp"-->