added AD group support to notifications system
This commit is contained in:
@ -37,7 +37,7 @@ BEGIN CASE
|
||||
CASE Instruction = 'Close' ; GOSUB Close
|
||||
CASE Instruction = 'LUNotifyID' ; GOSUB LUNotifyID
|
||||
CASE Instruction = 'AddUsers' ; GOSUB AddUsers
|
||||
|
||||
|
||||
CASE 1
|
||||
ErrorMsg = 'Unknown Instruction passed to routine'
|
||||
END CASE
|
||||
@ -53,59 +53,59 @@ RETURN Result
|
||||
* * * * * * *
|
||||
Create:
|
||||
* * * * * * *
|
||||
|
||||
IF NOT(Admin_User( @USER4 )) THEN
|
||||
Message = 'You do not have the proper security to enter Message Notifications...'
|
||||
Message<micon$> = 'H'
|
||||
Msg( '', Message )
|
||||
send_event( @window, 'CLOSE' )
|
||||
END
|
||||
|
||||
|
||||
obj_Appwindow('Create',@WINDOW)
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
|
||||
IF NOT(Admin_User( @USER4 )) THEN
|
||||
Message = 'You do not have the proper security to enter Message Notifications...'
|
||||
Message<micon$> = 'H'
|
||||
Msg( '', Message )
|
||||
send_event( @window, 'CLOSE' )
|
||||
END
|
||||
|
||||
|
||||
obj_Appwindow('Create',@WINDOW)
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Read:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Write:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Clear:
|
||||
* * * * * * *
|
||||
|
||||
GOTO Refresh
|
||||
|
||||
|
||||
GOTO Refresh
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Delete:
|
||||
* * * * * * *
|
||||
|
||||
IF NOT(Security_Check('RDS',DELETE$)) THEN
|
||||
Security_Err_Msg('RDS',DELETE$)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Result = 0 ;* OK to proceed with the delete
|
||||
|
||||
|
||||
IF NOT(Security_Check('RDS',DELETE$)) THEN
|
||||
Security_Err_Msg('RDS',DELETE$)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Result = 0 ;* OK to proceed with the delete
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@ -113,11 +113,11 @@ RETURN
|
||||
* * * * * * *
|
||||
Page:
|
||||
* * * * * * *
|
||||
|
||||
obj_Appwindow('Page')
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
|
||||
obj_Appwindow('Page')
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@ -125,74 +125,74 @@ RETURN
|
||||
* * * * * * *
|
||||
Close:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
|
||||
|
||||
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>
|
||||
IF ETCtrl NE @WINDOW:'.CASSETTES' THEN
|
||||
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 Line
|
||||
|
||||
|
||||
* 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
|
||||
NEXT I
|
||||
|
||||
|
||||
|
||||
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>
|
||||
IF ETCtrl NE @WINDOW:'.CASSETTES' THEN
|
||||
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 Line
|
||||
END
|
||||
NEXT I
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
LUNotifyID:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1
|
||||
IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2
|
||||
|
||||
TypeOver = ''
|
||||
TypeOver<PSELECT$> = 1
|
||||
|
||||
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
|
||||
IF NotifyID NE '' THEN
|
||||
obj_Appwindow('LUValReturn',NotifyID:@RM:FocusControl:@RM:FocusPos)
|
||||
END
|
||||
|
||||
|
||||
|
||||
IF NOT(ASSIGNED(Parm1)) THEN FocusControl = '' ELSE FocusControl = Parm1
|
||||
IF NOT(ASSIGNED(Parm2)) THEN FocusPos = '' ELSE FocusPos = Parm2
|
||||
|
||||
TypeOver = ''
|
||||
TypeOver<PSELECT$> = 1
|
||||
|
||||
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
|
||||
IF NotifyID NE '' THEN
|
||||
obj_Appwindow('LUValReturn',NotifyID:@RM:FocusControl:@RM:FocusPos)
|
||||
END
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@ -201,54 +201,35 @@ RETURN
|
||||
* * * * * * *
|
||||
AddUsers:
|
||||
* * * * * * *
|
||||
|
||||
CtrlEntID = @WINDOW:'.USER_ID'
|
||||
|
||||
CurrUserIDs = Get_Property(CtrlEntID,'ARRAY')<1> ;* Existing MFC codes in edit table
|
||||
CurrUserIDsTrimmed = ''
|
||||
FOR I = 1 TO COUNT(CurrUserIDs,@VM) + (CurrUserIDs NE '')
|
||||
IF CurrUserIDs<1,I> NE '' THEN
|
||||
CurrUserIDsTrimmed<1,I> = CurrUserIDs<1,I>
|
||||
END
|
||||
NEXT I
|
||||
CurrUserIDs = CurrUserIDsTrimmed
|
||||
|
||||
NewUserIDs = Popup(@WINDOW,'','SHOW_USERS')
|
||||
|
||||
IF NewUserIDs = '' OR NewUserIDs = CHAR(27) THEN RETURN
|
||||
|
||||
FOR I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
|
||||
NewUserID = NewUserIDs<1,I>
|
||||
LOCATE NewUserID IN CurrUserIDs BY 'AL' USING @VM SETTING POS ELSE
|
||||
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
|
||||
END
|
||||
|
||||
NEXT I
|
||||
|
||||
|
||||
Set_Property(CtrlEntID,'DEFPROP',CurrUserIDs)
|
||||
Send_Event(CtrlEntID,'CALCULATE',2)
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
CtrlEntID = @WINDOW:'.USER_ID'
|
||||
|
||||
CurrUserIDs = Get_Property(CtrlEntID,'ARRAY')<1> ;* Existing MFC codes in edit table
|
||||
CurrUserIDsTrimmed = ''
|
||||
FOR I = 1 TO COUNT(CurrUserIDs,@VM) + (CurrUserIDs NE '')
|
||||
IF CurrUserIDs<1,I> NE '' THEN
|
||||
CurrUserIDsTrimmed<1,I> = CurrUserIDs<1,I>
|
||||
END
|
||||
NEXT I
|
||||
CurrUserIDs = CurrUserIDsTrimmed
|
||||
|
||||
NewUserIDs = Popup(@WINDOW,'','SHOW_USERS')
|
||||
|
||||
IF NewUserIDs = '' OR NewUserIDs = CHAR(27) THEN RETURN
|
||||
|
||||
FOR I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
|
||||
NewUserID = NewUserIDs<1,I>
|
||||
LOCATE NewUserID IN CurrUserIDs BY 'AL' USING @VM SETTING POS ELSE
|
||||
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
|
||||
END
|
||||
|
||||
NEXT I
|
||||
|
||||
|
||||
Set_Property(CtrlEntID,'DEFPROP',CurrUserIDs)
|
||||
Send_Event(CtrlEntID,'CALCULATE',2)
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user