added LSL2 stored procedures
This commit is contained in:
248
LSL2/STPROC/COMM_DIALOG_REACT_COMP_LU.txt
Normal file
248
LSL2/STPROC/COMM_DIALOG_REACT_COMP_LU.txt
Normal file
@ -0,0 +1,248 @@
|
||||
COMPILE FUNCTION Comm_Dialog_React_Comp_LU(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
|
||||
|
||||
/*
|
||||
Commuter module for Dialog_React_Comp_LU window.
|
||||
|
||||
10/24/2013 - John C. Henry, J.C. Henry & Co., Inc.
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, ErrMsg, RList, Send_Message
|
||||
DECLARE SUBROUTINE obj_Appwindow, Start_Window, Btree.Extract, Msg, Send_Info
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Send_Message, Popup, Collect.IXVals, Msg
|
||||
|
||||
|
||||
$INSERT APPCOLORS
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT RLIST_EQUATES
|
||||
$INSERT POPUP_EQUATES
|
||||
$INSERT REACT_SERVS_EQUATES
|
||||
$INSERT REACT_COMP_EQUATES
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU TAB$ TO \09\
|
||||
|
||||
|
||||
ErrTitle = 'Error in Comm_Dialog_React_Comp_LU'
|
||||
ErrorMsg = ''
|
||||
ErrCode = ''
|
||||
|
||||
Result = ''
|
||||
|
||||
BEGIN CASE
|
||||
CASE EntID = @WINDOW
|
||||
BEGIN CASE
|
||||
CASE Event = 'CREATE' ; GOSUB Create
|
||||
END CASE
|
||||
|
||||
CASE EntID = @WINDOW:'.NAVIGATOR'
|
||||
BEGIN CASE
|
||||
CASE Event = 'DBLCK' ; GOSUB NavigatorDC
|
||||
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:
|
||||
* * * * * * *
|
||||
|
||||
obj_AppWindow('Create')
|
||||
|
||||
Set_Property(@WINDOW,'STATUSLINE',@WINDOW:'.STATUSLINE_FIX')
|
||||
|
||||
|
||||
|
||||
SelectSent = "SELECT REACT_COMP WITH CLASS = 'Group' BY DESC"
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
|
||||
OPEN 'REACT_COMP' TO ReactCompTable ELSE
|
||||
ErrMsg('Unable to Open "REACT_COMP" table for read')
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
PrevSystem = ''
|
||||
PrevItem = ''
|
||||
PrevAction = ''
|
||||
|
||||
DispLine = 1
|
||||
DispList = ''
|
||||
|
||||
|
||||
IndentLvl = 1
|
||||
IndentLvlKeys = ''
|
||||
|
||||
LOOP
|
||||
READNEXT ReactCompID ELSE Done = 1
|
||||
UNTIL Done
|
||||
IndentLvlKeys<IndentLvl,-1> = ReactCompID
|
||||
REPEAT
|
||||
|
||||
|
||||
DispList = ''
|
||||
|
||||
LOOP
|
||||
|
||||
IndentLvlKey = IndentLvlKeys<IndentLvl,1>
|
||||
IndentLvlKeys = DELETE(IndentLvlKeys,IndentLvl,1,0)
|
||||
|
||||
READ ReactCompRec FROM ReactCompTable,IndentLvlKey THEN
|
||||
|
||||
Class = ReactCompRec<REACT_COMP_CLASS$>
|
||||
Desc = ReactCompRec<REACT_COMP_DESC$>
|
||||
|
||||
DispList := IndentLvl:'-':IndentLvl:':':Class:' - ':Desc:@FM
|
||||
|
||||
IF ReactCompRec<REACT_COMP_SUB_COMP$> NE '' THEN
|
||||
IndentLvl += 1
|
||||
IndentLvlKeys<IndentLvl> = ReactCompRec<REACT_COMP_SUB_COMP$>
|
||||
END
|
||||
|
||||
END ;* End of ReactComprec read.
|
||||
|
||||
IF IndentLvlKeys<IndentLvl> = '' THEN
|
||||
IndentLvl -= 1
|
||||
IF IndentLvlKeys[-1,1] = @FM THEN
|
||||
IndentLvlKeys[-1,1] = ''
|
||||
END
|
||||
END
|
||||
|
||||
UNTIL IndentLvlKeys = ''
|
||||
|
||||
REPEAT
|
||||
|
||||
|
||||
Set_Property(@WINDOW:'.NAVIGATOR', 'LIST', DispList)
|
||||
|
||||
*Send_Message(@WINDOW:'.NAVIGATOR', 'EXPAND', 0, 1)
|
||||
|
||||
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
NavigatorDC:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
* * * * * * *
|
||||
Refresh:
|
||||
* * * * * * *
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
LUReactor:
|
||||
* * * * * * *
|
||||
|
||||
IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1
|
||||
IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
TypeOver = ''
|
||||
TypeOver<PSELECT$> = '2' ;* Multiple Select
|
||||
TypeOver<PTYPE$> = 'E' ;* Return entire row
|
||||
|
||||
ReactData = Popup(@WINDOW,TypeOver,'REACTORS')
|
||||
|
||||
IF ReactData = '' THEN RETURN
|
||||
|
||||
Set_Property(@WINDOW:'.REACT_NO','LIST',ReactData)
|
||||
|
||||
LineCnt = COUNT(ReactData,@FM) + (ReactData NE '')
|
||||
ColCnt = 7
|
||||
|
||||
FOR Line = 1 TO LineCnt
|
||||
FOR Column = 2 TO ColCnt
|
||||
stat = Send_Message(@WINDOW:'.REACT_NO','COLOR_BY_POS',Column,Line,GREEN$)
|
||||
NEXT Column
|
||||
NEXT Line
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
LUEventTYpe:
|
||||
* * * * * * *
|
||||
|
||||
IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1
|
||||
IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
TypeOver = ''
|
||||
TypeOver<PSELECT$> = '2' ;* Multiple Select
|
||||
TypeOver<PTYPE$> = 'E' ;* Return entire row
|
||||
|
||||
EventTypes = Popup(@WINDOW,TypeOver,'REACT_EVENT_TYPE')
|
||||
|
||||
IF EventTypes = '' THEN RETURN
|
||||
|
||||
Set_Property(@WINDOW:'.EVENT_TYPE','LIST',EventTypes)
|
||||
|
||||
LineCnt = COUNT(EventTypes,@FM) + (EventTypes NE '')
|
||||
ColCnt = 2
|
||||
|
||||
FOR Line = 1 TO LineCnt
|
||||
FOR Column = 2 TO ColCnt
|
||||
stat = Send_Message(@WINDOW:'.EVENT_TYPE','COLOR_BY_POS',Column,Line,GREEN$)
|
||||
NEXT Column
|
||||
NEXT Line
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Cancel:
|
||||
* * * * * * *
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
PerformQuery:
|
||||
* * * * * * *
|
||||
|
||||
SearchString = ''
|
||||
|
||||
|
||||
|
||||
|
||||
End_Dialog(@WINDOW,EventKeys)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user