Subversion Repositories DevTools

Rev

Rev 5506 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5506 Rev 6185
Line 22... Line 22...
22
%>
22
%>
23
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_general.asp"-->
24
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_login.asp"-->
25
<%
25
<%
26
'------------ VARIABLE DEFINITION -------------
26
'------------ VARIABLE DEFINITION -------------
-
 
27
Dim rFile
27
'------------ CONSTANTS DECLARATION -----------
28
'------------ CONSTANTS DECLARATION -----------
28
'------------ VARIABLE INIT -------------------
29
'------------ VARIABLE INIT -------------------
-
 
30
rFile = request("rfile")
29
'------------ CONDITIONS ----------------------
31
'------------ CONDITIONS ----------------------
30
'----------------------------------------------
32
'----------------------------------------------
31
%>
33
%>
32
<%
34
<%
33
'--------------------------------------------------------------------------------------------------------------------------
35
'--------------------------------------------------------------------------------------------------------------------------
Line 35... Line 37...
35
   On Error Resume Next
37
   On Error Resume Next
36
 
38
 
37
 
39
 
38
   If NOT DaemonInstructionInProgress(Request("inst_id")) Then
40
   If NOT DaemonInstructionInProgress(Request("inst_id")) Then
39
      objEH.TryORA ( OraSession )
41
      objEH.TryORA ( OraSession )
-
 
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 )
40
      OraDatabase.ExecuteSQL _
56
      OraDatabase.ExecuteSQL _
41
      "BEGIN PK_BUILDAPI.del_daemon_inst("& Request("inst_id") & "); END;"
57
      "BEGIN PK_BUILDAPI.del_daemon_inst_by_rtag_pvid("& Request("opCode") & "," & Request("rtag_id") & "," & Request("pv_id") & "); END;"
42
      objEH.CatchORA ( OraSession )
58
      objEH.CatchORA ( OraSession )
43
   Else
59
   Else
44
      Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon")
60
      Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon")
45
   End If
61
   End If
-
 
62
 
-
 
63
   rFile = rFile & "?rtag_id=" & Request("rtag_id") & "&pv_id=" & Request("pv_id")
-
 
64
 
46
End Sub
65
End Sub
-
 
66
 
47
'--------------------------------------------------------------------------------------------------------------------------
67
'--------------------------------------------------------------------------------------------------------------------------
48
%>
68
%>
49
<%
69
<%
50
'**************************** M  A  I  N ******************************
70
'**************************** M  A  I  N ******************************
51
' --- Form is Valid ---
71
' --- Form is Valid ---
-
 
72
If Request("opCode") <> "" Then
-
 
73
    Call RemoveDaemonInstructionByPVID()
-
 
74
ElseIf Request("inst_id") <> "" Then
52
Call RemoveDaemonInstruction()
75
    Call RemoveDaemonInstruction()
-
 
76
End If
53
 
77
 
54
If objEH.Finally Then
78
If objEH.Finally Then
55
   Call OpenInWindow ( "admin_daemon_instructions.asp" )
79
   Call OpenInWindow ( rFile )
56
End If
80
End If
57
'**********************************************************************
81
'**********************************************************************
58
%>
82
%>
59
<%
83
<%
60
'------------ RUN AFTER CODE RUN --------------
84
'------------ RUN AFTER CODE RUN --------------