modified passdown commuter module to clear form on successful entry post

This commit is contained in:
Infineon\StieberD 2025-06-05 13:07:21 -07:00
parent 869787e0f3
commit e5f0e9b7f1
2 changed files with 1479 additions and 286 deletions

File diff suppressed because it is too large Load Diff

View File

@ -51,11 +51,11 @@ RETURN Result
Create: Create:
* * * * * * * * * * * * * *
obj_AppWindow('Create') obj_AppWindow('Create')
Set_Property(@WINDOW,'STATUSLINE',@WINDOW:'.STATUSLINE_FIX') Set_Property(@WINDOW,'STATUSLINE',@WINDOW:'.STATUSLINE_FIX')
GOSUB Refresh GOSUB Refresh
RETURN RETURN
@ -77,82 +77,85 @@ ReactNoGF:
LUReactor: LUReactor:
* * * * * * * * * * * * * *
IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1 IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1
IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2 IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2
Set_Status(0) Set_Status(0)
TypeOver = '' TypeOver = ''
TypeOver<PSELECT$> = '2' ;* Multiple Select TypeOver<PSELECT$> = '2' ;* Multiple Select
TypeOver<PTYPE$> = 'E' ;* Return entire row TypeOver<PTYPE$> = 'E' ;* Return entire row
ReactData = Popup(@WINDOW,TypeOver,'REACTORS') ReactData = Popup(@WINDOW,TypeOver,'REACTORS')
IF ReactData = '' THEN RETURN IF ReactData = '' THEN RETURN
Set_Property(@WINDOW:'.REACT_NO','LIST',ReactData) Set_Property(@WINDOW:'.REACT_NO','LIST',ReactData)
LineCnt = COUNT(ReactData,@FM) + (ReactData NE '') LineCnt = COUNT(ReactData,@FM) + (ReactData NE '')
ColCnt = 7 ColCnt = 7
FOR Line = 1 TO LineCnt FOR Line = 1 TO LineCnt
FOR Column = 2 TO ColCnt FOR Column = 2 TO ColCnt
stat = Send_Message(@WINDOW:'.REACT_NO','COLOR_BY_POS',Column,Line,GREEN$) stat = Send_Message(@WINDOW:'.REACT_NO','COLOR_BY_POS',Column,Line,GREEN$)
NEXT Column NEXT Column
NEXT Line NEXT Line
RETURN RETURN
* * * * * * * * * * * * * *
Cancel: Cancel:
* * * * * * * * * * * * * *
End_Dialog(@WINDOW,'') End_Dialog(@WINDOW,'')
RETURN RETURN
* * * * * * * * * * * * * *
PostEntries: PostEntries:
* * * * * * * * * * * * * *
ReactNos = Get_Property(@WINDOW:'.REACT_NO','ARRAY')<COL$REACT_NO> ReactNos = Get_Property(@WINDOW:'.REACT_NO','ARRAY')<COL$REACT_NO>
Comment = Get_Property(@WINDOW:'.COMMENT','DEFPROP') Comment = Get_Property(@WINDOW:'.COMMENT','DEFPROP')
LOOP LOOP
TestChar = ReactNos[-1,1] TestChar = ReactNos[-1,1]
UNTIL TestChar NE @VM OR ReactNos = '' UNTIL TestChar NE @VM OR ReactNos = ''
ReactNos[-1,1] = '' ReactNos[-1,1] = ''
REPEAT REPEAT
EventKeys = '' ;* Keys to return to the REACT_EVENT window for a browse of the newly created records EventKeys = '' ;* Keys to return to the REACT_EVENT window for a browse of the newly created records
IF ReactNos NE '' AND Comment NE '' THEN IF ReactNos NE '' AND Comment NE '' THEN
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS') ;* Same DTM for all new records EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS') ;* Same DTM for all new records
EventType = 'PD' ;* Passdown EventType = 'PD' ;* Passdown
LoggedBy = @USER4 LoggedBy = @USER4
ReactCnt = COUNT(ReactNos,@VM) + (ReactNos NE '') ReactCnt = COUNT(ReactNos,@VM) + (ReactNos NE '')
FOR I = 1 TO ReactCnt FOR I = 1 TO ReactCnt
ReactNo = ReactNos<1,I> ReactNo = ReactNos<1,I>
CurrMode = XLATE('REACTOR',ReactNo,'CURR_MODE','X') CurrMode = XLATE('REACTOR',ReactNo,'CURR_MODE','X')
obj_React_Event('Create',ReactNo:@RM:EventDTM:@RM:EventType:@RM:LoggedBy:@RM:Comment:@RM:@RM:CurrMode) obj_React_Event('Create',ReactNo:@RM:EventDTM:@RM:EventType:@RM:LoggedBy:@RM:Comment:@RM:@RM:CurrMode)
EventKeys<I> = ReactNo:'*':ICONV(EventDTM,'DT')
NEXT I
END ErrCode = ''
If Get_Status(ErrCode) then
Msg(@Window, '', 'OK', '', 'Process Error':@FM:'Error posting entries. ':ErrCode)
end else
Set_Property(@Window:'.REACT_NO', 'LIST', '')
Set_Property(@Window:'.COMMENT', 'TEXT', '')
end
End_Dialog(@WINDOW,EventKeys) EventKeys<I> = ReactNo:'*':ICONV(EventDTM,'DT')
NEXT I
END else
Msg(@Window, '', 'OK', '', 'Process Error':@FM:'React No(s) and Comment must not be null!')
end
RETURN RETURN