1756 lines
45 KiB
Plaintext
1756 lines
45 KiB
Plaintext
COMPILE FUNCTION COMM_REACTOR_LOG(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
|
|
#pragma precomp SRP_PreCompiler
|
|
|
|
|
|
/*
|
|
Commuter module for COMM_REACTOR_LOG (Reactor_Log) window
|
|
|
|
09/9/2013 - John C. Henry, J.C. Henry & Co., Inc.
|
|
*/
|
|
|
|
|
|
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event, Set_List_Box_Data
|
|
DECLARE SUBROUTINE obj_Tables, Print_RootCause_Analysis, Database_Services, obj_React_Reads, obj_React_Event
|
|
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Dialog_Box, Yield
|
|
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, obj_Reactor_Log, obj_Post_Log
|
|
DECLARE SUBROUTINE Reactor_Log_Events, Reactor_Log_Services, Error_Services, React_Servs_Services, Reactor_Services
|
|
|
|
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, EntID, Repository, NextKey
|
|
DECLARE FUNCTION Send_Message, Msg, Security_Check, obj_React_Item, Select_Into, MemberOf, Create_Dialog, obj_Calendar
|
|
DECLARE FUNCTION GetAsyncKeyState, obj_Tables, MemberOf, Environment_Services, Database_Services, Rds_Services
|
|
Declare function Reactor_Services, Error_Services, React_Servs_Services, Reactor_Log_Services
|
|
|
|
$INSERT MSG_EQUATES
|
|
$INSERT APPCOLORS
|
|
$INSERT LSL_USERS_EQU
|
|
$INSERT SECURITY_RIGHTS_EQU
|
|
$INSERT POPUP_EQUATES
|
|
$INSERT RTI_STYLE_EQUATES
|
|
$INSERT RLIST_EQUATES
|
|
$INSERT REACT_SERVS_EQUATES
|
|
$INSERT REACT_PROB_CAT_EQUATES
|
|
$INSERT REACTOR_LOG_EQUATES
|
|
$INSERT REACT_SERV_CAT_EQUATES
|
|
$INSERT REACT_ITEM_EQUATES
|
|
$INSERT REACT_INJECTOR_EQUATES
|
|
$INSERT REACT_STATE_EQUATES
|
|
$INSERT EXCEL_EQU
|
|
$INSERT REACTOR_PM_EQUATES
|
|
$INSERT REACTOR_EQUATES
|
|
$Insert RDS_EQUATES
|
|
$INSERT LOGICAL
|
|
|
|
EQU WM_USER$ TO 1024
|
|
EQU DTM_EDITCURCELL$ TO WM_USER$ + 95
|
|
EQU DT_BEGINEDIT$ TO 1
|
|
EQU DT_ENDEDIT$ TO 2
|
|
EQU DT_ABORTEDIT$ TO 3
|
|
|
|
EQU CRLF$ TO \0D0A\
|
|
EQU TAB$ TO \09\
|
|
|
|
EQU COL$PROB_CAT TO 1 ;* Used in .SERV_INFO
|
|
EQU COL$PROB_CAT_DESC TO 2
|
|
EQU COL$SERV_ID TO 3
|
|
EQU COL$SERV_ID_DESC TO 4
|
|
EQU COL$SCHED TO 5
|
|
EQU COL$ITEM_TYPE TO 6
|
|
EQU COL$ITEM_ID TO 7
|
|
EQU COL$ITEM_RI_NO TO 8
|
|
|
|
EQU COL$RI_NO TO 1 ;* Used in .REM_RI_NO and .INST_RI_NO
|
|
EQU COL$RI_SERIAL TO 2
|
|
EQU COL$RI_TYPE TO 3
|
|
EQU COL$RI_PART_NO TO 4
|
|
EQU COL$RI_PART_REV TO 5
|
|
EQU COL$RI_SERIAL_NO TO 6
|
|
EQU COL$RI_DISP TO 7
|
|
|
|
|
|
EQU COL$INST_RHI_KEY TO 7
|
|
EQU COL$REM_RHI_KEY TO 9
|
|
|
|
|
|
EQU COL$CURR_RI_NO TO 1 ;* Used in .CURR_REACT_ITEMS
|
|
EQU COL$CURR_SERIAL TO 2
|
|
EQU COL$CURR_RI_TYPE TO 3
|
|
EQU COL$CURR_INST_DTM TO 4
|
|
EQU COL$CURR_DESC TO 5
|
|
EQU COL$CURR_RL_ID TO 6
|
|
|
|
|
|
LastServCol = COL$ITEM_ID
|
|
|
|
EQU COL$SIG TO 1
|
|
EQU COL$SIG_DTM TO 2
|
|
EQU COL$SIG_NOTE TO 3
|
|
|
|
|
|
EQU HIDDEN$ TO 32
|
|
EQU SKIPPED$ TO 4100
|
|
|
|
ErrTitle = 'Error in Reactor_Log'
|
|
ErrorMsg = ''
|
|
|
|
Result = ''
|
|
|
|
BEGIN CASE
|
|
CASE EntID = @WINDOW
|
|
BEGIN CASE
|
|
CASE Event = 'CREATE' ; GOSUB Create
|
|
CASE Event = 'CLEAR' ; GOSUB Clear
|
|
CASE Event = 'CLOSE' ; GOSUB Close
|
|
CASE Event = 'WRITE' ; GOSUB Write
|
|
CASE Event = 'READ' ; GOSUB Read
|
|
CASE Event = 'PAGE' ; GOSUB Page
|
|
CASE Event = 'VSCROLL' ; GOSUB VScroll
|
|
CASE Event = 'DELETE' ; GOSUB Delete
|
|
CASE Event[1,3] = 'QBF' ; GOSUB Refresh
|
|
|
|
END CASE
|
|
|
|
CASE EntID = @WINDOW:'.LOTO' AND Event = 'CLICK' ; GOSUB LOTOClick
|
|
CASE EntID = @WINDOW:'.LO_NA' AND Event = 'CLICK' ; GOSUB Refresh
|
|
CASE EntID = @WINDOW:'.LO_REVIEWED' AND Event = 'CLICK' ; GOSUB Refresh
|
|
CASE EntID = @WINDOW:'.LU_RL_NO' AND Event = 'CLICK' ; GOSUB LURLNo
|
|
CASE EntID = @WINDOW:'.NEW_BUTTON' AND Event = 'CLICK' ; GOSUB New
|
|
CASE EntID = @WINDOW:'.TAB' AND Event = 'CLICK' ; GOSUB Page
|
|
CASE EntID = @WINDOW:'.ADD_BUTTON' AND Event = 'CLICK' ; GOSUB CopyRemove
|
|
CASE EntID = @WINDOW:'.POST_BUTTON' AND Event = 'CLICK' ; GOSUB PostItems
|
|
CASE EntID = @WINDOW:'.TECH_SIGN' AND Event = 'CLICK' ; GOSUB TechSign
|
|
CASE EntID = @WINDOW:'.REACT_WAFER_CNT' AND Event = 'LOSTFOCUS' ; GOSUB Refresh
|
|
CASE EntID = @WINDOW:'.INJ_SETTING' AND Event = 'LOSTFOCUS' ; GOSUB SettingLF
|
|
CASE EntID = @WINDOW:'.INJ_SETTING_HIST' AND Event = 'CLICK' ; GOSUB InjHistory
|
|
CASE EntID = @WINDOW:'.TEMP_INJ_POST' AND Event = 'CLICK' ; GOSUB InjPost
|
|
CASE EntID = @WINDOW:'.PRINT_ROOT_CAUSE' AND Event = 'CLICK' ; GOSUB PrintRootCause
|
|
|
|
CASE EntID = @WINDOW:'.SERV_INFO'
|
|
BEGIN CASE
|
|
CASE Event = 'POSCHANGED' ; GOSUB SvcsPC
|
|
CASE Event = 'OPTIONS' ; GOSUB SvcsOptions
|
|
CASE Event = 'GOTFOCUS' ; GOSUB SvcsGF
|
|
CASE Event = 'LOSTFOCUS' ; GOSUB SvcsLF
|
|
CASE Event = 'DBLCLK' ; GOSUB SvcsDC
|
|
END CASE
|
|
|
|
CASE EntID = @WINDOW:'.SHIFT_SIG'
|
|
BEGIN CASE
|
|
CASE Event = 'POSCHANGED' ; GOSUB ShiftSigPC
|
|
CASE Event = 'DBLCLK' ; GOSUB ShiftSigDC
|
|
END CASE
|
|
|
|
CASE EntID = @WINDOW:'.REM_RI_NO'
|
|
|
|
BEGIN CASE
|
|
CASE Event = 'DBLCLK' ; GOSUB RemRIDC
|
|
CASE Event = 'OPTIONS' ; GOSUB RemOptions
|
|
|
|
END CASE
|
|
|
|
CASE EntID = @WINDOW:'.CURR_REACT_ITEMS'
|
|
|
|
BEGIN CASE
|
|
CASE Event = 'DBLCLK' ; GOSUB CurrRIDC
|
|
END CASE
|
|
|
|
CASE 1
|
|
|
|
ErrorMsg = 'Unknown Parameters ':EntID:' - ':Event:' passed to commuter'
|
|
ErrMsg(ErrorMsg)
|
|
|
|
END CASE
|
|
|
|
IF ErrorMsg NE '' THEN
|
|
ErrMsg(ErrTitle:@SVM:ErrorMsg)
|
|
END
|
|
|
|
RETURN Result
|
|
|
|
|
|
* * * * * * *
|
|
Create:
|
|
* * * * * * *
|
|
|
|
IF NOT(MemberOf(@USER4,'MAINTENANCE')) AND NOT(MemberOf(@USER4,'SUPERVISOR')) THEN
|
|
ErrMsg('Please contact the System Administrator if you require access to this window')
|
|
Send_Event(@WINDOW,'CLOSE')
|
|
RETURN
|
|
END
|
|
|
|
obj_Appwindow('Create',@WINDOW)
|
|
|
|
Reactor_Log_Events(@Window, 'CREATE')
|
|
|
|
IF MemberOf(@USER4, 'OI_SUPERUSER') THEN
|
|
Set_Property(@WINDOW:'.TEMP_INJ_POST','VISIBLE',1)
|
|
|
|
END ELSE
|
|
Set_Property(@WINDOW:'.TEMP_INJ_POST','VISIBLE',0)
|
|
END
|
|
|
|
Keys = Field( Parm1, '*', 1 )
|
|
IF LEN(Keys) THEN
|
|
IF INDEX(Keys,@VM,1) THEN
|
|
Set_Property(@WINDOW,'QBFLIST',Keys)
|
|
END ELSE
|
|
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:Keys)
|
|
END
|
|
END
|
|
|
|
IF Security_Check( 'Reactor Log', Read$ ) THEN
|
|
Set_List_Box_Data( @WINDOW )
|
|
END ELSE
|
|
Security_Err_Msg( 'Reactor Log', Read$ )
|
|
Send_Event(@WINDOW,'CLOSE')
|
|
RETURN
|
|
END
|
|
|
|
IF NOT(Security_Check( 'Reactor Log', Edit$ )) THEN
|
|
Security_Err_Msg( 'Reactor Log', Edit$ )
|
|
END
|
|
|
|
IF NOT(MemberOf( @USER4, 'MAINTENANCE' )) THEN
|
|
Set_Property(@WINDOW:'.SERV_BUTTON_MULTI', 'VISIBLE', 0 )
|
|
END
|
|
|
|
col1Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$PROB_CAT,0)
|
|
col1Style = bitor(col1Style,DTCS_OPTIONSBUTTON$)
|
|
col1Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$PROB_CAT,0,col1Style)
|
|
|
|
col3Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$SERV_ID,0)
|
|
col3Style = bitor(col3Style,DTCS_OPTIONSBUTTON$)
|
|
col3Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$SERV_ID,0,col3Style)
|
|
|
|
col8Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$ITEM_ID,0)
|
|
col8Style = bitor(col8Style,DTCS_OPTIONSBUTTON$)
|
|
col8Style = Send_Message(@WINDOW:'.SERV_INFO','STYLE_BY_POS',COL$ITEM_ID,0,col8Style)
|
|
|
|
colStyle = Send_Message(@WINDOW:'.REM_RI_NO','STYLE_BY_POS',COL$RI_DISP,0)
|
|
colStyle = bitor(colStyle,DTCS_OPTIONSBUTTON$)
|
|
colStyle = Send_Message(@WINDOW:'.REM_RI_NO','STYLE_BY_POS',COL$RI_DISP,0,colStyle)
|
|
|
|
ReactorType = Get_Property(@WINDOW:'.REACT_TYPE','TEXT')
|
|
IF ReactorType = 'EPP' THEN
|
|
Set_Property(@Window:'.CHB_WAFERS_REMOVED', 'VISIBLE', False$)
|
|
end
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
Clear:
|
|
* * * * * * *
|
|
|
|
Page = 1
|
|
|
|
Send_Event(@WINDOW,'VSCROLL',Page)
|
|
Send_Event(@WINDOW,'PAGE',Page)
|
|
|
|
Reactor_Log_Events(@Window, 'CLEAR')
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
Page:
|
|
* * * * * * *
|
|
|
|
Page = Get_Property(@WINDOW:'.TAB', 'VALUE')
|
|
|
|
Set_Property(@WINDOW,'VPOSITION', Page)
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
VScroll:
|
|
* * * * * * *
|
|
|
|
Page = Parm1
|
|
|
|
Set_Property(@WINDOW:'.TAB','VALUE', Page)
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
New:
|
|
* * * * * * *
|
|
|
|
RLId = Get_Property(@WINDOW:'.REACTOR_LOG_NO','DEFPROP')
|
|
|
|
IF RLId = '' THEN
|
|
NextRLId = NextKey('REACTOR_LOG')
|
|
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:NextRLId)
|
|
END
|
|
|
|
GOSUB Refresh
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
* * * * * * *
|
|
Close:
|
|
* * * * * * *
|
|
|
|
ParentWindow = Get_Property(@WINDOW,'@PARENT')
|
|
|
|
If ParentWindow = 'REACT_MODE_CHG' Then
|
|
Send_Event(ParentWindow:'.CANCEL','CLICK')
|
|
END
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
* * * * * * *
|
|
Write:
|
|
* * * * * * *
|
|
|
|
RLId = Get_Property(@WINDOW:'.REACTOR_LOG_NO','DEFPROP')
|
|
ChangeDt = Get_Property(@WINDOW:'.END_DATE','TEXT')
|
|
ChangeTm = Get_Property(@WINDOW:'.END_TIME','TEXT')
|
|
ReactHrs = Get_Property(@WINDOW:'.REACT_HRS_START','DEFPROP')
|
|
ReactWaferCnt = Get_Property(@WINDOW:'.REACT_WAFER_CNT','DEFPROP')
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
Notes = Get_Property(@WINDOW:'.NOTES','DEFPROP')
|
|
|
|
IF ChangeDt NE '' AND ChangeTm NE '' THEN
|
|
|
|
ChangeDTM = ChangeDt:' ':ChangeTm
|
|
EnteredBy = @USER4
|
|
|
|
* Log new Reactor Read if the EndDate and EndTime if this record is newer than the last one logged for the reactor
|
|
|
|
IF ReactWaferCnt NE '' AND ReactNo NE '0' THEN
|
|
thisChangeDTM = ICONV(ChangeDTM,'DT')
|
|
|
|
LastWfrReadDTM = XLATE('REACTOR',ReactNo,REACTOR_LAST_READ_WFRS_DTM$,'X')
|
|
|
|
IF thisChangeDTM > LastWfrReadDTM THEN
|
|
|
|
obj_React_Reads('Create',ReactNo:@RM:EnteredBy:@RM:ChangeDTM:@RM:ReactWaferCnt)
|
|
errCode = ''
|
|
IF Get_Status(errCode) THEN
|
|
ErrMsg(errCode)
|
|
END
|
|
END
|
|
END
|
|
|
|
* Log Maintenance event in Reactor Event
|
|
|
|
oREParms = ReactNo:@RM
|
|
oREParms := ChangeDTM:@RM
|
|
oREParms := 'MTC':@RM
|
|
oREParms := EnteredBy:@RM
|
|
oREParms := Notes:@RM
|
|
oREParms := '':@RM ;* Not a mode change
|
|
oREParms := XLATE('REACTOR',ReactNo,'CURR_MODE','X') ;* Curr reactor mode
|
|
|
|
obj_React_Event('Create',oREParms)
|
|
|
|
END ;* End of check for ChangeDt and ChangeTm filled in
|
|
|
|
ROTRCheckStatus = Get_Property(@Window:'.CHECK_BOX_ROTR', 'CHECK')
|
|
If ROTRCheckStatus EQ False$ then
|
|
// Prompt user whether or not maintenance event is ROTR related
|
|
MsgHead = 'ROTR Reminder'
|
|
MsgText = 'Is this maintenance ROTR related?'
|
|
|
|
Response = Msg(@Window,'','YESNO','',MsgHead:@FM:MsgText)
|
|
|
|
If Response EQ True$ then
|
|
Set_Property(@Window:'.CHECK_BOX_ROTR', 'CHECK', True$)
|
|
* ReactorLogRec = Database_Services('ReadDataRow', 'REACTOR_LOG', RLId)
|
|
* ReactorLogRec<REACTOR_LOG_ROTR$> = True$
|
|
* Database_Services('WriteDataRow', 'REACTOR_LOG', RLId, ReactorLogRec, True$, False$, True$)
|
|
end
|
|
end
|
|
|
|
Reactor_Log_Events(@Window, 'WRITE')
|
|
|
|
Result = 1
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
Delete:
|
|
* * * * * * *
|
|
|
|
* Pre-Event called from DELETE event handler on window
|
|
|
|
IF Security_Check( 'Reactor Log', Delete$ ) THEN
|
|
Result = 1
|
|
END ELSE
|
|
Security_Err_Msg( 'Reactor Log', Delete$ )
|
|
Result = 0
|
|
END
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
Read:
|
|
* * * * * * *
|
|
|
|
* Check for and Set Entry data if null *
|
|
|
|
EntryID = Get_Property(@WINDOW:'.ENTRY_ID','DEFPROP')
|
|
|
|
IF EntryID = '' THEN
|
|
Set_Property(@WINDOW:'.ENTRY_ID','INVALUE',@USER4)
|
|
Set_Property(@WINDOW:'.ENTRY_DATE','DEFPROP',OCONV(Date(),'D4/'))
|
|
END
|
|
|
|
* Check for and Set Start data if null *
|
|
|
|
IF Get_Property(@WINDOW:'.START_DATE','DEFPROP') = '' THEN
|
|
|
|
Set_Property(@WINDOW:'.START_DATE','DEFPROP',OCONV(Date(),'D4/'))
|
|
Set_Property(@WINDOW:'.START_TIME','DEFPROP',OCONV(Time(),'MTS'))
|
|
|
|
END
|
|
|
|
* Check for any pending Reactor PM records *
|
|
|
|
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
|
|
IF RowExists('REACTOR',ReactNo) THEN
|
|
|
|
TechSig = Get_Property(@WINDOW:'.TECH_SIG','TEXT')
|
|
EndDate = Get_Property(@WINDOW:'.END_DATE','TEXT')
|
|
IDs = ''
|
|
|
|
IF ReactNo NE '' AND EndDate = '' THEN
|
|
|
|
* Check for PM's due
|
|
|
|
ReactPMIds = ''
|
|
Today = Date()
|
|
AWeekAndADayFromNow = OCONV(Today + 8, 'D2/' )
|
|
|
|
Statement = 'SELECT REACTOR_PM WITH COMPLETE_DATE = ""'
|
|
Statement := ' AND WITH NEXT_DONE < ':QUOTE( AWeekAndADayFromNow )
|
|
Statement := ' AND WITH REACTOR = ':ReactNo
|
|
Statement := ' BY NEXT_DONE'
|
|
|
|
RList( Statement, TARGET_ACTIVELIST$, '', '', '' )
|
|
|
|
@RN.COUNTER = 0
|
|
|
|
Done = 0
|
|
LOOP
|
|
READNEXT ReactPMId ELSE Done = 1
|
|
UNTIL Done
|
|
ReactPMIds<-1> = ReactPMId
|
|
REPEAT
|
|
|
|
IF ReactPMIds NE '' THEN
|
|
Dialog_Box( 'REACTOR_LOG_TODO', @WINDOW, ReactPMIds:CHAR(245):ReactNo)
|
|
END
|
|
END ;* End of check for ReactNo and no End Date)
|
|
|
|
|
|
END
|
|
|
|
GOSUB CalcRIHKeys
|
|
|
|
Reactor_Log_Events(@Window, 'READ')
|
|
|
|
|
|
* * * * * * *
|
|
Refresh:
|
|
* * * * * * *
|
|
|
|
LOReviewed = Get_Property(@WINDOW:'.LO_REVIEWED','CHECK')
|
|
LONotApp = Get_Property(@WINDOW:'.LO_NA','CHECK')
|
|
|
|
IF LOReviewed OR LONotApp THEN
|
|
Set_Property(@WINDOW:'.TECH_SIGN','ENABLED',1)
|
|
END ELSE
|
|
Set_Property(@WINDOW:'.TECH_SIGN','ENABLED',0)
|
|
END
|
|
|
|
TechSig = Get_Property(@WINDOW:'.TECH_SIG','DEFPROP')
|
|
PostSig = Get_Property(@WINDOW:'.RI_POST_BY','DEFPROP')
|
|
|
|
IF TechSig NE '' OR PostSig NE '' THEN
|
|
Set_Property(@WINDOW:'.REACTOR','ENABLED',0)
|
|
END ELSE
|
|
Set_Property(@WINDOW:'.REACTOR','ENABLED',1)
|
|
END
|
|
|
|
IF PostSig = '' THEN
|
|
RemText = 'Items Being Removed'
|
|
InstText = 'Items Being Installed'
|
|
ButtonText = 'Post Items'
|
|
END ELSE
|
|
RemText = 'Items Removed'
|
|
InstText = 'Items Installed'
|
|
ButtonText = 'Unpost Items'
|
|
END
|
|
|
|
Ctrls = @WINDOW:'.POST_BUTTON':@RM ; Props = 'TEXT':@RM ; Vals = ButtonText:@RM
|
|
Ctrls := @WINDOW:'.REMOVE_GROUP':@RM ; Props := 'TEXT':@RM ; Vals := RemText:@RM
|
|
Ctrls := @WINDOW:'.INST_GROUP' ; Props := 'TEXT' ; Vals := InstText
|
|
|
|
Set_Property(Ctrls,Props,Vals)
|
|
|
|
|
|
* Load ReactWfrCntEnd value ***************************************************
|
|
|
|
ItemArray = Get_Property(@WINDOW:'.SERV_INFO','DEFPROP')
|
|
ItemTypes = ICONV(ItemArray<COL$ITEM_TYPE>,'[CONV_CODE_DESC,REACT_ITEM_TYPE]')
|
|
|
|
StartWfrCnt = Get_Property(@WINDOW:'.REACT_WAFER_CNT','DEFPROP')
|
|
|
|
IF INDEX(ItemTypes,'T',1) THEN
|
|
EndWfrCnt = 0 ;* Tube being installed
|
|
Set_Property(@WINDOW:'.RESET_REMINDER','VISIBLE',1)
|
|
END ELSE
|
|
EndWfrCnt = StartWfrCnt ;* No tube change -> no reset
|
|
Set_Property(@WINDOW:'.RESET_REMINDER','VISIBLE',0)
|
|
END
|
|
|
|
Set_Property(@WINDOW:'.REACT_WFR_CNT_END','DEFPROP',EndWfrCnt) ;* New tubes start with zero wafers
|
|
|
|
|
|
* QBF buttons
|
|
|
|
Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM
|
|
Ctrls := @WINDOW:'.QBF_PREV_FIX':@RM ; Props := 'ENABLED':@RM
|
|
Ctrls := @WINDOW:'.QBF_ABS_FIX':@RM ; Props := 'ENABLED':@RM
|
|
Ctrls := @WINDOW:'.QBF_NEXT_FIX':@RM ; Props := 'ENABLED':@RM
|
|
Ctrls := @WINDOW:'.QBF_LAST_FIX':@RM ; Props := 'ENABLED':@RM
|
|
Ctrls := @WINDOW:'.QBF_STOP_FIX' ; Props := 'ENABLED'
|
|
|
|
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
|
|
Vals = 0:@RM:0:@RM:0:@RM:0:@RM:0:@RM:0
|
|
END ELSE
|
|
Vals = 1:@RM:1:@RM:1:@RM:1:@RM:1:@RM:1
|
|
END
|
|
|
|
Set_Property(Ctrls,Props,Vals)
|
|
|
|
* Turn edit table symbolic column backgrounds to green *
|
|
|
|
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
|
|
|
|
ETCtrls = ETSymbolics<1>
|
|
ETCols = ETSymbolics<2>
|
|
|
|
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
|
ETCtrl = ETCtrls<1,I>
|
|
ETList = Get_Property(ETCtrl,'LIST')
|
|
FOR Line = 1 TO COUNT(ETList,@FM) + (ETList NE '')
|
|
IF ETList<Line,1> NE '' THEN
|
|
FOR N = 1 TO COUNT(ETCols<1,I>,@SVM) + (ETCols<1,I> NE '')
|
|
stat = Send_Message(ETCtrl,'COLOR_BY_POS',ETCols<1,I,N>,Line,GREEN$)
|
|
NEXT N
|
|
END
|
|
NEXT I
|
|
NEXT I
|
|
|
|
* CurrItems Flagged for removal
|
|
|
|
IF Get_Property(@WINDOW:'.RI_POST_BY','DEFPROP') ='' THEN
|
|
|
|
RemRINos = Get_Property(@WINDOW:'.REM_RI_NO','ARRAY')<COL$RI_NO>
|
|
|
|
IF RemRINos NE '' THEN
|
|
CurrRINos = Get_Property(@WINDOW:'.CURR_REACT_ITEMS','ARRAY')<COL$CURR_RI_NO>
|
|
|
|
RemCnt = COUNT(RemRINos,@VM) + (RemRINos NE '')
|
|
|
|
FOR I = 1 TO RemCnt
|
|
RemRINo = RemRINos<1,I>
|
|
LOCATE RemRINo IN CurrRINos USING @VM SETTING Pos THEN
|
|
FOR N = 1 TO COL$CURR_RL_ID
|
|
stat = Send_Message(@WINDOW:'.CURR_REACT_ITEMS','COLOR_BY_POS',N,Pos,YELLOW$)
|
|
NEXT N
|
|
END
|
|
|
|
NEXT I
|
|
END ;* End of check for RemRINos
|
|
END ;* End of check for RI Posted signature
|
|
|
|
Reactor_Log_Events(@Window, 'OMNIEVENT')
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
LURLNo:
|
|
* * * * * * *
|
|
|
|
FocusControl = Parm1
|
|
FocusPos = Parm2
|
|
|
|
RetVal = Dialog_Box('REACTOR_LOG_QUERY',@WINDOW,'')
|
|
|
|
IF RetVal = '' THEN RETURN
|
|
|
|
CONVERT @FM TO @VM IN RetVal
|
|
|
|
TypeOver = ''
|
|
TypeOver<PMODE$> = 'K'
|
|
TypeOver<PDISPLAY$> = RetVal
|
|
|
|
RetVal = Popup( @WINDOW , TypeOver , 'REACTOR_LOG_QUERY' )
|
|
|
|
IF RetVal = '' THEN RETURN
|
|
|
|
IF INDEX(RetVal,@VM,1) THEN
|
|
Set_Property(@WINDOW,'QBFLIST',RetVal)
|
|
END ELSE
|
|
oaParms = RetVal:@RM:@WINDOW:'.':FocusControl
|
|
obj_Appwindow('LUValReturn',oaParms)
|
|
END
|
|
|
|
GOSUB Refresh
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
TechSign:
|
|
* * * * * * *
|
|
|
|
|
|
Action = Get_Property(@Window:'.TECH_SIGN', 'TEXT')
|
|
|
|
If Action EQ 'Sign' then
|
|
|
|
TechSig = Get_Property(@WINDOW:'.TECH_SIG','DEFPROP')
|
|
|
|
IF TechSig NE '' THEN
|
|
ErrMsg('Application Message':@SVM:'This log has already been signed.')
|
|
RETURN
|
|
END
|
|
|
|
AtRecord = Get_Property(@WINDOW,'ATRECORD')
|
|
ReactNo = AtRecord<REACTOR_LOG_REACTOR$>
|
|
|
|
wafersRemoved = Get_Property(@Window:'.CHB_WAFERS_REMOVED', 'CHECK')
|
|
If wafersRemoved EQ True$ then
|
|
RdsKeys = Reactor_Services('GetLoadedRds', ReactNo)
|
|
SelectedRdsKeys = ''
|
|
Begin Case
|
|
Case ((RdsKeys<1> NE '') and (RdsKeys<2> NE ''))
|
|
selectedLoadLocks = Dialog_Box("NDW_WAFERS_REMOVED_RDS_PROMPT", @Window)
|
|
|
|
For each selectedLoadLock in selectedLoadLocks using @VM
|
|
For idx = 1 to 2
|
|
rdsLoadLockSide = Xlate('RDS', RdsKeys<idx>, RDS_LOAD_LOCK_SIDE$, 'X')
|
|
If (rdsLoadLockSide _EQC selectedLoadLock) then
|
|
If (SelectedRdsKeys NE '') then SelectedRdsKeys := @VM
|
|
SelectedRdsKeys := RdsKeys<idx>
|
|
end
|
|
Next idx
|
|
Next selectedLoadLock
|
|
Case RdsKeys<1> NE ''
|
|
SelectedRdsKeys = RdsKeys<1>
|
|
Case RdsKeys<2> NE ''
|
|
SelectedRdsKeys = RdsKeys<2>
|
|
End Case
|
|
|
|
Set_Property(@Window:'.EDL_WAFERS_REMOVED_RDS', 'TEXT', SelectedRdsKeys)
|
|
end
|
|
|
|
PrevOptions = Get_Property(@Window, 'IOOPTIONS')
|
|
NewOptions = PrevOptions
|
|
NewOptions<6> = True$ ; // Do not clear the form on write
|
|
Set_Property(@Window, 'IOOPTIONS', NewOptions)
|
|
Send_Event(@Window, 'WRITE')
|
|
Set_Property(@Window, 'IOOPTIONS', PrevOptions)
|
|
ReactorlogNo = Get_Property(@Window:'.REACTOR_LOG_NO', 'TEXT')
|
|
|
|
|
|
|
|
Valid = Dialog_Box('QUOTE_SIG_PWD_ENTRY', @WINDOW, @USER4:@VM:XLATE( 'LSL_USERS', @USER4, LSL_USERS_PASSWORD$, 'X' ) )
|
|
|
|
If Valid then
|
|
SuccessfulSign = Reactor_Log_Services('SignReactorLog', ReactorLogNo, @USER4)
|
|
If SuccessfulSign EQ 0 then
|
|
Errors = Error_Services('DisplayError', '')
|
|
Send_Event(@Window, 'READ')
|
|
RETURN
|
|
end
|
|
Send_Event(@Window, 'READ')
|
|
end else
|
|
ErrMsg('Application Message':@SVM:'Invalid user password.')
|
|
end
|
|
|
|
* ReactType = Get_Property(@WINDOW:'.REACT_TYPE','DEFPROP')
|
|
*
|
|
* IF ReactType[1,3] NE 'Epi' THEN
|
|
*
|
|
* WfrCnt = Get_Property(@WINDOW:'.REACT_WAFER_CNT','DEFPROP')
|
|
* ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
*
|
|
* IF WfrCnt = '' AND ReactNo > 0 THEN
|
|
* ErrMsg('Application Message':@SVM:'Wafer Count must be completed prior to sign off.')
|
|
* RETURN
|
|
* END
|
|
* END
|
|
*
|
|
* CurrWindow = @WINDOW
|
|
*
|
|
* RemList = Get_Property(@WINDOW:'.REM_RI_NO','LIST')
|
|
*
|
|
* rlCnt = COUNT(RemList,@FM) + (RemList NE '')
|
|
*
|
|
* FOR I = 1 TO rlCnt
|
|
* RINo = RemList<I,COL$RI_NO>
|
|
* UNTIL RINo = ''
|
|
*
|
|
* IF RemList<I,COL$RI_DISP> = '' THEN
|
|
*
|
|
* * RINo without associated Disposition Code entered
|
|
*
|
|
* ErrMsg('Application Message':@SVM:'Disposition for items being removed has not been completed.')
|
|
*
|
|
* Set_Property(CurrWindow:'.TAB','VALUE',3)
|
|
* Send_Event(CurrWindow:'.TAB','CLICK')
|
|
*
|
|
* Set_Property(CurrWindow:'.REM_RI_NO','FOCUS',1)
|
|
* Set_Property(CurrWindow:'.REM_RI_NO','SELPOS',I:@FM:COL$RI_DISP)
|
|
*
|
|
* hTable = Get_Property(CurrWindow:'.REM_RI_NO','HANDLE')
|
|
*
|
|
* IF NOT(hTable) THEN
|
|
* ErrMsg('Problem Getting the handle to the REM_RI_NO control.')
|
|
* RETURN
|
|
* END
|
|
*
|
|
* void = Send_Message(hTable,DTM_EDITCURCELL$,DT_BEGINEDIT$,0)
|
|
*
|
|
* END ;* End of check for missing Disposition code on line with RI No
|
|
* NEXT I
|
|
*
|
|
*
|
|
* Valid = Dialog_Box('QUOTE_SIG_PWD_ENTRY', @WINDOW, @USER4:@VM:XLATE( 'LSL_USERS', @USER4, LSL_USERS_PASSWORD$, 'X' ) )
|
|
*
|
|
* IF Valid THEN
|
|
*
|
|
* CurrDt = Date()
|
|
* CurrTm = Time()
|
|
*
|
|
* Ctrls = @WINDOW:'.END_DATE':@RM ; Props = 'INVALUE':@RM ; Vals = CurrDt:@RM
|
|
* Ctrls := @WINDOW:'.END_TIME':@RM ; Props := 'INVALUE':@RM ; Vals := CurrTm:@RM
|
|
* Ctrls := @WINDOW:'.TECH_SIG' ; Props := 'DEFPROP' ; Vals := @USER4
|
|
*
|
|
* Set_Property(Ctrls,Props,Vals)
|
|
*
|
|
* Send_Event(@WINDOW:'.TECH_SIG_NAME','CALCULATE')
|
|
* Send_Event(@WINDOW:'.ELAPSED_HOURS','CALCULATE')
|
|
*
|
|
* AtRecord = Get_Property(@WINDOW,'ATRECORD')
|
|
* ReactNo = AtRecord<REACTOR_LOG_REACTOR$>
|
|
* RLId = Get_Property(@WINDOW:'.REACTOR_LOG_NO','DEFPROP')
|
|
*
|
|
* IF AtRecord<REACTOR_LOG_INST_RI_NO$> NE '' THEN
|
|
*
|
|
* PostBy = Get_Property(@WINDOW:'.RI_POST_BY','DEFPROP')
|
|
*
|
|
* IF PostBy = '' THEN
|
|
* GOSUB PostItems
|
|
* END
|
|
* END
|
|
*
|
|
*
|
|
* * * * Added 10/7/2014 JCH * * *
|
|
*
|
|
* IF Get_Property(@WINDOW:'.REACT_WFR_CNT_END','DEFPROP') = 0 THEN
|
|
*
|
|
* SignBy = Get_Property(@WINDOW:'.TECH_SIG','DEFPROP')
|
|
* CurrDTM = obj_Calendar('CurrDTM')
|
|
*
|
|
* obj_React_Reads('Create',ReactNo:@RM:SignBy:@RM:CurrDTM:@RM:'0')
|
|
*
|
|
* END
|
|
*
|
|
*
|
|
* * * * Added 2/13/2014 JCH * * *
|
|
*
|
|
* IF AtRecord<REACTOR_LOG_INJ_SETTING$> NE '' THEN
|
|
*
|
|
* plParms = 'REACT_STATE':@RM
|
|
* plParms := ReactNo:@RM
|
|
* plParms := REACT_STATE_CURR_INJ_RL_ID$:@RM
|
|
* plParms := RLId:@RM
|
|
*
|
|
* obj_Post_Log('Create',plParms)
|
|
*
|
|
* END ;* End of check for Injector Settings entered
|
|
*
|
|
* CurServices = Get_Property(@WINDOW:'.SERV_INFO','ARRAY')<COL$SERV_ID>
|
|
* LOOP
|
|
* TestChar = CurServices[-1,1]
|
|
* UNTIL TestChar NE @VM OR CurServices = ''
|
|
* CurServices[-1,1] = ''
|
|
* REPEAT
|
|
*
|
|
* CCnt = COUNT(CurServices,@VM) + (CurServices NE '')
|
|
*
|
|
* FOR N = 1 TO CCnt
|
|
* CurService = CurServices<1,N>
|
|
*
|
|
* OPEN 'REACTOR_PM' TO ReactorPMTable ELSE
|
|
* void = Msg( '', 'Unable to open REACTOR_PM...' )
|
|
* RETURN 0
|
|
* END
|
|
*
|
|
* OPEN 'DICT.REACTOR_PM' TO DictReactorPMTable ELSE
|
|
* void = Msg( '', 'Unable to open DICT.REACTOR_PM...' )
|
|
* RETURN 0
|
|
* END
|
|
* SearchStr = 'REACT_SERV_ID':@VM:CurService:@FM
|
|
* SearchStr := 'REACTOR':@VM:ReactNo:@FM
|
|
* SearchStr := 'COMPLETE_DATE':@VM:'':@FM
|
|
*
|
|
* Btree.Extract( SearchStr, 'REACTOR_PM', DictReactorPMTable, OpenPMKeys, '', Flag )
|
|
*
|
|
* IF Flag <> 0 THEN
|
|
* void = Msg( '', 'Error while extracting REACTOR_PM records...' )
|
|
* RETURN 0
|
|
* END
|
|
*
|
|
* EndDate = Date()
|
|
*
|
|
*
|
|
* * Add Maintenance metric reset
|
|
* AssocMetrics = React_Servs_Services('GetAssociatedMetrics', CurService)
|
|
* If AssocMetrics NE '' then
|
|
* MetricCount = Dcount(AssocMetrics, @VM)
|
|
* For MetricIndex = 1 to MetricCount
|
|
* ThisMetric = AssocMetrics<1,MetricIndex>
|
|
* Reactor_Services('ResetWfrMetric', ReactNo, ThisMetric)
|
|
* Next MetricIndex
|
|
* End
|
|
*
|
|
* IF OpenPMKeys NE '' THEN
|
|
*
|
|
* * If more than one, which should not happen then close all
|
|
*
|
|
* KCnt = COUNT( OpenPMKeys, @VM ) + (OpenPMKeys NE '')
|
|
*
|
|
* FOR I = 1 TO KCnt
|
|
*
|
|
* OpenPMKeys = OpenPMKeys<1,I>
|
|
*
|
|
* otlParms = 'REACTOR_PM':@RM
|
|
* otlParms := OpenPMKeys:@RM
|
|
* otlParms := REACTOR_PM_COMPLETE_DATE$:@VM:REACTOR_PM_COMP_RL_NO$:@RM
|
|
* otlParms := EndDate:@VM:RLId:@RM
|
|
*
|
|
* obj_Post_Log('Create',otlParms) ;* Closes previous PM record
|
|
*
|
|
* * Schedule next PM
|
|
*
|
|
* PMDays = XLATE( 'REACT_SERVS', CurService, REACT_SERVS_PM_DAYS$, 'X' )
|
|
*
|
|
* IF PMDays NE '' THEN
|
|
*
|
|
* PMNo = NextKey('REACTOR_PM')
|
|
*
|
|
* NewPMRec = ''
|
|
* NewPMRec<REACTOR_PM_ENTRY_ID$> = @USER4
|
|
* NewPMRec<REACTOR_PM_ENTRY_DATE$> = Date()
|
|
* NewPMRec<REACTOR_PM_REACTOR$> = ReactNo
|
|
* NewPMRec<REACTOR_PM_PREV_PM_COMP_DT$> = EndDate
|
|
* NewPMRec<REACTOR_PM_DUE_DT$> = EndDate + PMDays
|
|
* NewPMRec<REACTOR_PM_REACT_SERV_ID$> = CurService
|
|
* NewPMRec<rEACTOR_PM_ENTRY_RL_NO$> = RLId
|
|
*
|
|
* otParms = 'REACTOR_PM':@RM:PMNo:@RM:@RM:NewPMRec
|
|
* obj_Tables('WriteRec',otParms)
|
|
*
|
|
*
|
|
* END ;* End of check for PMDays
|
|
* NEXT I
|
|
* END ;* End of check for index keys returned
|
|
* NEXT N
|
|
*
|
|
* wafersRemoved = Get_Property(@Window:'.CHB_WAFERS_REMOVED', 'CHECK')
|
|
* If wafersRemoved EQ True$ then
|
|
* RdsKeys = Reactor_Services('GetLoadedRds', ReactNo)
|
|
* RdsKey = ''
|
|
* Begin Case
|
|
* Case ((RdsKeys<1> NE '') and (RdsKeys<2> NE ''))
|
|
* selectedLoadLock = Dialog_Box("NDW_WAFERS_REMOVED_RDS_PROMPT", @Window)
|
|
* For idx = 1 to 2
|
|
* rdsLoadLockSide = Xlate('RDS', RdsKeys<idx>, RDS_LOAD_LOCK_SIDE$, 'X')
|
|
* If (rdsLoadLockSide _EQC selectedLoadLock) then RdsKey = RdsKeys<idx>
|
|
* Next idx
|
|
* Case RdsKeys<1> NE ''
|
|
* RdsKey = RdsKeys<1>
|
|
* Case RdsKeys<2> NE ''
|
|
* RdsKey = RdsKeys<2>
|
|
* End Case
|
|
*
|
|
* Set_Property(@Window:'.EDL_WAFERS_REMOVED_RDS', 'TEXT', RdsKey)
|
|
* end
|
|
* END
|
|
* PrevOptions = Get_Property(@Window, 'IOOPTIONS')
|
|
* NewOptions = PrevOptions
|
|
* NewOptions<6> = True$ ; // Do not clear the form on write
|
|
* Set_Property(@Window, 'IOOPTIONS', NewOptions)
|
|
|
|
* Set_Property(@Window, 'IOOPTIONS', PrevOptions)
|
|
* Post_Event(@Window, 'OMNIEVENT')
|
|
|
|
end else
|
|
|
|
// Unsign the reactor log
|
|
RLKey = Get_Property(@Window:'.REACTOR_LOG_NO', 'TEXT')
|
|
If RLKey NE '' then
|
|
Set_Property(@Window, 'SAVEWARN', False$)
|
|
Reactor_Log_Services('ClearSignature', RLKey)
|
|
If Error_Services('NoError') then
|
|
Post_Event(@Window, 'READ')
|
|
end else
|
|
Error_Services('DisplayError')
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
InjPost:
|
|
* * * * * * *
|
|
|
|
* This is a temporary routine hooked to a temporary button for debugging JCH 2/13/2014
|
|
|
|
AtRecord = Get_Property(@WINDOW,'ATRECORD')
|
|
|
|
IF AtRecord<REACTOR_LOG_INJ_SETTING$> NE '' THEN
|
|
|
|
ReactNo = AtRecord<REACTOR_LOG_REACTOR$>
|
|
RLId = Get_Property(@WINDOW:'.REACTOR_LOG_NO','DEFPROP')
|
|
|
|
plParms = 'REACT_STATE':@RM
|
|
plParms := ReactNo:@RM
|
|
plParms := REACT_STATE_CURR_INJ_RL_ID$:@RM
|
|
plParms := RLId:@RM
|
|
obj_Post_Log('Create',plParms)
|
|
|
|
END ;* End of check for Injector Settings entered
|
|
|
|
Send_Event(@WINDOW,'WRITE')
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
SvcsGF:
|
|
* * * * * * *
|
|
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
|
|
IF ReactNo = '' THEN
|
|
ErrMsg('Application Message':@SVM:'Reactor No is required')
|
|
Set_Property(@WINDOW:'.REACTOR','FOCUS',1)
|
|
END
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
SvcsPC:
|
|
* * * * * * *
|
|
|
|
CtrlEntID = 'REACTOR_LOG.SERV_INFO'
|
|
|
|
PrevSelPos = Get_Property(CtrlEntID,'PREVSELPOS')
|
|
PrevCol = PrevSelPos<1>
|
|
PrevRow = PrevSelPos<2>
|
|
|
|
SelPos = Get_Property(CtrlEntID,'SELPOS')
|
|
CurCol = SelPos<1>
|
|
CurRow = SelPos<2>
|
|
|
|
ListData = Get_Property(CtrlEntID,'LIST')
|
|
ArrayData = Get_Property(CtrlEntID,'DEFPROP')
|
|
|
|
CurRowData = ListData<CurRow>
|
|
|
|
* Move Up to non-empty row or first row *
|
|
|
|
TestRow = CurRowData
|
|
CONVERT @VM TO '' IN TestRow
|
|
|
|
IF TestRow = '' THEN
|
|
CurLine = CurRow
|
|
LOOP
|
|
Col1Val = ListData<CurLine-1,1>
|
|
UNTIL Col1Val NE '' OR CurLine = 1
|
|
CurLine -=1
|
|
REPEAT
|
|
Set_Property(CtrlEntId,"SELPOS",1:@FM:CurLine)
|
|
|
|
END ELSE
|
|
BadCol = ''
|
|
Mesg = ''
|
|
|
|
BEGIN CASE
|
|
|
|
CASE CurCol > COL$PROB_CAT AND CurRowData<1,COL$PROB_CAT> = ''
|
|
Mesg = 'Please fill in the Prob Cat column.'
|
|
BadCol = COL$PROB_CAT
|
|
|
|
CASE CurCol > COL$SERV_ID AND CurRowData<1,COL$SERV_ID> = ''
|
|
Mesg = 'Please fill in the Serv ID column.'
|
|
BadCol = COL$SERV_ID
|
|
|
|
CASE CurCol > COL$SCHED AND CurRowData<1,COL$SCHED> = ''
|
|
Mesg = 'Please fill in the Sched column.'
|
|
BadCol = COL$SCHED
|
|
|
|
END CASE
|
|
|
|
|
|
IF BadCol THEN
|
|
Msg('',Mesg)
|
|
Set_Property(CtrlEntID,'SELPOS',BadCol:@FM:CurRow)
|
|
RETURN
|
|
END
|
|
END
|
|
|
|
IF CurRow NE PrevRow THEN
|
|
* check last field in prev row
|
|
|
|
IF ListData<PrevRow,COL$ITEM_TYPE> NE '' THEN
|
|
IF ListData<PrevRow,COL$ITEM_ID> = '' THEN
|
|
Msg('','Please fill in the Item SN column.')
|
|
Set_Property(CtrlEntID,'SELPOS',COL$ITEM_ID:@FM:PrevRow)
|
|
END
|
|
END
|
|
|
|
END ;* End of check for row change
|
|
|
|
CurrWindow = CtrlEntID[1,'.']
|
|
|
|
IF PrevCol = COL$PROB_CAT THEN
|
|
ProbCat = CurRowData<1,PrevCol>
|
|
|
|
If ProbCat = 44 Then ;* Added by dkk 4/8/15
|
|
|
|
NotesRequired = XLATE('REACT_PROB_CAT',ProbCat,REACT_PROB_CAT_NOTES$,'X')
|
|
|
|
IF NotesRequired THEN
|
|
Notes = Get_Property(@WINDOW:'.NOTES','DEFPROP')
|
|
Notes = TRIM(Notes)
|
|
|
|
IF Notes = '' THEN
|
|
MsgInfo = ''
|
|
MsgInfo<mtext$> = 'Notes required when #44 - Problem ID not found.'
|
|
MsgInfo<micon$> = 'H'
|
|
Void = Msg( '', MsgInfo )
|
|
Set_Property( @WINDOW:'.NOTES', "FOCUS", 1 )
|
|
Post_Event( @WINDOW:'.NOTES', 'GOTFOCUS' )
|
|
END
|
|
End ;* Added by dkk 4/8/15
|
|
|
|
END
|
|
END
|
|
|
|
|
|
IF PrevCol = COL$SERV_ID THEN
|
|
|
|
IF CurRowData<1,COL$SERV_ID> NE '' THEN
|
|
|
|
ReactServsRec = XLATE('REACT_SERVS',CurRowData<1,COL$SERV_ID>,'','X')
|
|
InjectorFlag = ReactServsRec<REACT_SERVS_INJECTOR_CHANGE$>
|
|
NotesRequired = ReactServsRec<REACT_SERVS_NOTE_REQ$>
|
|
|
|
IF InjectorFlag THEN
|
|
|
|
Set_Property(CurrWindow:'.TAB','VALUE',4)
|
|
Send_Event(CurrWindow:'.TAB','CLICK')
|
|
|
|
Set_Property(CurrWindow:'.INJ_SETTING','FOCUS',1)
|
|
Set_Property(CurrWindow:'.INJ_SETTING','SELPOS',1:@FM:1)
|
|
|
|
hTable = Get_Property(CurrWindow:'.INJ_SETTING','HANDLE')
|
|
|
|
IF NOT(hTable) THEN
|
|
ErrMsg('Problem Getting the handle to the INJ_SETTINGS control.')
|
|
RETURN
|
|
END
|
|
|
|
void = Send_Message(hTable,DTM_EDITCURCELL$,DT_BEGINEDIT$,0)
|
|
|
|
RETURN
|
|
|
|
END
|
|
|
|
IF NotesRequired THEN
|
|
|
|
Notes = Get_Property(@WINDOW:'.NOTES','DEFPROP')
|
|
Notes = TRIM(Notes)
|
|
|
|
IF Notes = '' THEN
|
|
MsgInfo = ''
|
|
MsgInfo<mtext$> = 'Notes required when no Service ID is found.'
|
|
MsgInfo<micon$> = 'H'
|
|
Void = Msg( '', MsgInfo )
|
|
Set_Property( @WINDOW:'.NOTES', "FOCUS", 1 )
|
|
Post_Event( @WINDOW:'.NOTES', 'GOTFOCUS' )
|
|
END
|
|
|
|
END
|
|
|
|
END
|
|
END
|
|
|
|
IF PrevCol = COL$ITEM_ID THEN
|
|
CurrWindow = CtrlEntID[1,'.']
|
|
|
|
IF CurRowData<1,COL$ITEM_TYPE> = 'Tube' THEN
|
|
RINo = CurRowData<1,COL$ITEM_RI_NO>
|
|
|
|
IF RINo NE '' THEN
|
|
obj_AppWindow('ViewRelated','REACT_ITEM':@RM:RINo)
|
|
Set_Property('REACT_ITEM.TUBE_GRADE','FOCUS',1)
|
|
END
|
|
|
|
END ;* End of check for Tube Change
|
|
|
|
GoSub VerifyReactItems
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Skip calculated columns *
|
|
|
|
IF CurCol = COL$PROB_CAT_DESC THEN
|
|
Set_Property(CtrlEntId,'SELPOS',COL$SERV_ID:@FM:CurRow)
|
|
END
|
|
|
|
IF CurCol = COL$SERV_ID_DESC THEN
|
|
Set_Property(CtrlEntId,'SELPOS',COL$SCHED:@FM:CurRow)
|
|
END
|
|
|
|
IF CurCol = COL$ITEM_TYPE THEN
|
|
Set_Property(CtrlEntId,'SELPOS',COL$ITEM_ID:@FM:CurRow)
|
|
END
|
|
|
|
IF PrevCol = COL$ITEM_ID THEN GOSUB CalcRIHKeys
|
|
|
|
*CALL Reactor_Log_Comm('CHECK_SERVICES') ;* Pull this into here after clarification from Dave JCH 11/21/2013******************************************* Now in the read event
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
SettingLF:
|
|
* * * * * * *
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
InjHistory:
|
|
* * * * * * *
|
|
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
|
|
|
|
IF ReactNo NE '' THEN
|
|
|
|
TypeOver = ''
|
|
TypeOver<PDISPLAY$> = 'WITH INJ_SET_REACT_NO = ':ReactNo:' BY-DSND INJ_SET_DTM'
|
|
|
|
void = Popup(@WINDOW,TypeOver,'REACT_INJ_SETTINGS')
|
|
|
|
END
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
SvcsOptions:
|
|
* * * * * * *
|
|
|
|
SelPos = Get_Property(@WINDOW:'.SERV_INFO','SELPOS')
|
|
CurCol = SelPos<1>
|
|
CurRow = SelPos<2>
|
|
CurrArray = Get_Property(@WINDOW:'.SERV_INFO','ARRAY')
|
|
|
|
BEGIN CASE
|
|
CASE CurCol = COL$PROB_CAT
|
|
|
|
ProbCat = Popup(@WINDOW,'','SHOW_REACT_PROB_CAT')
|
|
|
|
IF ProbCat NE '' THEN
|
|
obj_AppWindow('LUValReturn',ProbCat:@RM:@WINDOW:'.SERV_INFO':@RM:SelPos)
|
|
END
|
|
|
|
|
|
CASE CurCol = COL$SERV_ID
|
|
|
|
ReactServ = Popup(@WINDOW,'','SHOW_REACT_SERVS')
|
|
|
|
IF ReactServ NE '' THEN
|
|
obj_AppWindow('LUValReturn',ReactServ:@RM:@WINDOW:'.SERV_INFO':@RM:SelPos)
|
|
END
|
|
|
|
|
|
CASE CurCol = COL$ITEM_ID
|
|
|
|
ItemType = Get_Property(@WINDOW:'.SERV_INFO','DEFPROP',COL$ITEM_TYPE:@FM:CurRow)
|
|
|
|
IF ItemType NE '' THEN
|
|
|
|
RetVal = ''
|
|
|
|
ItemType = ICONV(ItemType,'[CONV_CODE_DESC,REACT_ITEM_TYPE]')
|
|
|
|
OPEN 'DICT.REACT_ITEM' TO DictReactItem ELSE
|
|
ErrMsg('Unable to open DICT.REACT_ITEM')
|
|
RETURN
|
|
END
|
|
|
|
SearchString = 'RI_TYPE':@VM:ItemType:@FM
|
|
SearchString := 'CURR_STATUS':@VM:'N':@VM:'U':@FM
|
|
|
|
RIKeys = ''
|
|
Option = ''
|
|
Flag = ''
|
|
|
|
Btree.Extract(SearchString,'REACT_ITEM',DictReactItem,RIKeys,Option,Flag)
|
|
IF Get_Status(errCode) THEN
|
|
ErrMsg(errCode)
|
|
RETURN
|
|
END
|
|
|
|
TypeOver = ''
|
|
TypeOVer<PMODE$> = 'K'
|
|
TypeOver<PDISPLAY$> = RIKeys
|
|
RetVal = Popup(@WINDOW,TypeOver,'REACT_ITEM')
|
|
|
|
IF RetVal NE '' THEN
|
|
obj_AppWindow('LUValReturn',RetVal:@RM:@WINDOW:'.SERV_INFO':@RM:SelPos)
|
|
|
|
RIRec = XLATE('REACT_ITEM',RetVal,'','X')
|
|
|
|
IF RIRec<REACT_ITEM_RI_TYPE$> = 'T' THEN
|
|
CardWindow = 'REACT_ITEM'
|
|
CardKey = RetVal
|
|
DefaultRec = ''
|
|
NewCardCtrl = ''
|
|
RecalcCtrl = @WINDOW:'.SERV_INFO'
|
|
RecalcPos = SelPos
|
|
RetCtrl = @WINDOW:'.SERV_INFO'
|
|
RetPos = SelPos
|
|
|
|
oAParms = CardWindow:@RM:CardKey:@RM:DefaultRec:@RM:NewCardCtrl:@RM:RecalcCtrl:@RM:RecalcPos:@RM:RetCtrl:@RM:RetPos
|
|
|
|
obj_AppWindow('ViewNewCard',oAParms)
|
|
|
|
Set_Property('REACT_ITEM.TUBE_GRADE','FOCUS',1)
|
|
|
|
IF Get_Status(errCode) THEN
|
|
ErrMsg(errCode)
|
|
END
|
|
END
|
|
|
|
GOSUB Refresh
|
|
END
|
|
|
|
END ;* End of check for null SNReq
|
|
|
|
|
|
END CASE
|
|
|
|
GOSUB Refresh
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
SvcsDC:
|
|
* * * * * * *
|
|
|
|
CurrPos = Get_Property(EntID,'SELPOS')
|
|
CurrCol = CurrPos<1>
|
|
CurrRow = CurrPos<2>
|
|
|
|
CurrList = Get_Property(EntID,'LIST')
|
|
|
|
BEGIN CASE
|
|
CASE CurrCol = COL$ITEM_RI_NO
|
|
RINo = CurrList<CurrRow,COL$ITEM_RI_NO>
|
|
IF RINo NE '' THEN
|
|
obj_AppWindow('ViewRelated','REACT_ITEM':@RM:RINo)
|
|
END
|
|
|
|
END CASE
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
ShiftSigPC:
|
|
* * * * * * *
|
|
|
|
|
|
CtrlEntID = EntID
|
|
|
|
PrevSelPos = Get_Property(CtrlEntID,'PREVSELPOS')
|
|
PrevCol = PrevSelPos<1>
|
|
PrevRow = PrevSelPos<2>
|
|
|
|
SelPos = Get_Property(CtrlEntID,'SELPOS')
|
|
CurCol = SelPos<1>
|
|
CurRow = SelPos<2>
|
|
|
|
ListData = Get_Property(CtrlEntID,'LIST')
|
|
ArrayData = Get_Property(CtrlEntID,'DEFPROP')
|
|
|
|
CurRowData = ListData<CurRow>
|
|
|
|
* Move Up to non-empty row or first row *
|
|
|
|
TestRow = CurRowData
|
|
CONVERT @VM TO '' IN TestRow
|
|
|
|
IF TestRow = '' THEN
|
|
CurLine = CurRow
|
|
LOOP
|
|
Col1Val = ListData<CurLine-1,1>
|
|
UNTIL Col1Val NE '' OR CurLine = 1
|
|
CurLine -=1
|
|
REPEAT
|
|
Set_Property(CtrlEntId,"SELPOS",1:@FM:CurLine)
|
|
|
|
END
|
|
|
|
IF CurRow NE PrevRow THEN
|
|
* check last field in prev row
|
|
|
|
IF ListData<PrevRow,COL$ITEM_TYPE> NE '' THEN
|
|
IF ListData<PrevRow,COL$ITEM_ID> = '' THEN
|
|
Msg('','Please fill in the Item SN column.')
|
|
Set_Property(CtrlEntID,'SELPOS',COL$ITEM_ID:@FM:PrevRow)
|
|
END
|
|
END
|
|
|
|
END ;* End of check for row change
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
* * * * * * *
|
|
ShiftSigDC:
|
|
* * * * * * *
|
|
|
|
CurrPos = Get_Property(EntID,'SELPOS')
|
|
CurrCol = CurrPos<1>
|
|
CurrRow = CurrPos<2>
|
|
|
|
CurrList = Get_Property(EntID,'LIST')
|
|
|
|
Note = CurrList<CurrRow,COL$SIG_NOTE>
|
|
|
|
DialogResult = Dialog_Box("DIALOG_ZOOM",@WINDOW,Note)
|
|
|
|
IF DialogResult = 'Cancel' THEN RETURN
|
|
|
|
IF DialogResult NE '' THEN
|
|
IF @USER4 = '' THEN @USER4 = @USERNAME
|
|
Set_Property(EntID,'CELLPOS',@USER4,COL$SIG:@FM:CurrRow)
|
|
Set_Property(EntID,'CELLPOS',obj_Calendar('CurrDTM'),COL$SIG_DTM:@FM:CurrRow)
|
|
Set_Property(EntID,'CELLPOS',DialogResult,COL$SIG_NOTE:@FM:CurrRow)
|
|
END
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
|
|
|
|
* * * * * *
|
|
CurrRIDC:
|
|
* * * * * *
|
|
|
|
CurrPos = Get_Property(EntID,'SELPOS')
|
|
CurrCol = CurrPos<1>
|
|
CurrRow = CurrPos<2>
|
|
|
|
CurrList = Get_Property(EntID,'LIST')
|
|
|
|
BEGIN CASE
|
|
CASE CurrCol = COL$CURR_RI_NO
|
|
RINo = CurrList<CurrRow,COL$CURR_RI_NO>
|
|
IF RINo NE '' THEN
|
|
obj_AppWindow('ViewRelated','REACT_ITEM':@RM:RINo)
|
|
END
|
|
|
|
|
|
END CASE
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
RemOptions:
|
|
* * * * * * *
|
|
|
|
|
|
SelPos = Get_Property(@WINDOW:'.REM_RI_NO','SELPOS')
|
|
CurCol = SelPos<1>
|
|
CurRow = SelPos<2>
|
|
CurrArray = Get_Property(@WINDOW:'.REM_RI_NO','ARRAY')
|
|
|
|
BEGIN CASE
|
|
CASE CurCol = COL$RI_DISP
|
|
|
|
RetVal = Popup(@WINDOW,'','REACT_ITEM_DISP')
|
|
|
|
IF RetVal NE '' THEN
|
|
obj_AppWindow('LUValReturn',RetVal:@RM:@WINDOW:'.REM_RI_NO':@RM:SelPos)
|
|
END
|
|
|
|
|
|
END CASE
|
|
|
|
GOSUB Refresh
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * * *
|
|
CalcRIHKeys:
|
|
* * * * * * * *
|
|
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
PostDTM = Get_Property(@WINDOW:'.POST_DTM','INVALUE')
|
|
|
|
|
|
AtRecord = Get_Property(@WINDOW,'ATRECORD')
|
|
|
|
RawReactItemIds = AtRecord<REACTOR_LOG_REACT_ITEM_IDS$>
|
|
rawCnt = COUNT(RawReactItemIds,@VM) + (RawReactItemIds NE '')
|
|
|
|
InstRINos = ''
|
|
|
|
FOR I = 1 TO rawCnt
|
|
IF RawReactItemIds<1,I> NE '' THEN
|
|
InstRINos<1,-1> = obj_React_Item('Serial_RINo',RawReactItemIds<1,I>)
|
|
END
|
|
NEXT I
|
|
|
|
AtRecord<REACTOR_LOG_INST_RI_NO$> = InstRINos
|
|
|
|
|
|
* Remove Calculation
|
|
|
|
PostedBy = Get_Property(@WINDOW:'.RI_POST_BY','DEFPROP')
|
|
|
|
IF PostedBy = '' THEN
|
|
|
|
NewRITypes = XLATE('REACT_ITEM',InstRINos,REACT_ITEM_RI_TYPE$,'X')
|
|
|
|
CurrRIArray = Get_Property(@WINDOW:'.CURR_REACT_ITEMS','ARRAY')
|
|
CurrRITypes = CurrRIArray<COL$CURR_RI_TYPE>
|
|
CurrRITypes = ICONV(CUrrRITypes,'[CONV_CODE_DESC,REACT_ITEM_TYPE]')
|
|
|
|
nRICnt = COUNT(NewRITypes,@VM) + (NewRITypes NE '')
|
|
cRICnt = COUNT(CurrRITypes,@VM) + (CurrRITypes NE '')
|
|
|
|
RemRINos = ''
|
|
RemHistKeys = ''
|
|
|
|
FOR J = 1 TO nRICnt
|
|
NewRIType = NewRITypes<1,J>
|
|
FOR K = 1 TO cRICnt
|
|
CurrRIType = CurrRITypes<1,K>
|
|
IF CurrRIType[1,1] = NewRIType[1,1] THEN
|
|
RemNo = CurrRIArray<COL$CURR_RI_NO,K>
|
|
RemInstDTM = ICONV(CurrRIArray<COL$CURR_INST_DTM,K>,'DT')
|
|
RemHistKey = ReactNo:'*':RemNo:'*':RemInstDTM
|
|
|
|
LOCATE RemNo IN RemRINos USING @VM SETTING Pos ELSE
|
|
RemRINos = INSERT(RemRINos,1,Pos,0,RemNo)
|
|
RemHistKeys = INSERT(RemHistKeys,1,Pos,0,RemHistKey)
|
|
END
|
|
END
|
|
NEXT K ;* End of Curr Loop
|
|
NEXT J ;* End of New Loop
|
|
|
|
AtRecord<REACTOR_LOG_REM_RIH_KEY$> = RemHistKeys
|
|
|
|
END ;* End of check for NOT Posted
|
|
|
|
|
|
|
|
Set_Property(@WINDOW,'ATRECORD',AtRecord)
|
|
|
|
GOSUB Refresh
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
CopyRemove:
|
|
* * * * * * *
|
|
|
|
RETURN
|
|
|
|
EntID = @WINDOW:'.CURR_REACT_ITEMS'
|
|
CurrRIList = Get_Property(EntID,'LIST')
|
|
|
|
CurrRISelection = Get_Property(EntID,'SELPOS')
|
|
SelectedRows = CurrRISelection<2>
|
|
|
|
CONVERT @VM TO @FM in SelectedRows
|
|
|
|
SelCnt = COUNT(SelectedRows,@FM) + (SelectedRows NE '')
|
|
IF SelCnt = 0 THEN
|
|
ErrMsg('You must select at least one row in order to copy to the Remove list.')
|
|
RETURN
|
|
END
|
|
|
|
|
|
|
|
CopyRINos = 0
|
|
CopyRICnt = 0
|
|
FOR I = 1 TO SelCnt
|
|
IF CurrRIList<SelectedRows<I>,COL$CURR_RI_NO> NE '' THEN
|
|
CopyRICnt += 1
|
|
CopyRINos<1,CopyRICnt> =CurrRIList<SelectedRows<I>,COL$CURR_RI_NO>
|
|
END
|
|
NEXT I
|
|
|
|
Set_Property(EntID,'SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
PostItems:
|
|
* * * * * * *
|
|
|
|
RemList = Get_Property(@WINDOW:'.REM_RI_NO','LIST')
|
|
|
|
CurrWindow = @WINDOW
|
|
|
|
rlCnt = COUNT(RemList,@FM) + (RemList NE '')
|
|
|
|
FOR I = 1 TO rlCnt
|
|
RINo = RemList<I,COL$RI_NO>
|
|
UNTIL RINo = ''
|
|
|
|
IF RemList<I,COL$RI_DISP> = '' THEN
|
|
|
|
* RINo without associated Disposition Code entered
|
|
|
|
ErrMsg('Application Message':@SVM:'Disposition for items being removed has not been completed.')
|
|
|
|
Set_Property(CurrWindow:'.TAB','VALUE',3)
|
|
Send_Event(CurrWindow:'.TAB','CLICK')
|
|
|
|
|
|
Set_Property(CurrWindow:'.REM_RI_NO','FOCUS',1)
|
|
Set_Property(CurrWindow:'.REM_RI_NO','SELPOS',COL$RI_DISP:@FM:I)
|
|
|
|
hTable = Get_Property(CurrWindow:'.REM_RI_NO','HANDLE')
|
|
|
|
IF NOT(hTable) THEN
|
|
ErrMsg('Problem Getting the handle to the REM_RI_NO control.')
|
|
RETURN
|
|
END
|
|
|
|
void = Send_Message(hTable,DTM_EDITCURCELL$,DT_BEGINEDIT$,0)
|
|
|
|
RETURN
|
|
|
|
END ;* End of check for missing Disposition code on line with RI No
|
|
|
|
NEXT I
|
|
|
|
Ctrls = @WINDOW:'.REACTOR_LOG_NO':@RM ; Props = 'DEFPROP':@RM
|
|
Ctrls := @WINDOW:'.RI_POST_BY':@RM ; Props := 'DEFPROP':@RM
|
|
Ctrls := @WINDOW:'.RI_POST_DTM' ; Props := 'DEFPROP'
|
|
|
|
Vals = Get_Property(Ctrls,Props)
|
|
|
|
RLNo = Vals[1,@RM]
|
|
PostBy = Vals[COL2()+1,@RM]
|
|
PostDTM = Vals[COL2()+1,@RM]
|
|
|
|
Send_Event(@WINDOW,'WRITE')
|
|
|
|
IF PostBy = '' THEN
|
|
obj_Reactor_Log('PostReactItems',RLNo)
|
|
END ELSE
|
|
obj_Reactor_Log('UnpostReactItems',RLNo)
|
|
END
|
|
|
|
obj_Appwindow('LoadFormKeys','REACTOR_LOG':@RM:RLNo)
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
* * * * * * *
|
|
RemRIDC:
|
|
* * * * * * *
|
|
|
|
CurrPos = Get_Property(EntID,'SELPOS')
|
|
CurrCol = CurrPos<1>
|
|
CurrRow = CurrPos<2>
|
|
|
|
CurrList = Get_Property(EntID,'LIST')
|
|
|
|
BEGIN CASE
|
|
CASE CurrCol = COL$RI_NO
|
|
RINo = CurrList<CurrRow,COL$RI_NO>
|
|
IF RINo NE '' THEN
|
|
obj_AppWindow('ViewRelated','REACT_ITEM':@RM:RINo)
|
|
END
|
|
|
|
END CASE
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
PrintRootCause:
|
|
* * * * * * *
|
|
|
|
ReactLogNo = Get_Property(@WINDOW:'.REACTOR_LOG_NO','DEFPROP')
|
|
ReactNo = Get_Property(@WINDOW:'.REACTOR','DEFPROP')
|
|
ServInfo = Get_Property(@WINDOW:'.SERV_INFO','DEFPROP')
|
|
|
|
InitProbCat = ServInfo<1,1> ;* 1st line, 1st column is Init Prob Cat
|
|
|
|
Print_RootCause_Analysis(ReactLogNo,ReactNo,InitProbCat)
|
|
|
|
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
* * * * * * *
|
|
LOTOClick:
|
|
* * * * * * *
|
|
|
|
xlApp = OleCreateInstance("excel.Application")
|
|
|
|
OlePutProperty(XlApp, 'Visible', xlSheetVisible)
|
|
|
|
IF OleStatus() THEN
|
|
GOTO HadError
|
|
RETURN
|
|
END
|
|
|
|
xlWorkBooks = OleGetProperty(xlApp, "Workbooks")
|
|
|
|
IF OleStatus() THEN
|
|
GOTO HadError
|
|
RETURN
|
|
END
|
|
|
|
|
|
* xlWkb = OleCallMethod(xlWorkbooks,"Open","N:\Facilities\DeptData\LOTO for Keith\LOTO Master List App.xlsm")
|
|
* xlWkb = OleCallMethod(xlWorkbooks,"Open",Environment_Services('GetUserDataRootPath') : "\Facilities\DeptData\LOTO for Keith\LOTO Master List App.xlsm")
|
|
xlWkb = OleCallMethod(xlWorkbooks,"Open",Environment_Services('GetUserDataRootPath') : "\Facilities\DeptData\LOTO Procedures\LOTO Master List App.xlsm")
|
|
|
|
IF OleStatus() THEN
|
|
GOTO HadError
|
|
RETURN
|
|
END
|
|
|
|
xdummy = OleCallMethod(xlWkb, "RunAutoMacros", xlAutoOpen )
|
|
|
|
IF OleStatus() THEN
|
|
GOTO HadError
|
|
RETURN
|
|
END
|
|
|
|
Set_Property(@WINDOW:'.LO_REVIEWED','CHECK',1)
|
|
|
|
GOSUB Refresh
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
* * * * * * *
|
|
HadError:
|
|
* * * * * * *
|
|
|
|
status = OleStatus()
|
|
|
|
IF Status THEN
|
|
ErrMsg('OLE Error Code ':Status)
|
|
END
|
|
|
|
xlChart = ''
|
|
Charts = ''
|
|
range = ''
|
|
xlSht = ''
|
|
xlWkb=''
|
|
xlWorkBooks = ''
|
|
x = OleCallMethod(xlApp, 'Quit')
|
|
|
|
RETURN
|
|
|
|
|
|
SvcsLF:
|
|
|
|
GoSub VerifyReactItems
|
|
|
|
return
|
|
|
|
|
|
VerifyReactItems:
|
|
|
|
SvcsList = Get_Property(@Window:'.SERV_INFO', 'LIST')
|
|
Done = False$
|
|
BadRow = False$
|
|
For each Row in SvcsList using @FM setting RowPos
|
|
ReactItem = Row<0, COL$ITEM_ID>
|
|
If ReactItem NE '' then
|
|
If RowExists('REACT_ITEM', ReactItem) EQ False$ then
|
|
Msg(@Window, '', 'OK', '', 'Invalid React Item':@FM:'React Item ':ReactItem:' does not exist!')
|
|
BadRow = RowPos
|
|
end
|
|
end
|
|
Until Done
|
|
Next Row
|
|
If BadRow then
|
|
SvcsList<BadRow, COL$ITEM_ID> = ''
|
|
Set_Property(@Window:'.SERV_INFO', 'LIST', SvcsList)
|
|
end
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|