COMPILE FUNCTION Comm_Sec_Groups(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5) /* Commuter module for Sec_Groups (Epi Sec_Groups) window 06/26/2006 - John C. Henry, J.C. Henry & Co., Inc. */ DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow DECLARE SUBROUTINE Btree.Extract, Send_Event, Security_Err_Msg, RList DECLARE SUBROUTINE Send_Message, obj_Sec_Groups_Esc, End_Window DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box DECLARE FUNCTION Dialog_Box, MemberOf, Send_Message, obj_Popup, obj_Sec_Groups $INSERT MSG_EQUATES $INSERT APPCOLORS $INSERT SEC_GROUPS_EQUATES $INSERT LSL_USERS_EQU $INSERT SECURITY_RIGHTS_EQU $INSERT POPUP_EQUATES EQU CRLF$ TO \0D0A\ EQU TARGET_ACTIVELIST$ TO 5 ErrTitle = 'Error in Comm_Sec_Groups' ErrorMsg = '' Result = '' BEGIN CASE CASE EntID = @WINDOW BEGIN CASE CASE Event = 'CLEAR' ; GOSUB Clear CASE Event = 'CREATE' ; GOSUB Create CASE Event = 'CLOSE' ; GOSUB Close CASE Event = 'READ' ; GOSUB Read CASE Event = 'WRITE' ; GOSUB Write CASE Event[1,3] = 'QBF' ; GOSUB Refresh END CASE CASE EntID = @WINDOW:'.LU_GROUP' AND Event = 'CLICK' ; GOSUB LUGroupID CASE EntID = @WINDOW:'.LSL_USER' BEGIN CASE CASE Event = 'DBLCLK' ; GOSUB UserDC END CASE CASE 1 ErrorMsg = 'Unknown Parameters ':EntID:' - ':Event:' passed to commuter' END CASE IF ErrorMsg NE '' THEN ErrMsg(ErrTitle:@SVM:ErrorMsg) END RETURN Result * * * * * * * Create: * * * * * * * obj_Appwindow('Create',@WINDOW) AdminUser = XLATE('LSL_USERS',@USER4,LSL_USERS_ADMIN_USER$,'X') IF NOT(AdminUser) THEN ErrMsg('Improper security to enter Security Groups') End_Window(@WINDOW) RETURN END GOSUB Refresh RETURN * * * * * * * Read: * * * * * * * GOSUB Refresh RETURN * * * * * * * Write: * * * * * * * RETURN * * * * * * * Clear: * * * * * * * GOSUB Refresh RETURN * * * * * * * Delete: * * * * * * * ErrMsg('Sec_Groupss may not be deleted.') Result = 0 ;* NOT OK to proceed with the delete RETURN * * * * * * * Close: * * * * * * * obj_Appwindow('DetailReturn') RETURN * * * * * * * Refresh: * * * * * * * * 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 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 Line NEXT I RETURN * * * * * * * LUGroupID: * * * * * * * IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1 IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2 Set_Status(0) RList('SELECT SEC_GROUPS BY GROUP_NAME',TARGET_ACTIVELIST$,'','','') GroupIDs = Popup(@WINDOW,'','SEC_GROUPS') IF GroupIDs = '' THEN RETURN CONVERT @VM TO @FM IN GroupIDs IF INDEX(GroupIDs,@FM,1) THEN Send_Event(@WINDOW,'QBFINIT') Set_Property(@WINDOW,'QBFLIST',GroupIDs) GOSUB Refresh Send_Event(@WINDOW,'QBFIRST') END ELSE obj_Appwindow('LoadFormKeys',@WINDOW:@RM:GroupIDs) END RETURN * * * * * * * UserDC: * * * * * * * ErrMsg('Under Development') RETURN * * * * * * * LUSec_GroupsType: * * * * * * * IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1 IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2 Sec_GroupsType = Popup(@WINDOW,TypeOver,'TOOL_TYPE') IF Sec_GroupsType NE '' THEN obj_Appwindow('LUValReturn',Sec_GroupsType:@RM:FocusControl:@RM:FocusPos) END RETURN