| 147 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| _DeleteDaemonInstruction |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
19 |
<!--#include file="common/daemon_instructions.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_general.asp"-->
|
|
|
24 |
<!--#include file="_access_control_login.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ VARIABLE DEFINITION -------------
|
| 6185 |
dpurdie |
27 |
Dim rFile
|
| 147 |
ghuddy |
28 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
29 |
'------------ VARIABLE INIT -------------------
|
| 6185 |
dpurdie |
30 |
rFile = request("rfile")
|
| 147 |
ghuddy |
31 |
'------------ CONDITIONS ----------------------
|
|
|
32 |
'----------------------------------------------
|
|
|
33 |
%>
|
|
|
34 |
<%
|
|
|
35 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
36 |
Sub RemoveDaemonInstruction ()
|
|
|
37 |
On Error Resume Next
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
If NOT DaemonInstructionInProgress(Request("inst_id")) Then
|
|
|
41 |
objEH.TryORA ( OraSession )
|
| 6185 |
dpurdie |
42 |
OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.del_daemon_inst("& Request("inst_id") & "); END;"
|
|
|
43 |
objEH.CatchORA ( OraSession )
|
|
|
44 |
Else
|
|
|
45 |
Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon")
|
|
|
46 |
End If
|
|
|
47 |
End Sub
|
|
|
48 |
|
|
|
49 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
50 |
Sub RemoveDaemonInstructionByPVID ()
|
|
|
51 |
On Error Resume Next
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
If NOT DaemonInstructionInProgress(Request("inst_id")) Then
|
|
|
55 |
objEH.TryORA ( OraSession )
|
| 147 |
ghuddy |
56 |
OraDatabase.ExecuteSQL _
|
| 6185 |
dpurdie |
57 |
"BEGIN PK_BUILDAPI.del_daemon_inst_by_rtag_pvid("& Request("opCode") & "," & Request("rtag_id") & "," & Request("pv_id") & "); END;"
|
| 147 |
ghuddy |
58 |
objEH.CatchORA ( OraSession )
|
|
|
59 |
Else
|
|
|
60 |
Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon")
|
|
|
61 |
End If
|
| 6185 |
dpurdie |
62 |
|
|
|
63 |
rFile = rFile & "?rtag_id=" & Request("rtag_id") & "&pv_id=" & Request("pv_id")
|
|
|
64 |
|
| 147 |
ghuddy |
65 |
End Sub
|
| 6185 |
dpurdie |
66 |
|
| 147 |
ghuddy |
67 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
68 |
%>
|
|
|
69 |
<%
|
|
|
70 |
'**************************** M A I N ******************************
|
|
|
71 |
' --- Form is Valid ---
|
| 6185 |
dpurdie |
72 |
If Request("opCode") <> "" Then
|
|
|
73 |
Call RemoveDaemonInstructionByPVID()
|
|
|
74 |
ElseIf Request("inst_id") <> "" Then
|
|
|
75 |
Call RemoveDaemonInstruction()
|
|
|
76 |
End If
|
| 147 |
ghuddy |
77 |
|
|
|
78 |
If objEH.Finally Then
|
| 6185 |
dpurdie |
79 |
Call OpenInWindow ( rFile )
|
| 147 |
ghuddy |
80 |
End If
|
|
|
81 |
'**********************************************************************
|
|
|
82 |
%>
|
|
|
83 |
<%
|
|
|
84 |
'------------ RUN AFTER CODE RUN --------------
|
|
|
85 |
'----------------------------------------------
|
|
|
86 |
'----------------------------------------------
|
|
|
87 |
Call Destroy_All_Objects
|
|
|
88 |
%>
|
|
|
89 |
|