modified passdown commuter module to clear form on successful entry post
This commit is contained in:
parent
869787e0f3
commit
e5f0e9b7f1
File diff suppressed because it is too large
Load Diff
@ -50,109 +50,112 @@ 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
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Refresh:
|
Refresh:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
ReactNoGF:
|
ReactNoGF:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
* Don't add a return here
|
* Don't add a return here
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
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>
|
|
||||||
Comment = Get_Property(@WINDOW:'.COMMENT','DEFPROP')
|
|
||||||
|
|
||||||
LOOP
|
|
||||||
TestChar = ReactNos[-1,1]
|
|
||||||
UNTIL TestChar NE @VM OR ReactNos = ''
|
|
||||||
ReactNos[-1,1] = ''
|
|
||||||
REPEAT
|
|
||||||
|
|
||||||
EventKeys = '' ;* Keys to return to the REACT_EVENT window for a browse of the newly created records
|
|
||||||
|
|
||||||
IF ReactNos NE '' AND Comment NE '' THEN
|
|
||||||
|
|
||||||
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS') ;* Same DTM for all new records
|
|
||||||
EventType = 'PD' ;* Passdown
|
|
||||||
LoggedBy = @USER4
|
|
||||||
|
|
||||||
ReactCnt = COUNT(ReactNos,@VM) + (ReactNos NE '')
|
ReactNos = Get_Property(@WINDOW:'.REACT_NO','ARRAY')<COL$REACT_NO>
|
||||||
|
Comment = Get_Property(@WINDOW:'.COMMENT','DEFPROP')
|
||||||
|
|
||||||
FOR I = 1 TO ReactCnt
|
LOOP
|
||||||
ReactNo = ReactNos<1,I>
|
TestChar = ReactNos[-1,1]
|
||||||
CurrMode = XLATE('REACTOR',ReactNo,'CURR_MODE','X')
|
UNTIL TestChar NE @VM OR ReactNos = ''
|
||||||
|
ReactNos[-1,1] = ''
|
||||||
|
REPEAT
|
||||||
|
|
||||||
|
EventKeys = '' ;* Keys to return to the REACT_EVENT window for a browse of the newly created records
|
||||||
|
|
||||||
|
IF ReactNos NE '' AND Comment NE '' THEN
|
||||||
|
|
||||||
obj_React_Event('Create',ReactNo:@RM:EventDTM:@RM:EventType:@RM:LoggedBy:@RM:Comment:@RM:@RM:CurrMode)
|
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS') ;* Same DTM for all new records
|
||||||
EventKeys<I> = ReactNo:'*':ICONV(EventDTM,'DT')
|
EventType = 'PD' ;* Passdown
|
||||||
NEXT I
|
LoggedBy = @USER4
|
||||||
|
|
||||||
END
|
ReactCnt = COUNT(ReactNos,@VM) + (ReactNos NE '')
|
||||||
|
|
||||||
End_Dialog(@WINDOW,EventKeys)
|
FOR I = 1 TO ReactCnt
|
||||||
|
ReactNo = ReactNos<1,I>
|
||||||
|
CurrMode = XLATE('REACTOR',ReactNo,'CURR_MODE','X')
|
||||||
|
|
||||||
|
obj_React_Event('Create',ReactNo:@RM:EventDTM:@RM:EventType:@RM:LoggedBy:@RM:Comment:@RM:@RM:CurrMode)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user