pre cutover push
This commit is contained in:
@ -1,27 +1,63 @@
|
||||
Compile function REACT_MODE_CHG_NG_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
|
||||
Declare function center_window, msg, Memberof, Get_Property, NextKey, next_key, rowexists, Get_Status
|
||||
Declare function SRP_Array, start_window, Dialog_Box, Reactor_Log_Services, Reactor_Modes_Services, GetTickCount
|
||||
Declare function Reactor_Services, Error_Services, Logging_Services, Environment_Services
|
||||
Declare subroutine RList, Set_Property, Set_List_Box_Data, end_dialog, record_lock, obj_React_Mode, ErrMsg
|
||||
Declare subroutine Mona_Services, Reactor_Services, Error_Services, obj_React_Status, Logging_Services
|
||||
/***********************************************************************************************************************
|
||||
|
||||
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 Infineon.
|
||||
|
||||
Name : React_Mode_Chg_NG_Events
|
||||
|
||||
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)
|
||||
04/17/24 djs Replaced BACKCOLOR Set_Property calls with ENABLED -1 calls (disabled hard) in order to
|
||||
work around an OI 10 migration bug.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window REACT_MODE_CHG_NG
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$insert logical
|
||||
$insert REACT_MODE_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert REACT_MODE_EQUATES
|
||||
$Insert REACT_MODE_NG_EQUATES
|
||||
$Insert REACTOR_MODES_EQUATES
|
||||
$insert react_mode_equ ;* THESE ARE NOT THE SAME jch, Update 9/15/21. These are the equates for the CONFIG records
|
||||
$insert msg_equates
|
||||
$insert rlist_equates
|
||||
$insert react_prob_cat_equates
|
||||
$insert reactor_log_equ
|
||||
$insert react_util_equ
|
||||
$insert wo_log_equ
|
||||
$insert REACTOR_CHILD_KEY_IDS_EQUATES
|
||||
$Insert REACT_MODE_EQU ;* THESE ARE NOT THE SAME jch, Update 9/15/21. These are the equates for the CONFIG records
|
||||
$Insert MSG_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACT_PROB_CAT_EQUATES
|
||||
$Insert REACTOR_LOG_EQU
|
||||
$Insert REACT_UTIL_EQU
|
||||
$Insert WO_LOG_EQU
|
||||
$Insert REACTOR_CHILD_KEY_IDS_EQUATES
|
||||
$Insert REACTOR_EQUATES
|
||||
$Insert POPUP_EQUATES
|
||||
$insert Message_Box_Equates
|
||||
|
||||
Declare function center_window, msg, Memberof, Get_Property, NextKey, next_key, rowexists, Get_Status
|
||||
Declare function SRP_Array, start_window, Dialog_Box, Reactor_Log_Services, Reactor_Modes_Services, GetTickCount
|
||||
Declare function Reactor_Services, Error_Services, Logging_Services, Environment_Services, Database_Services
|
||||
Declare function SRP_List
|
||||
Declare subroutine RList, Set_Property, Set_List_Box_Data, end_dialog, record_lock, obj_React_Mode, ErrMsg
|
||||
Declare subroutine Mona_Services, Reactor_Services, Error_Services, obj_React_Status, Logging_Services
|
||||
Declare subroutine Database_Services, Override_Log_Services, SRP_List, Message_Box
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
@ -34,7 +70,7 @@ Return EventFlow or 1
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
//if @user4 eq 'JONATHAN_O' or @Username eq 'MESOUELLETTE' then debug
|
||||
|
||||
Reactor = CreateParam[1,'*']
|
||||
Wo = CreateParam[COL2()+1,'*']
|
||||
ForceModeChange = CreateParam[COL2()+1,'*']
|
||||
@ -49,24 +85,13 @@ Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
EventFlow = 1
|
||||
|
||||
//Get List of Reactor Modes
|
||||
Statement = 'SELECT REACTOR_MODES BY DESCRIPTION'
|
||||
rlist( Statement, target_activelist$, '', '', '' )
|
||||
ModeList = ''
|
||||
IF @RecCount then
|
||||
EoF = 0
|
||||
NumKeys = @RecCount
|
||||
Cnt = 0
|
||||
Loop
|
||||
ReadNext ReactorModeID Else EoF = 1
|
||||
until EoF
|
||||
ModeList<-1> = ReactorModeID
|
||||
Repeat
|
||||
end
|
||||
// Get List of Reactor Modes
|
||||
CurrentMode = Reactor_Services('GetReactCurrModeName', Reactor)
|
||||
ModeList = Reactor_Modes_Services('AvailableModes', CurrentMode, @User4, Reactor)
|
||||
Set_Property(@Window : '.MODE', 'LIST', ModeList)
|
||||
//End of Get list of Reactor Modes
|
||||
// End of Get list of Reactor Modes
|
||||
|
||||
//Find the current REACT_MODE OR REACT_MODE_NG record.
|
||||
// Find the current REACT_MODE OR REACT_MODE_NG record.
|
||||
OldGenReactModeKey = XLATE('REACTOR_CHILD_KEY_IDS', Reactor, REACTOR_CHILD_KEY_IDS_REACT_MODE_KEY_IDS$, 'X')
|
||||
NewGenReactModeKey = XLATE('REACTOR_CHILD_KEY_IDS_NG', Reactor, REACTOR_CHILD_KEY_IDS_REACT_MODE_KEY_IDS$, 'X')
|
||||
OldGenReactModeDTM = Field(OldGenReactModeKey, '*', 2)
|
||||
@ -80,11 +105,10 @@ Event WINDOW.CREATE(CreateParam)
|
||||
If NewGenReactModeDTM GT OldGenReactModeDTM then
|
||||
ReactModeKeyToUse = NewGenReactModeKey
|
||||
end
|
||||
//CurReactMode = Xlate('REACT_MODE', ReactModeKeyToUse, REACT_MODE_MODE$, 'X')
|
||||
//End find the current REACT_MODE OR REACT_MODE_NG record.
|
||||
// End find the current REACT_MODE OR REACT_MODE_NG record.
|
||||
|
||||
Set_List_Box_Data( @WINDOW )
|
||||
//check for Groups allowed to change
|
||||
// Check for Groups allowed to change
|
||||
IF memberof( @USER4, 'DATA_ENTRY' ) OR memberof( @USER4, 'SUPERVISOR' ) OR memberof( @USER4, 'MAINTENANCE' ) OR @USER4 EQ 'JONATHAN_O' THEN
|
||||
IF Reactor NE '' THEN
|
||||
* called from status window and createparam is the reactor number
|
||||
@ -122,15 +146,14 @@ Event WINDOW.CREATE(CreateParam)
|
||||
GOSUB DoRead
|
||||
END ;* End of check for Groups allowed to change
|
||||
|
||||
OriginalCommentBackColor = Get_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR')
|
||||
Set_Property(@Window, '@EDB_COMMENT_ORIG_BACK_COLOR', OriginalCommentBackColor)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR', 0)
|
||||
|
||||
OriginalCommentSize = Get_Property(@Window:'.EDB_COMMENT', 'SIZE')
|
||||
Set_Property(@Window, '@EDB_COMMENT_ORIG_SIZE', OriginalCommentSize)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event MODE.CHANGED()
|
||||
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'TEXT', '')
|
||||
|
||||
OrigMode = Get_Property(@Window: '.CURRENT_MODE', 'TEXT')
|
||||
@ -141,7 +164,6 @@ Event MODE.CHANGED()
|
||||
Set_Property(@Window : '.REACTMODESVC', 'TEXT', '')
|
||||
end else
|
||||
Set_Property(@Window : '.APPLY', 'ENABLED', 1)
|
||||
//Set_Property(@Window : '.REACTMODESVC', 'TEXT', '')
|
||||
end
|
||||
|
||||
CatDesc = Xlate('REACTOR_MODES', NewMode, REACTOR_MODES_SERVICE_CATEGORIES$, 'X')
|
||||
@ -159,15 +181,17 @@ Event MODE.CHANGED()
|
||||
If (NewMode _NEC 'WAITING_FOR_MAINTENANCE_UNSCHEDULED') and (NewMode _NEC 'WAITING_FOR_ENGTECH_UNSCHEDULED') then
|
||||
GoSub HideDropDownComments
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event REACTMODESVC.CHANGED()
|
||||
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'TEXT', '')
|
||||
|
||||
UseDropDownComments = 0
|
||||
NewMode = Get_Property(@Window : '.MODE', 'TEXT')
|
||||
SvcCat = Get_Property(@Window:'.REACTMODESVC', 'TEXT')
|
||||
NewMode = Get_Property(@Window : '.MODE', 'TEXT')
|
||||
SvcCat = Get_Property(@Window:'.REACTMODESVC', 'TEXT')
|
||||
|
||||
If NewMode _EQC 'WAITING_FOR_MAINTENANCE_UNSCHEDULED' then
|
||||
AvailableMaintComments = Xlate('APP_INFO', 'REACT_MODE_CHANGE_MAINT_COMMENT_OPTIONS', 1, 'X')
|
||||
@ -177,10 +201,10 @@ Event REACTMODESVC.CHANGED()
|
||||
end
|
||||
|
||||
If NewMode _EQC 'WAITING_FOR_ENGTECH_UNSCHEDULED' then
|
||||
AvailableEngrComments = Xlate('APP_INFO', 'REACT_MODE_CHANGE_ENGR_COMMENT_OPTIONS', 1, 'X')
|
||||
AvailableEngrComments = Xlate('APP_INFO', 'REACT_MODE_CHANGE_ENGR_COMMENT_OPTIONS', 1, 'X')
|
||||
Swap @VM with @FM in AvailableEngrComments
|
||||
Set_Property(@Window:'.COB_COMMENT', 'LIST', AvailableEngrComments)
|
||||
UseDropDownComments +=1
|
||||
UseDropDownComments += 1
|
||||
end
|
||||
|
||||
If SvcCat _EQC 'WF-PARTICLES' then
|
||||
@ -190,23 +214,23 @@ Event REACTMODESVC.CHANGED()
|
||||
If UseDropDownComments GT 1 then
|
||||
Set_Property(@Window:'.COB_COMMENT', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.COB_COMMENT', 'VISIBLE', True$)
|
||||
OrigBackColor = Get_Property(@Window, '@EDB_COMMENT_ORIG_BACK_COLOR')
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR', OrigBackColor)
|
||||
OriginalCommentSize = Get_Property(@Window, '@EDB_COMMENT_ORIG_SIZE')
|
||||
CommentSize = Get_Property(@Window, '@EDB_COMMENT_ORIG_SIZE')
|
||||
CommentSize<2> = CommentSize<2> + 37
|
||||
CommentSize<4> = 65
|
||||
CommentSize = Get_Property(@Window, '@EDB_COMMENT_ORIG_SIZE')
|
||||
CommentSize<2> = CommentSize<2> + 37
|
||||
CommentSize<4> = 65
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'SIZE', CommentSize)
|
||||
Set_Property(@Window:'.COB_COMMENT', 'TEXT', '')
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'ENABLED', -1)
|
||||
end else
|
||||
GoSub HideDropDownComments
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event APPLY.CLICK()
|
||||
|
||||
//Initialize Logging
|
||||
// Initialize Logging
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\ReactMode\LogFiles'
|
||||
Date = Oconv(Date(), 'D4/')
|
||||
LogFileName = Date[7, 4] : '-' : Date[1, 2] : '-' : Date[4, 2] : ' ReactMode Log.csv'
|
||||
@ -229,199 +253,226 @@ Event APPLY.CLICK()
|
||||
end
|
||||
end else
|
||||
NewNoteText = Get_Property(@Window:'.EDB_COMMENT', 'TEXT')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reactor_Services('CreateReactModeChange', @User4, ReactNo, NewMode, NewReactModeSvc, NewNoteText)
|
||||
If Error_Services('NoError') then
|
||||
End_Dialog(@Window, NewMode)
|
||||
end else
|
||||
Error_Services('DisplayError')
|
||||
ActiveProveIn = Xlate('REACTOR', ReactNo, REACTOR_PROVE_IN_ACTIVE$, 'X')
|
||||
If ActiveProveIn then
|
||||
OverrideGroups = 'LEAD':@VM:'SUPERVISOR'
|
||||
UserMsg = "Reactor prove in must be processed in NICA. Override required from a lead or supervisor to bypass NICA."
|
||||
UserVerification = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg)
|
||||
Override = UserVerification<1>
|
||||
If Override EQ True$ then
|
||||
ProveInOrderIds = Xlate('REACTOR', ReactNo, REACTOR_PROVE_IN_ORDER_ID$, 'X')
|
||||
ProveInOrderList = SRP_List('Create', ProveInOrderIds, @VM)
|
||||
ProveInTypes = Xlate('REACTOR', ReactNo, REACTOR_PROVE_IN_TYPE$, 'X')
|
||||
ProveInTypeList = SRP_List('Create', ProveInTypes, @VM)
|
||||
If SRP_List('Count', ProveInOrderList) GT 1 then
|
||||
OverrideData = Dialog_Box('PROVE_IN_OVERRIDE', @Window, ReactNo)
|
||||
|
||||
ProveInTypesToCancel = OverrideData<1, 1>
|
||||
ProveInTypesToCancelList = SRP_List('Create', ProveInTypesToCancel, @VM)
|
||||
|
||||
ResponseComment = ''
|
||||
for each ProveInType in ProveInTypes using @VM setting Idx
|
||||
If SRP_List('Locate', ProveInTypesToCancelList, ProveInType) GT 0 then
|
||||
ProveInOrderId = SRP_List('GetAt', ProveInOrderList, Idx)
|
||||
Reactor_Services('CancelReactorProveIn', ReactNo, ProveInOrderId)
|
||||
If ResponseComment NE '' then
|
||||
ResponseComment := ', '
|
||||
end
|
||||
ResponseComment := ProveInType
|
||||
end
|
||||
Next ProveInType
|
||||
|
||||
ResponseComment := ': '
|
||||
ResponseComment := OverrideData<2, 1>
|
||||
|
||||
Override_Log_Services('Create', 'REACTOR', ReactNo, UserVerification<2>, ResponseComment, 'REACTOR_PROVE_IN')
|
||||
|
||||
SRP_List('Release', ProveInTypesToCancelList)
|
||||
end else
|
||||
ResponseComment = Dialog_Box('NDW_ADD_COMMENT', @WINDOW)<2>
|
||||
|
||||
If Assigned(ResponseComment) and Len(ResponseComment) GT 4 then
|
||||
ProveInOrderId = SRP_List('GetAt', ProveInOrderList, 1)
|
||||
Reactor_Services('CancelReactorProveIn', ReactNo, ProveInOrderId)
|
||||
|
||||
Override_Log_Services('Create', 'REACTOR', ReactNo, UserVerification<2>, ResponseComment, 'REACTOR_PROVE_IN')
|
||||
|
||||
Reactor_Services('CreateReactModeChange', @User4, ReactNo, NewMode, NewReactModeSvc, NewNoteText)
|
||||
If Error_Services('NoError') then
|
||||
End_Dialog(@Window, NewMode)
|
||||
end
|
||||
end else
|
||||
Message_Box(@Window, 'You must enter a comment greater than 4 letters!', 'Error', MSG_ICON_EXCLAM$)
|
||||
end
|
||||
end
|
||||
SRP_List('Release', ProveInOrderList)
|
||||
SRP_List('Release', ProveInTypeList)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RETURN 0
|
||||
|
||||
EventFlow = 0
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event RL_BUTTON.CLICK()
|
||||
|
||||
If Get_Property('NDW_MAIN', 'VISIBLE') then
|
||||
AppMain = 'NDW_MAIN'
|
||||
end else
|
||||
AppMain = 'LSL_MAIN2'
|
||||
end
|
||||
|
||||
If Get_Property('NDW_MAIN', 'VISIBLE') then
|
||||
AppMain = 'NDW_MAIN'
|
||||
end else
|
||||
AppMain = 'LSL_MAIN2'
|
||||
end
|
||||
ReactorLogID = Get_Property(@Window : '.RLID', 'TEXT')
|
||||
|
||||
ReactorLogID = Get_Property(@Window : '.RLID', 'TEXT')
|
||||
//Void = start_window( 'REACTOR_LOG', AppMain, ReactorLogID:'*CENTER', '', '' )
|
||||
Void = Dialog_Box('REACTOR_LOG', AppMain, ReactorLogID:'*CENTER')
|
||||
void = Set_Property('REACTOR_LOG','@PARENT','REACT_MODE_CHG_NG')
|
||||
|
||||
//Void = start_window( 'REACTOR_LOG', AppMain, ReactorLogID:'*CENTER', '', '' )
|
||||
Void = Dialog_Box('REACTOR_LOG', AppMain, ReactorLogID:'*CENTER')
|
||||
void = Set_Property('REACTOR_LOG','@PARENT','REACT_MODE_CHG_NG')
|
||||
If Reactor_Log_Services('IsMaint', ReactorLogID) AND Reactor_Log_Services('IsSigned', ReactorLogID) then
|
||||
Set_Property(@Window : '.MODE', 'ENABLED', 1)
|
||||
end
|
||||
|
||||
If Reactor_Log_Services('IsMaint', ReactorLogID) AND Reactor_Log_Services('IsSigned', ReactorLogID) then
|
||||
Set_Property(@Window : '.MODE', 'ENABLED', 1)
|
||||
end
|
||||
|
||||
RETURN 0
|
||||
EventFlow = 0
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event CANCEL.CLICK()
|
||||
|
||||
Reactor = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
|
||||
CurMode = Get_Property(@Window: '.CURRENT_MODE','TEXT')
|
||||
End_Dialog(@Window, CurMode)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event COB_COMMENT.CHANGED()
|
||||
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'TEXT', '')
|
||||
Comment = Get_Property(@Window:'.COB_COMMENT', 'TEXT')
|
||||
If Comment _EQC 'other' then
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR', 0)
|
||||
end else
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'ENABLED', False$)
|
||||
OrigBackColor = Get_Property(@Window, '@EDB_COMMENT_ORIG_BACK_COLOR')
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR', OrigBackColor)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'ENABLED', -1)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// INTERNAL GOSUBS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
* * * * * * *
|
||||
DoRead:
|
||||
* * * * * * *
|
||||
|
||||
//Pull in the full REACT_MODE or REACT_MODE_NG record.
|
||||
CurReactModeRec = XLATE('REACT_MODE', ReactModeKeyToUse, '','X')
|
||||
If CurReactModeRec EQ '' then
|
||||
//If CurReactModeRec is blank then check the NG table for that record.
|
||||
CurReactModeRec = XLATE('REACT_MODE_NG', ReactModeKeyToUse, '','X')
|
||||
end
|
||||
|
||||
//This basically pulls in redundant information from a config table
|
||||
Rec = XLATE( 'CONFIG', 'REACT_MODE_NG':Reactor, '', 'X' )
|
||||
If Rec = '' then
|
||||
Rec = XLATE( 'CONFIG', 'REACT_MODE':Reactor, '', 'X' )
|
||||
end
|
||||
Service = Rec<Service$>
|
||||
Note = Rec<Note$>
|
||||
Mode = Rec<Mode$>
|
||||
ReactLogID = Rec<ReactorLogID$>
|
||||
ReactLogCat = XLATE('REACTOR_LOG', ReactLogID, 6, 'X')
|
||||
|
||||
//This determines if the current mode is a maint. mode and if so checks that the REACTOR_LOG has been signed off by a technician.
|
||||
* IF Rec<ReactorLogID$> NE '' AND ReactLogCat EQ 'M' THEN
|
||||
* debug
|
||||
* Set_Property(@Window : '.RL_BUTTON', 'VISIBLE', 1)
|
||||
* OPEN 'REACTOR_LOG' TO RLTable ELSE
|
||||
* msg( '', 'Unable to open REACTOR_LOG...' )
|
||||
* RETURN 0
|
||||
* END
|
||||
* READ RLRec from RLTable, ReactLogID THEN
|
||||
* IF RLRec<reactor_log_tech_sig$> = '' THEN
|
||||
* * DO NOT ALLOW A MODE CHANGE CAUSE THE REACTOR LOG IS STILL OPEN
|
||||
* MsgInfo = ''
|
||||
* MsgInfo<mtext$> = 'You are not allowed to change the mode because the maintenance tech has not signed off on the reactor log entry...'
|
||||
* MsgInfo<micon$> = '!'
|
||||
* Set_Property(@Window : '.MODE', 'ENABLED', 0);
|
||||
* NotSignedRL = 1
|
||||
* Void = msg( '', MsgInfo )
|
||||
*
|
||||
*
|
||||
* END ELSE
|
||||
* * ALLOW A MODE CHANGE CAUSE IT HAS BEEN SIGNED BY A MAINTENANCE TECHNICIAN
|
||||
*
|
||||
* END
|
||||
* END ELSE
|
||||
* * DO NOTHING CAUSE SOME MAINT GUY MUST HAVE DELETED THE ENTRY
|
||||
* END
|
||||
* END
|
||||
|
||||
IF ReactLogID NE '' then
|
||||
IF Reactor_Log_Services('IsMaint', ReactLogID) then
|
||||
Set_Property(@Window : '.RL_BUTTON', 'VISIBLE', 1)
|
||||
IF NOT(Reactor_Log_Services('IsSigned', ReactLogID)) then
|
||||
* DO NOT ALLOW A MODE CHANGE CAUSE THE REACTOR LOG IS STILL OPEN
|
||||
MsgInfo = ''
|
||||
MsgInfo<mtext$> = 'You are not allowed to change the mode because the maintenance tech has not signed off on the reactor log entry...'
|
||||
MsgInfo<micon$> = '!'
|
||||
Set_Property(@Window : '.MODE', 'ENABLED', 0);
|
||||
NotSignedRL = 1
|
||||
Void = msg( '', MsgInfo )
|
||||
end
|
||||
|
||||
end else
|
||||
* ALLOW A MODE CHANGE CAUSE IT HAS BEEN SIGNED BY A MAINTENANCE TECHNICIAN
|
||||
// Pull in the full REACT_MODE or REACT_MODE_NG record.
|
||||
CurReactModeRec = XLATE('REACT_MODE', ReactModeKeyToUse, '','X')
|
||||
If CurReactModeRec EQ '' then
|
||||
//If CurReactModeRec is blank then check the NG table for that record.
|
||||
CurReactModeRec = XLATE('REACT_MODE_NG', ReactModeKeyToUse, '','X')
|
||||
end
|
||||
|
||||
// This basically pulls in redundant information from a config table
|
||||
Rec = XLATE( 'CONFIG', 'REACT_MODE_NG':Reactor, '', 'X' )
|
||||
If Rec = '' then
|
||||
Rec = XLATE( 'CONFIG', 'REACT_MODE':Reactor, '', 'X' )
|
||||
end
|
||||
Service = Rec<Service$>
|
||||
Note = Rec<Note$>
|
||||
Mode = Rec<Mode$>
|
||||
ReactLogID = Rec<ReactorLogID$>
|
||||
ReactLogCat = XLATE('REACTOR_LOG', ReactLogID, 6, 'X')
|
||||
|
||||
IF ReactLogID NE '' then
|
||||
IF Reactor_Log_Services('IsMaint', ReactLogID) then
|
||||
Set_Property(@Window : '.RL_BUTTON', 'VISIBLE', 1)
|
||||
IF NOT(Reactor_Log_Services('IsSigned', ReactLogID)) then
|
||||
* DO NOT ALLOW A MODE CHANGE CAUSE THE REACTOR LOG IS STILL OPEN
|
||||
MsgInfo = ''
|
||||
MsgInfo<mtext$> = 'You are not allowed to change the mode because the maintenance tech has not signed off on the reactor log entry...'
|
||||
MsgInfo<micon$> = '!'
|
||||
Set_Property(@Window : '.MODE', 'ENABLED', 0);
|
||||
NotSignedRL = 1
|
||||
Void = msg( '', MsgInfo )
|
||||
end
|
||||
|
||||
end else
|
||||
* ALLOW A MODE CHANGE CAUSE IT HAS BEEN SIGNED BY A MAINTENANCE TECHNICIAN
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Set_Property(@WINDOW:'.REACTOR_NO','TEXT', Reactor)
|
||||
Set_Property(@WINDOW:'.USERNAME','TEXT', Rec<Username$>)
|
||||
Set_Property(@WINDOW:'.DATE','TEXT', Rec<Date$>)
|
||||
Set_Property(@WINDOW:'.TIME','TEXT', Rec<Time$>)
|
||||
Set_Property(@WINDOW:'.CURRENT_MODE','TEXT', Mode)
|
||||
Set_Property(@WINDOW:'.CURRENT_REACTMODESVC','TEXT', Service)
|
||||
//Set_Property(@WINDOW, '@Mode', Rec<Mode$> )
|
||||
Set_Property(@WINDOW:'.RUID','TEXT', Rec<ReactUtilID$>)
|
||||
Set_Property(@WINDOW:'.RLID','TEXT', Rec<ReactorLogID$>)
|
||||
Set_Property(@WINDOW:'.WO','TEXT', Wo)
|
||||
Set_Property(@WINDOW:'.REACTOR_NO','TEXT', Reactor)
|
||||
Set_Property(@WINDOW:'.USERNAME','TEXT', Rec<Username$>)
|
||||
Set_Property(@WINDOW:'.DATE','TEXT', Rec<Date$>)
|
||||
Set_Property(@WINDOW:'.TIME','TEXT', Rec<Time$>)
|
||||
Set_Property(@WINDOW:'.CURRENT_MODE','TEXT', Mode)
|
||||
Set_Property(@WINDOW:'.CURRENT_REACTMODESVC','TEXT', Service)
|
||||
Set_Property(@WINDOW:'.RUID','TEXT', Rec<ReactUtilID$>)
|
||||
Set_Property(@WINDOW:'.RLID','TEXT', Rec<ReactorLogID$>)
|
||||
Set_Property(@WINDOW:'.WO','TEXT', Wo)
|
||||
|
||||
IF Service THEN
|
||||
Set_Property(@WINDOW:'.REACTMODESVC','VISIBLE',TRUE$)
|
||||
Set_Property(@WINDOW:'.SERV_LABEL','VISIBLE',TRUE$)
|
||||
//Set_Property(@WINDOW:'.REACTMODESVC','TEXT', Service)
|
||||
Set_Property(@WINDOW:'.REACTMODESVC','ENABLED', 0) ;* Do not allow them to change the service until they change the mode
|
||||
END
|
||||
IF Service THEN
|
||||
Set_Property(@WINDOW:'.REACTMODESVC','VISIBLE',TRUE$)
|
||||
Set_Property(@WINDOW:'.SERV_LABEL','VISIBLE',TRUE$)
|
||||
Set_Property(@WINDOW:'.REACTMODESVC','ENABLED', 0) ;* Do not allow them to change the service until they change the mode
|
||||
END
|
||||
|
||||
//Get Possible Modes here
|
||||
ModeList = ''
|
||||
ModeList = Reactor_Modes_Services('AvailableModes', Mode, @User4)
|
||||
Set_Property(@Window : '.MODE', 'LIST', ModeList)
|
||||
RETURN
|
||||
|
||||
* * * * * * * * * *
|
||||
TranslateOldCodes:
|
||||
* * * * * * * * * *
|
||||
ReactorModeList = Xlate('SYSREPOSPOPUPS', @APPID<1>:'**':'REACTOR_MODE', PDISPLAY$, 'X')
|
||||
ReactorModeArray = ReactorModeList<8>
|
||||
Convert @VM to @FM in ReactorModeArray
|
||||
Convert @SVM to @VM in ReactorModeArray
|
||||
|
||||
CurReactModeCode = XLATE('REACT_MODE', ReactModeKeyToUse, REACT_MODE_MODE$, 'X')
|
||||
|
||||
Locate CurReactModeCode in ReactorModeArray using @FM setting CodePos then
|
||||
NewMode = ReactorModeArray<CodePos, 2>
|
||||
end
|
||||
// Get Possible Modes here
|
||||
ModeList = ''
|
||||
ModeList = Reactor_Modes_Services('AvailableModes', Mode, @User4, Reactor)
|
||||
Set_Property(@Window : '.MODE', 'LIST', ModeList)
|
||||
|
||||
return
|
||||
|
||||
* * * * * * * * * * *
|
||||
|
||||
TranslateOldCodes:
|
||||
|
||||
ReactorModeList = Xlate('SYSREPOSPOPUPS', @APPID<1>:'**':'REACTOR_MODE', PDISPLAY$, 'X')
|
||||
ReactorModeArray = ReactorModeList<8>
|
||||
Convert @VM to @FM in ReactorModeArray
|
||||
Convert @SVM to @VM in ReactorModeArray
|
||||
|
||||
CurReactModeCode = XLATE('REACT_MODE', ReactModeKeyToUse, REACT_MODE_MODE$, 'X')
|
||||
|
||||
Locate CurReactModeCode in ReactorModeArray using @FM setting CodePos then
|
||||
NewMode = ReactorModeArray<CodePos, 2>
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
CheckReactorLogStatus:
|
||||
|
||||
return
|
||||
|
||||
* * * * * * * * * * *
|
||||
|
||||
ChangeOverAutoSet:
|
||||
* * * * * * * * * * *
|
||||
LastWO = ''
|
||||
NextWO = ''
|
||||
|
||||
|
||||
LastWO = ''
|
||||
NextWO = ''
|
||||
|
||||
return
|
||||
|
||||
|
||||
HideDropDownComments:
|
||||
|
||||
Set_Property(@Window:'.COB_COMMENT', 'ENABLED', False$)
|
||||
Set_Property(@Window:'.COB_COMMENT', 'VISIBLE', False$)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'VISIBLE', True$)
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'BACKCOLOR', 0)
|
||||
OriginalCommentSize = Get_Property(@Window, '@EDB_COMMENT_ORIG_SIZE')
|
||||
Set_Property(@Window:'.EDB_COMMENT', 'SIZE', OriginalCommentSize)
|
||||
Set_Property(@Window:'.COB_COMMENT', 'TEXT', '')
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user