added the ability to add existing serv cats to reactor modes
This commit is contained in:
parent
18f97077e1
commit
f7d3ab6756
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
87
LSL2/POPUP/REACT_CAT_DESC.json
Normal file
87
LSL2/POPUP/REACT_CAT_DESC.json
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"version": 1,
|
||||||
|
"type": "record"
|
||||||
|
},
|
||||||
|
"body": {
|
||||||
|
"record1": {
|
||||||
|
"<1>": "-1",
|
||||||
|
"<2>": "-1",
|
||||||
|
"<3>": "-1",
|
||||||
|
"<4>": "-1",
|
||||||
|
"<5>": "-2",
|
||||||
|
"<6>": {
|
||||||
|
"<6,1>": {
|
||||||
|
"<6,1,1>": "Segoe UI",
|
||||||
|
"<6,1,2>": "-12",
|
||||||
|
"<6,1,3>": "400",
|
||||||
|
"<6,1,4>": "0",
|
||||||
|
"<6,1,5>": "0",
|
||||||
|
"<6,1,6>": "0",
|
||||||
|
"<6,1,7>": "1",
|
||||||
|
"<6,1,8>": "0",
|
||||||
|
"<6,1,9>": "0",
|
||||||
|
"<6,1,10>": "0",
|
||||||
|
"<6,1,11>": "0",
|
||||||
|
"<6,1,12>": "0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"<7>": "REACT_PROB_CAT",
|
||||||
|
"<8>": "BY REACTOR_PROBLEM_CATEGORY",
|
||||||
|
"<9>": {
|
||||||
|
"<9,1>": {
|
||||||
|
"<9,1,1>": "SEQ",
|
||||||
|
"<9,1,2>": "14",
|
||||||
|
"<9,1,3>": "R",
|
||||||
|
"<9,1,4>": "C",
|
||||||
|
"<9,1,5>": "MD0",
|
||||||
|
"<9,1,6>": "SEQ"
|
||||||
|
},
|
||||||
|
"<9,2>": {
|
||||||
|
"<9,2,1>": "REACTOR_PROBLEM_CATEGORY",
|
||||||
|
"<9,2,2>": "20",
|
||||||
|
"<9,2,3>": "L",
|
||||||
|
"<9,2,4>": "C",
|
||||||
|
"<9,2,5>": "",
|
||||||
|
"<9,2,6>": "Reactor Problem Category"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"<10>": "T",
|
||||||
|
"<11>": "2",
|
||||||
|
"<12>": "REACT_CAT_DESC",
|
||||||
|
"<13>": "",
|
||||||
|
"<14>": "E",
|
||||||
|
"<15>": "1",
|
||||||
|
"<16>": "1",
|
||||||
|
"<17>": "1",
|
||||||
|
"<18>": "1",
|
||||||
|
"<19>": "1",
|
||||||
|
"<20>": "1",
|
||||||
|
"<21>": "1",
|
||||||
|
"<22>": "0",
|
||||||
|
"<23>": "0",
|
||||||
|
"<24>": "0",
|
||||||
|
"<25>": "0",
|
||||||
|
"<26>": "",
|
||||||
|
"<27>": "",
|
||||||
|
"<28>": "",
|
||||||
|
"<29>": "0",
|
||||||
|
"<30>": "0",
|
||||||
|
"<31>": "0",
|
||||||
|
"<32>": "0",
|
||||||
|
"<33>": "0",
|
||||||
|
"<34>": "-2",
|
||||||
|
"<35>": "-2",
|
||||||
|
"<36>": "",
|
||||||
|
"<37>": "",
|
||||||
|
"<38>": "",
|
||||||
|
"<39>": "",
|
||||||
|
"<40>": "-2",
|
||||||
|
"<41>": "1000",
|
||||||
|
"<42>": "",
|
||||||
|
"<43>": "",
|
||||||
|
"<44>": "",
|
||||||
|
"<45>": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,7 @@
|
|||||||
"<2>": "-2",
|
"<2>": "-2",
|
||||||
"<3>": "-1",
|
"<3>": "-1",
|
||||||
"<4>": "-1",
|
"<4>": "-1",
|
||||||
"<5>": "16777215",
|
"<5>": "-2",
|
||||||
"<6>": {
|
"<6>": {
|
||||||
"<6,1>": {
|
"<6,1>": {
|
||||||
"<6,1,1>": "Tahoma",
|
"<6,1,1>": "Tahoma",
|
||||||
@ -75,7 +75,17 @@
|
|||||||
"<32>": "0",
|
"<32>": "0",
|
||||||
"<33>": "1",
|
"<33>": "1",
|
||||||
"<34>": "16777215",
|
"<34>": "16777215",
|
||||||
"<35>": "16777215"
|
"<35>": "16777215",
|
||||||
|
"<36>": "",
|
||||||
|
"<37>": "",
|
||||||
|
"<38>": "",
|
||||||
|
"<39>": "",
|
||||||
|
"<40>": "-2",
|
||||||
|
"<41>": "1000",
|
||||||
|
"<42>": "",
|
||||||
|
"<43>": "",
|
||||||
|
"<44>": "",
|
||||||
|
"<45>": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,15 +1,47 @@
|
|||||||
Compile function REACTOR_MODES_EVENTS(CtrlEntId, Event, @PARAMS)
|
Compile function REACTOR_MODES_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
|
||||||
Declare function Get_Property, Database_Services, Dialog_Box, Memberof, Sec_Group_Services, Error_Services
|
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||||
Declare subroutine Set_Property, rlist, Send_Event, Reactor_Modes_Services, errmsg, Error_Services, msg, Database_Services
|
permission from Infineon.
|
||||||
|
|
||||||
$Insert REACTOR_MODES_EQUATES
|
Name : REACTOR_MODES_EVENTS
|
||||||
$Insert MSG_EQUATES
|
|
||||||
$INSERT LOGICAL
|
|
||||||
|
|
||||||
|
Description : This function acts as a commuter module for all events related to this window.
|
||||||
|
|
||||||
|
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||||
|
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||||
|
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||||
|
limited to the events which are currently promoted.
|
||||||
|
|
||||||
|
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||||
|
formatted like this:
|
||||||
|
|
||||||
|
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||||
|
|
||||||
|
Parameters :
|
||||||
|
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||||
|
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||||
|
Param1-15 [in] -- Additional event parameter holders
|
||||||
|
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||||
|
EVENT_SETUP insert
|
||||||
|
|
||||||
|
History : (Date, Initials, Notes)
|
||||||
|
11/13/2024 djs Added "Add Existing Category" button
|
||||||
|
|
||||||
|
***********************************************************************************************************************/
|
||||||
#pragma precomp SRP_PreCompiler
|
#pragma precomp SRP_PreCompiler
|
||||||
#window REACTOR_MODES_EVENTS
|
#window REACTOR_MODES_EVENTS
|
||||||
|
|
||||||
|
$INSERT EVENT_SETUP
|
||||||
|
$INSERT LOGICAL
|
||||||
|
$Insert REACTOR_MODES_EQUATES
|
||||||
|
$Insert MSG_EQUATES
|
||||||
|
$Insert RLIST_EQUATES
|
||||||
|
|
||||||
|
Declare function Get_Property, Database_Services, Dialog_Box, Memberof, Sec_Group_Services, Error_Services
|
||||||
|
Declare function Popup
|
||||||
|
Declare subroutine Set_Property, rlist, Send_Event, Reactor_Modes_Services, errmsg, Error_Services, msg
|
||||||
|
Declare subroutine Reactor_Mode_Services, Database_Services, PlaceDialog
|
||||||
|
|
||||||
GoToEvent Event for CtrlEntId else
|
GoToEvent Event for CtrlEntId else
|
||||||
// Event not implemented
|
// Event not implemented
|
||||||
@ -22,14 +54,14 @@ Return EventFlow or 1
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
Event WINDOW.CREATE(CreateParam)
|
Event WINDOW.CREATE(CreateParam)
|
||||||
//Security Check
|
|
||||||
|
// Security Check
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
Set_Property(@WINDOW : '.BTN_NEW_PROB_CAT', 'ENABLED', 1)
|
Set_Property(@WINDOW : '.BTN_NEW_PROB_CAT', 'ENABLED', 1)
|
||||||
Set_Property(@WINDOW : '.BTN_DELETE_CAT', 'ENABLED', 1)
|
Set_Property(@WINDOW : '.BTN_DELETE_CAT', 'ENABLED', 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
EQU TARGET_ACTIVELIST$ to 5
|
// Get List of Reactor Modes
|
||||||
//Get List of Reactor Modes
|
|
||||||
Statement = 'SELECT REACTOR_MODES BY DESCRIPTION'
|
Statement = 'SELECT REACTOR_MODES BY DESCRIPTION'
|
||||||
rlist(Statement, target_activelist$, '', '', '' )
|
rlist(Statement, target_activelist$, '', '', '' )
|
||||||
ModeList = ''
|
ModeList = ''
|
||||||
@ -43,19 +75,23 @@ Event WINDOW.CREATE(CreateParam)
|
|||||||
ModeList<-1> = ReactorModeID
|
ModeList<-1> = ReactorModeID
|
||||||
Repeat
|
Repeat
|
||||||
end
|
end
|
||||||
//Populate list of current modes
|
// Populate list of current modes
|
||||||
Set_Property(@Window : '.CMB_REACTOR_MODE', 'LIST', ModeList)
|
Set_Property(@Window : '.CMB_REACTOR_MODE', 'LIST', ModeList)
|
||||||
//Populate Security Group options
|
// Populate Security Group options
|
||||||
GroupOptions = SEC_Group_Services('GetAllSecGroups')
|
GroupOptions = SEC_Group_Services('GetAllSecGroups')
|
||||||
Set_Property(@Window : '.CMB_ENTER_OPTIONS', 'LIST', GroupOptions)
|
Set_Property(@Window : '.CMB_ENTER_OPTIONS', 'LIST', GroupOptions)
|
||||||
Set_Property(@Window : '.CMB_EXIT_OPTIONS', 'LIST', GroupOptions)
|
Set_Property(@Window : '.CMB_EXIT_OPTIONS', 'LIST', GroupOptions)
|
||||||
//Populate Notifcation Group Options
|
// Populate Notifcation Group Options
|
||||||
NotifGrpOpts = Database_Services('ReadDataRow', 'APP_INFO', 'USER_CLASSES')
|
NotifGrpOpts = Database_Services('ReadDataRow', 'APP_INFO', 'USER_CLASSES')
|
||||||
Set_Property(@Window : '.CMB_NOTIFY_OPTIONS', 'LIST', NotifGrpOpts)
|
Set_Property(@Window : '.CMB_NOTIFY_OPTIONS', 'LIST', NotifGrpOpts)
|
||||||
|
|
||||||
|
PlaceDialog(-2, -2)
|
||||||
|
|
||||||
End Event
|
End Event
|
||||||
|
|
||||||
|
|
||||||
Event CMB_REACTOR_MODE.CHANGED
|
Event CMB_REACTOR_MODE.CHANGED
|
||||||
|
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
ReactorModeRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModeRecKey)
|
ReactorModeRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModeRecKey)
|
||||||
E10State = ReactorModeRec<REACTOR_MODES_E10_STATE$>
|
E10State = ReactorModeRec<REACTOR_MODES_E10_STATE$>
|
||||||
@ -72,7 +108,6 @@ Event CMB_REACTOR_MODE.CHANGED
|
|||||||
NotificationClasses = ReactorModeRec<REACTOR_MODES_NOTIFY_CLASS$>
|
NotificationClasses = ReactorModeRec<REACTOR_MODES_NOTIFY_CLASS$>
|
||||||
swap @VM with @FM in NotificationClasses
|
swap @VM with @FM in NotificationClasses
|
||||||
|
|
||||||
|
|
||||||
Icon = ReactorModeRec<REACTOR_MODES_ICON$> : '.bmp'
|
Icon = ReactorModeRec<REACTOR_MODES_ICON$> : '.bmp'
|
||||||
|
|
||||||
ServiceCategoryArr = ''
|
ServiceCategoryArr = ''
|
||||||
@ -91,8 +126,10 @@ Event CMB_REACTOR_MODE.CHANGED
|
|||||||
Set_Property(@Window: '.CMB_ENTER_OPTIONS', 'TEXT' , '')
|
Set_Property(@Window: '.CMB_ENTER_OPTIONS', 'TEXT' , '')
|
||||||
Set_Property(@Window: '.CMB_EXIT_OPTIONS', 'TEXT' , '')
|
Set_Property(@Window: '.CMB_EXIT_OPTIONS', 'TEXT' , '')
|
||||||
Set_Property(@Window: '.CMB_NOTIFY_OPTIONS', 'TEXT' , '')
|
Set_Property(@Window: '.CMB_NOTIFY_OPTIONS', 'TEXT' , '')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event BTN_NEW_PROB_CAT.CLICK
|
Event BTN_NEW_PROB_CAT.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
@ -102,12 +139,38 @@ Event BTN_NEW_PROB_CAT.CLICK
|
|||||||
ErrMsg('You must be authorized to change reactor mode categories')
|
ErrMsg('You must be authorized to change reactor mode categories')
|
||||||
Return
|
Return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_ADD_EXISTING_CAT.CLICK()
|
||||||
|
|
||||||
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
|
SelCats = Popup(@Window, '', 'REACT_CAT_DESC')
|
||||||
|
If SelCats NE '' then
|
||||||
|
Done = False$
|
||||||
|
For each SelCat in SelCats using @FM setting fPos
|
||||||
|
SelCatId = SelCat<0, 1>
|
||||||
|
Reactor_Modes_Services('AddExistingServiceCategory', ReactorModeRecKey, SelCatId)
|
||||||
|
If Error_Services('HasError') then
|
||||||
|
Error_Services('DisplayError')
|
||||||
|
Done = True$
|
||||||
|
end
|
||||||
|
Until Done
|
||||||
|
Next SelCat
|
||||||
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrMsg('You must be authorized to change reactor mode categories')
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event BTN_DELETE_CAT.CLICK
|
Event BTN_DELETE_CAT.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
CatArray = Get_Property(@Window:'.TBL_SERVICE_CATS', 'ARRAY')
|
CatArray = Get_Property(@Window:'.TBL_SERVICE_CATS', 'ARRAY')
|
||||||
@ -120,9 +183,12 @@ Event BTN_DELETE_CAT.CLICK
|
|||||||
end
|
end
|
||||||
|
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_ADD_ENTER.CLICK
|
Event PUB_ADD_ENTER.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
Selected = Get_Property(@Window: '.CMB_ENTER_OPTIONS', "TEXT")
|
Selected = Get_Property(@Window: '.CMB_ENTER_OPTIONS', "TEXT")
|
||||||
@ -135,9 +201,12 @@ Event PUB_ADD_ENTER.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_ADD_EXIT.CLICK
|
Event PUB_ADD_EXIT.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
Selected = Get_Property(@Window: '.CMB_EXIT_OPTIONS', "TEXT")
|
Selected = Get_Property(@Window: '.CMB_EXIT_OPTIONS', "TEXT")
|
||||||
@ -150,9 +219,12 @@ Event PUB_ADD_EXIT.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_REMOVE_ENTER.CLICK
|
Event PUB_REMOVE_ENTER.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
EnterArray = Get_Property(@Window:'.EDT_ENTER_PERMISSIONS', 'ARRAY')
|
EnterArray = Get_Property(@Window:'.EDT_ENTER_PERMISSIONS', 'ARRAY')
|
||||||
@ -167,9 +239,12 @@ Event PUB_REMOVE_ENTER.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_REMOVE_EXIT.CLICK
|
Event PUB_REMOVE_EXIT.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
ExitArray = Get_Property(@Window:'.EDT_EXIT_PERMISSIONS', 'ARRAY')
|
ExitArray = Get_Property(@Window:'.EDT_EXIT_PERMISSIONS', 'ARRAY')
|
||||||
@ -184,9 +259,12 @@ Event PUB_REMOVE_EXIT.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event CHK_NOTIFICATION_ACTIVE.CLICK
|
Event CHK_NOTIFICATION_ACTIVE.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
newNotify = Get_Property(@Window: '.CHK_NOTIFICATION_ACTIVE', 'CHECK')
|
newNotify = Get_Property(@Window: '.CHK_NOTIFICATION_ACTIVE', 'CHECK')
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
@ -197,9 +275,12 @@ Event CHK_NOTIFICATION_ACTIVE.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_ADD_NOTIFY.CLICK
|
Event PUB_ADD_NOTIFY.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
Selected = Get_Property(@Window: '.CMB_NOTIFY_OPTIONS', "TEXT")
|
Selected = Get_Property(@Window: '.CMB_NOTIFY_OPTIONS', "TEXT")
|
||||||
@ -212,9 +293,12 @@ Event PUB_ADD_NOTIFY.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
|
||||||
Event PUB_DELETE_NOTIFY.CLICK
|
Event PUB_DELETE_NOTIFY.CLICK
|
||||||
|
|
||||||
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
If MemberOf(@USER4,'ENGINEERING') OR MemberOf(@USER4,'SUPERVISOR') OR MemberOf(@User4, 'OI_ADMIN') then
|
||||||
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
ReactorModeRecKey = Get_Property(@WINDOW : '.CMB_REACTOR_MODE', 'DEFPROP')
|
||||||
NotifArray = Get_Property(@Window:'.EDT_NOTIFICATION_CLASSES', 'ARRAY')
|
NotifArray = Get_Property(@Window:'.EDT_NOTIFICATION_CLASSES', 'ARRAY')
|
||||||
@ -229,5 +313,6 @@ Event PUB_DELETE_NOTIFY.CLICK
|
|||||||
msg('', 'You must be authorized to change reactor mode records')
|
msg('', 'You must be authorized to change reactor mode records')
|
||||||
end
|
end
|
||||||
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
Send_Event(@Window : '.CMB_REACTOR_MODE', 'CHANGED')
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
@ -1,14 +1,39 @@
|
|||||||
Compile function REACTOR_MODES_Services(@Service, @Params)
|
Compile function REACTOR_MODES_Services(@Service, @Params)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
|
||||||
|
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||||
|
permission from SRP Computer Solutions, Inc.
|
||||||
|
|
||||||
|
Name : Reactor_Modes_Services
|
||||||
|
|
||||||
|
Description : Handler program for all module related services.
|
||||||
|
|
||||||
|
Notes : The generic parameters should contain all the necessary information to process the services. Often
|
||||||
|
this will be information like the data Record and Key ID.
|
||||||
|
|
||||||
|
Parameters :
|
||||||
|
Service [in] -- Name of the service being requested
|
||||||
|
Param1-10 [in/out] -- Additional request parameter holders
|
||||||
|
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||||
|
|
||||||
|
Metadata :
|
||||||
|
|
||||||
|
History : (Date, Initials, Notes)
|
||||||
|
11/13/2024 djs Added AddExistingServiceCategory
|
||||||
|
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#pragma precomp SRP_PreCompiler
|
||||||
|
|
||||||
|
$Insert LOGICAL
|
||||||
|
$Insert SERVICE_SETUP
|
||||||
|
$Insert REACTOR_MODES_EQUATES
|
||||||
|
$Insert REACT_PROB_CAT_EQUATES
|
||||||
|
$Insert REACTOR_EQUATES
|
||||||
|
$Insert RLIST_EQUATES
|
||||||
|
|
||||||
Declare function Database_Services, React_Prob_Cat_Services, Reactor_Modes_Services, Memberof, Error_Services
|
Declare function Database_Services, React_Prob_Cat_Services, Reactor_Modes_Services, Memberof, Error_Services
|
||||||
Declare subroutine Error_Services, Database_Services, delete, RList, Reactor_Services
|
Declare subroutine Error_Services, Database_Services, delete, RList, Reactor_Services
|
||||||
|
|
||||||
#pragma precomp SRP_PreCompiler
|
|
||||||
$insert LOGICAL
|
|
||||||
$insert REACTOR_MODES_EQUATES
|
|
||||||
$Insert REACTOR_EQUATES
|
|
||||||
$insert rlist_equates
|
|
||||||
|
|
||||||
GoToService
|
GoToService
|
||||||
|
|
||||||
Return Response or ""
|
Return Response or ""
|
||||||
@ -18,6 +43,7 @@ Return Response or ""
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
Service AddNotificationGroup(ReactorModesKey, Class)
|
Service AddNotificationGroup(ReactorModesKey, Class)
|
||||||
|
|
||||||
If ReactorModesKey NE '' AND Class NE '' then
|
If ReactorModesKey NE '' AND Class NE '' then
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
||||||
Locate Class in ReactorModesRec<REACTOR_MODES_NOTIFY_CLASS$> using @VM setting dummy then
|
Locate Class in ReactorModesRec<REACTOR_MODES_NOTIFY_CLASS$> using @VM setting dummy then
|
||||||
@ -33,9 +59,12 @@ Service AddNotificationGroup(ReactorModesKey, Class)
|
|||||||
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Class ID.')
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Class ID.')
|
||||||
Return
|
Return
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service DeleteNotificationGroup(ReactorModesKey, Class)
|
Service DeleteNotificationGroup(ReactorModesKey, Class)
|
||||||
|
|
||||||
If ReactorModesKey NE '' AND Class NE '' then
|
If ReactorModesKey NE '' AND Class NE '' then
|
||||||
|
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
||||||
@ -46,9 +75,12 @@ Service DeleteNotificationGroup(ReactorModesKey, Class)
|
|||||||
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Class ID.')
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Class ID.')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service AddEnterPermission(ReactorModesKey, Group)
|
Service AddEnterPermission(ReactorModesKey, Group)
|
||||||
|
|
||||||
If ReactorModesKey NE '' AND Group NE '' then
|
If ReactorModesKey NE '' AND Group NE '' then
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
||||||
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_ENTER$> using @VM setting dummy then
|
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_ENTER$> using @VM setting dummy then
|
||||||
@ -64,9 +96,12 @@ Service AddEnterPermission(ReactorModesKey, Group)
|
|||||||
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Group ID.')
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Group ID.')
|
||||||
Return
|
Return
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service AddReleasePermission(ReactorModesKey, Group)
|
Service AddReleasePermission(ReactorModesKey, Group)
|
||||||
|
|
||||||
If ReactorModesKey NE '' AND Group NE '' then
|
If ReactorModesKey NE '' AND Group NE '' then
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
||||||
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_RELEASE$> using @VM setting dummy then
|
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_RELEASE$> using @VM setting dummy then
|
||||||
@ -82,9 +117,12 @@ Service AddReleasePermission(ReactorModesKey, Group)
|
|||||||
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Group ID.')
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey or Group ID.')
|
||||||
Return
|
Return
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service AddServiceCategory(ReactorModesKey, NewServiceName, NewServiceCategory)
|
Service AddServiceCategory(ReactorModesKey, NewServiceName, NewServiceCategory)
|
||||||
|
|
||||||
If ReactorModesKey EQ '' then
|
If ReactorModesKey EQ '' then
|
||||||
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey.')
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey.')
|
||||||
Return
|
Return
|
||||||
@ -97,35 +135,69 @@ Service AddServiceCategory(ReactorModesKey, NewServiceName, NewServiceCategory)
|
|||||||
|
|
||||||
Database_Services('WriteDataRow','REACTOR_MODES',ReactorModesKey,ReactorModesRec,1,0,1)
|
Database_Services('WriteDataRow','REACTOR_MODES',ReactorModesKey,ReactorModesRec,1,0,1)
|
||||||
|
|
||||||
|
End Service
|
||||||
|
|
||||||
|
|
||||||
|
Service AddExistingServiceCategory(ReactorModesKey, ServCatId)
|
||||||
|
|
||||||
|
If ReactorModesKey NE '' then
|
||||||
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
If RowExists('REACT_PROB_CAT', ServCatId) then
|
||||||
|
ServName = Xlate('REACT_PROB_CAT', ServCatId, REACT_PROB_CAT_REACTOR_PROBLEM_CATEGORY$, 'X')
|
||||||
|
CurrCats = ReactorModesRec<REACTOR_MODES_SERVICE_CATEGORY_ID$>
|
||||||
|
Locate ServCatId in CurrCats using @VM setting vPos else
|
||||||
|
ReactorModesRec<REACTOR_MODES_SERVICE_CATEGORIES$, -1> = ServName
|
||||||
|
ReactorModesRec<REACTOR_MODES_SERVICE_CATEGORY_ID$, -1> = ServCatId
|
||||||
|
Database_Services('WriteDataRow', 'REACTOR_MODES', ReactorModesKey, ReactorModesRec, True$, False$, True$)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
Error_Services('Add', 'Error in ':Service:' service. REACT_PROB_CAT ':ServCatId:' does not exist!')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
Error_Services('Add', 'Error in REACTOR_MODES_SERVICES: Null parameter ReactorModesKey.')
|
||||||
|
end
|
||||||
|
|
||||||
End Service
|
End Service
|
||||||
|
|
||||||
|
|
||||||
Service DeleteServiceCategory(ReactorModesKey, CatId)
|
Service DeleteServiceCategory(ReactorModesKey, CatId)
|
||||||
|
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
||||||
Locate CatId in ReactorModesRec<REACTOR_MODES_SERVICE_CATEGORY_ID$> using @VM setting catPos then
|
Locate CatId in ReactorModesRec<REACTOR_MODES_SERVICE_CATEGORY_ID$> using @VM setting catPos then
|
||||||
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_SERVICE_CATEGORY_ID$,catPos,0)
|
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_SERVICE_CATEGORY_ID$,catPos,0)
|
||||||
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_SERVICE_CATEGORIES$,catPos,0)
|
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_SERVICE_CATEGORIES$,catPos,0)
|
||||||
end
|
end
|
||||||
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service DeleteEnterPermission(ReactorModesKey, Group)
|
Service DeleteEnterPermission(ReactorModesKey, Group)
|
||||||
|
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
||||||
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_ENTER$> using @VM setting groupPos then
|
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_ENTER$> using @VM setting groupPos then
|
||||||
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_GROUPS_ENTER$,groupPos,0)
|
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_GROUPS_ENTER$,groupPos,0)
|
||||||
end
|
end
|
||||||
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service DeleteReleasePermission(ReactorModesKey, Group)
|
Service DeleteReleasePermission(ReactorModesKey, Group)
|
||||||
|
|
||||||
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
ReactorModesRec = Database_Services('ReadDataRow', 'REACTOR_MODES', ReactorModesKey,1,0,1)
|
||||||
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_RELEASE$> using @VM setting groupPos then
|
Locate Group in ReactorModesRec<REACTOR_MODES_GROUPS_RELEASE$> using @VM setting groupPos then
|
||||||
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_GROUPS_RELEASE$,groupPos,0)
|
ReactorModesRec = Delete(ReactorModesRec,REACTOR_MODES_GROUPS_RELEASE$,groupPos,0)
|
||||||
end
|
end
|
||||||
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
Database_Services('WriteDataRow', 'REACTOR_MODES',ReactorModesKey,ReactorModesRec)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetAllModes()
|
Service GetAllModes()
|
||||||
|
|
||||||
Statement = 'SELECT REACTOR_MODES BY DESCRIPTION'
|
Statement = 'SELECT REACTOR_MODES BY DESCRIPTION'
|
||||||
rlist( Statement, target_activelist$, '', '', '' )
|
rlist( Statement, target_activelist$, '', '', '' )
|
||||||
ModeList = ''
|
ModeList = ''
|
||||||
@ -140,9 +212,12 @@ Service GetAllModes()
|
|||||||
Repeat
|
Repeat
|
||||||
end
|
end
|
||||||
Response = ModeList
|
Response = ModeList
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service AvailableModes(ReactorModesKey, CurrUser, ReactNo)
|
Service AvailableModes(ReactorModesKey, CurrUser, ReactNo)
|
||||||
|
|
||||||
CurrMode = ReactorModesKey
|
CurrMode = ReactorModesKey
|
||||||
AllowedModes = ''
|
AllowedModes = ''
|
||||||
CurModeReleaseGroups = XLATE('REACTOR_MODES', ReactorModesKey, REACTOR_MODES_GROUPS_RELEASE$, 'X')
|
CurModeReleaseGroups = XLATE('REACTOR_MODES', ReactorModesKey, REACTOR_MODES_GROUPS_RELEASE$, 'X')
|
||||||
@ -223,9 +298,6 @@ Service AvailableModes(ReactorModesKey, CurrUser, ReactNo)
|
|||||||
Next PossibleMode
|
Next PossibleMode
|
||||||
end
|
end
|
||||||
Response = AllowedModes
|
Response = AllowedModes
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user