added AD group support to notifications system
This commit is contained in:
parent
0b5ce72c39
commit
2a5abee93e
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
LSL2/STPROC/TEST_DANIEL3.txt
|
LSL2/STPROC/TEST_DANIEL3.txt
|
||||||
|
LSL2/STPROC/TEST_DANIEL3.txt
|
||||||
|
1995
LSL2/OIWIN/NDW_ACTIVE_DIRECTORY_GROUPS.json
Normal file
1995
LSL2/OIWIN/NDW_ACTIVE_DIRECTORY_GROUPS.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -10391,13 +10391,23 @@
|
|||||||
"<2,2,166>": {
|
"<2,2,166>": {
|
||||||
"<2,2,166,1>": "R",
|
"<2,2,166,1>": "R",
|
||||||
"<2,2,166,2>": "EXECUTE",
|
"<2,2,166,2>": "EXECUTE",
|
||||||
"<2,2,166,3>": "LSL2*OIWINEXE**NOTIFICATION",
|
"<2,2,166,3>": "LSL2*OIWINEXE**NDW_NOTIFICATION",
|
||||||
"<2,2,166,4>": {
|
"<2,2,166,4>": {
|
||||||
"<2,2,166,4,1>": "",
|
"<2,2,166,4,1>": "CreateParam",
|
||||||
"<2,2,166,4,2>": "@WINDOW"
|
"<2,2,166,4,2>": "@WINDOW"
|
||||||
},
|
},
|
||||||
"<2,2,166,5>": "",
|
"<2,2,166,5>": "",
|
||||||
"<2,2,166,6>": ""
|
"<2,2,166,6>": "",
|
||||||
|
"<2,2,166,7>": "",
|
||||||
|
"<2,2,166,8>": "",
|
||||||
|
"<2,2,166,9>": "",
|
||||||
|
"<2,2,166,10>": "",
|
||||||
|
"<2,2,166,11>": "",
|
||||||
|
"<2,2,166,12>": "",
|
||||||
|
"<2,2,166,13>": "",
|
||||||
|
"<2,2,166,14>": "",
|
||||||
|
"<2,2,166,15>": "STARTWIN",
|
||||||
|
"<2,2,166,16>": "0"
|
||||||
},
|
},
|
||||||
"<2,2,167>": {
|
"<2,2,167>": {
|
||||||
"<2,2,167,1>": "R",
|
"<2,2,167,1>": "R",
|
||||||
|
5457
LSL2/OIWIN/NDW_NOTIFICATION.json
Normal file
5457
LSL2/OIWIN/NDW_NOTIFICATION.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -182,6 +182,7 @@ end service
|
|||||||
// 9/26/2024 - [JRO] Initial Programmer.
|
// 9/26/2024 - [JRO] Initial Programmer.
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
Service GetADGroupsByString(SearchString, Domain=DOMAIN, SearchByDescription=DESCRIPTION_BOOL, GroupType=AD_GROUP_TYPE)
|
Service GetADGroupsByString(SearchString, Domain=DOMAIN, SearchByDescription=DESCRIPTION_BOOL, GroupType=AD_GROUP_TYPE)
|
||||||
|
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
ErrMessage = ''
|
ErrMessage = ''
|
||||||
ADGroups = ''
|
ADGroups = ''
|
||||||
|
@ -60,15 +60,16 @@ RETURN Result
|
|||||||
Create:
|
Create:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
obj_Appwindow('Create',@WINDOW)
|
obj_Appwindow('Create',@WINDOW)
|
||||||
Gosub Refresh
|
Gosub Refresh
|
||||||
Set_Property( @WINDOW: '.NOTE_DATA', 'SELPOS', 0)
|
Set_Property( @WINDOW: '.NOTE_DATA', 'SELPOS', 0)
|
||||||
Set_Property( @WINDOW: '.NOTE_DATA2', 'SELPOS', 0)
|
Set_Property( @WINDOW: '.NOTE_DATA2', 'SELPOS', 0)
|
||||||
Set_Property( @WINDOW: '.NOTE_DATA', 'PREVSELPOS', 0)
|
Set_Property( @WINDOW: '.NOTE_DATA', 'PREVSELPOS', 0)
|
||||||
Set_Property( @WINDOW: '.NOTE_DATA2', 'PREVSELPOS', 0)
|
Set_Property( @WINDOW: '.NOTE_DATA2', 'PREVSELPOS', 0)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Refresh:
|
Refresh:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
@ -92,78 +93,77 @@ Refresh:
|
|||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Rebuild:
|
Rebuild:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
NoteID = Get_Property(@WINDOW,'ID')
|
NoteID = Get_Property(@WINDOW,'ID')
|
||||||
|
|
||||||
Verify = Msg(@window,'','NOTE_PTRS_REBUILD')
|
Verify = Msg(@window,'','NOTE_PTRS_REBUILD')
|
||||||
|
|
||||||
IF NOT(Verify) THEN RETURN
|
IF NOT(Verify) THEN RETURN
|
||||||
|
|
||||||
Send_Event(@WINDOW,'CLEAR')
|
Send_Event(@WINDOW,'CLEAR')
|
||||||
|
|
||||||
|
|
||||||
Def = ""
|
Def = ""
|
||||||
Def<MTEXT$> = "Rebuilding Messages for Last 90 Days..."
|
Def<MTEXT$> = "Rebuilding Messages for Last 90 Days..."
|
||||||
Def<MTYPE$> = "U"
|
Def<MTYPE$> = "U"
|
||||||
|
|
||||||
MsgUp = Msg(@window, Def)
|
MsgUp = Msg(@window, Def)
|
||||||
|
|
||||||
obj_Notes('Rebuild',NoteID)
|
obj_Notes('Rebuild',NoteID)
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN
|
IF Get_Status(errCode) THEN
|
||||||
ErrMsg(errCode)
|
ErrMsg(errCode)
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
Msg(@window, MsgUp)
|
Msg(@window, MsgUp)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
ReadNote:
|
ReadNote:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
PageNo = Get_Property(@WINDOW, 'VPOSITION')
|
PageNo = Get_Property(@WINDOW, 'VPOSITION')
|
||||||
If PageNo<1> = 1 then
|
If PageNo<1> = 1 then
|
||||||
NoteRow = Get_Property(@WINDOW:'.NOTE_DATA','ROWDATA')
|
NoteRow = Get_Property(@WINDOW:'.NOTE_DATA','ROWDATA')
|
||||||
end else
|
end else
|
||||||
NoteRow = Get_Property(@WINDOW:'.NOTE_DATA2','ROWDATA')
|
NoteRow = Get_Property(@WINDOW:'.NOTE_DATA2','ROWDATA')
|
||||||
end
|
end
|
||||||
|
|
||||||
NoteId = NoteRow<COL$NOTE_ID>
|
NoteId = NoteRow<COL$NOTE_ID>
|
||||||
|
|
||||||
IF NoteID NE '' THEN
|
IF NoteID NE '' THEN
|
||||||
obj_AppWindow('ViewRelated','NOTE_MESSAGE':@RM:NoteID:@RM)
|
obj_AppWindow('ViewRelated','NOTE_MESSAGE':@RM:NoteID:@RM)
|
||||||
|
|
||||||
END ELSE
|
END ELSE
|
||||||
ErrMsg('Read Note called without a Note ID.')
|
ErrMsg('Read Note called without a Note ID.')
|
||||||
END
|
END
|
||||||
|
|
||||||
npParms = 'NOTE_PTRS':@RM:@USER4
|
npParms = 'NOTE_PTRS':@RM:@USER4
|
||||||
UserRec = Database_Services('ReadDataRow', 'NOTE_PTRS', @USER4)
|
UserRec = Database_Services('ReadDataRow', 'NOTE_PTRS', @USER4)
|
||||||
|
|
||||||
IF Error_Services('HasError') THEN
|
IF Error_Services('HasError') THEN
|
||||||
ErrMsg(Error_Services('GetMessage'))
|
ErrMsg(Error_Services('GetMessage'))
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
LOCATE NoteID IN UserRec<NOTE_PTRS_NOTE_IDS$> USING @VM SETTING Fpos THEN
|
LOCATE NoteID IN UserRec<NOTE_PTRS_NOTE_IDS$> USING @VM SETTING Fpos THEN
|
||||||
UserRec<NOTE_PTRS_NEW$,Fpos> = 'No'
|
UserRec<NOTE_PTRS_NEW$,Fpos> = 'No'
|
||||||
|
|
||||||
//npParms = FIELDSTORE(npParms,@RM,4,0,UserRec)
|
//npParms = FIELDSTORE(npParms,@RM,4,0,UserRec)
|
||||||
//obj_Tables('WriteRec',npParms)
|
//obj_Tables('WriteRec',npParms)
|
||||||
Database_Services('WriteDataRow', 'NOTE_PTRS', @USER4, UserRec, True$, False$, True$)
|
Database_Services('WriteDataRow', 'NOTE_PTRS', @USER4, UserRec, True$, False$, True$)
|
||||||
END
|
END
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -172,10 +172,10 @@ RETURN
|
|||||||
WriteNote:
|
WriteNote:
|
||||||
* * * * * *
|
* * * * * *
|
||||||
|
|
||||||
NoteID = NextKey('NOTES')
|
NoteID = NextKey('NOTES')
|
||||||
obj_AppWindow('ViewRelated','NOTE_MESSAGE':@RM:NoteID)
|
obj_AppWindow('ViewRelated','NOTE_MESSAGE':@RM:NoteID)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -184,14 +184,14 @@ RETURN
|
|||||||
MsgGroups:
|
MsgGroups:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
If Get_Property('NDW_MAIN', 'VISIBLE') then
|
If Get_Property('NDW_MAIN', 'VISIBLE') then
|
||||||
AppMain = 'NDW_MAIN'
|
AppMain = 'NDW_MAIN'
|
||||||
end else
|
end else
|
||||||
AppMain = 'LSL_MAIN2'
|
AppMain = 'LSL_MAIN2'
|
||||||
end
|
end
|
||||||
Start_Window('MSG_GROUPS',@WINDOW,'*CENTER',AppMain)
|
Start_Window('MSG_GROUPS',@WINDOW,'*CENTER',AppMain)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -200,36 +200,36 @@ RETURN
|
|||||||
Delete:
|
Delete:
|
||||||
* * * * * *
|
* * * * * *
|
||||||
|
|
||||||
PageNo = Get_Property(@WINDOW, 'VPOSITION')
|
PageNo = Get_Property(@WINDOW, 'VPOSITION')
|
||||||
If PageNo<1> = 1 then
|
If PageNo<1> = 1 then
|
||||||
NoteDataList = Get_Property(@WINDOW:'.NOTE_DATA','LIST')
|
NoteDataList = Get_Property(@WINDOW:'.NOTE_DATA','LIST')
|
||||||
CurrRow = Get_Property(@WINDOW:'.NOTE_DATA','SELPOS')<2>
|
CurrRow = Get_Property(@WINDOW:'.NOTE_DATA','SELPOS')<2>
|
||||||
end else
|
end else
|
||||||
NoteDataList = Get_Property(@WINDOW:'.NOTE_DATA2','LIST')
|
NoteDataList = Get_Property(@WINDOW:'.NOTE_DATA2','LIST')
|
||||||
CurrRow = Get_Property(@WINDOW:'.NOTE_DATA2','SELPOS')<2>
|
CurrRow = Get_Property(@WINDOW:'.NOTE_DATA2','SELPOS')<2>
|
||||||
end
|
end
|
||||||
|
|
||||||
CONVERT @VM TO @SVM IN NoteDataList
|
CONVERT @VM TO @SVM IN NoteDataList
|
||||||
CONVERT @FM TO @VM IN NoteDataList
|
CONVERT @FM TO @VM IN NoteDataList
|
||||||
|
|
||||||
TypeOver = ''
|
TypeOver = ''
|
||||||
TypeOver<PDISPLAY$> = NoteDataList
|
TypeOver<PDISPLAY$> = NoteDataList
|
||||||
TypeOver<PINITSELECT$> = CurrRow
|
TypeOver<PINITSELECT$> = CurrRow
|
||||||
|
|
||||||
NoteIDs = Popup(@WINDOW,TypeOver,'NOTE_PTRS')
|
NoteIDs = Popup(@WINDOW,TypeOver,'NOTE_PTRS')
|
||||||
|
|
||||||
|
|
||||||
IF NoteIDS = '' THEN RETURN
|
IF NoteIDS = '' THEN RETURN
|
||||||
|
|
||||||
npParms = 'NOTE_PTRS':@RM:@USER4
|
npParms = 'NOTE_PTRS':@RM:@USER4
|
||||||
UserRec = obj_Tables('ReadRec',npParms)
|
UserRec = obj_Tables('ReadRec',npParms)
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN
|
IF Get_Status(errCode) THEN
|
||||||
ErrMsg(errCode)
|
ErrMsg(errCode)
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(NoteIDs,@VM) + (NoteIDs NE '')
|
FOR I = 1 TO COUNT(NoteIDs,@VM) + (NoteIDs NE '')
|
||||||
NoteID = NoteIDs<1,I>
|
NoteID = NoteIDs<1,I>
|
||||||
|
|
||||||
LOCATE NoteID IN UserRec<NOTE_PTRS_NOTE_IDS$> USING @VM SETTING Fpos THEN
|
LOCATE NoteID IN UserRec<NOTE_PTRS_NOTE_IDS$> USING @VM SETTING Fpos THEN
|
||||||
@ -243,20 +243,12 @@ FOR I = 1 TO COUNT(NoteIDs,@VM) + (NoteIDs NE '')
|
|||||||
UserRec = DELETE( UserRec, NOTE_PTRS_NOTE_IDS$, Fpos, 0 )
|
UserRec = DELETE( UserRec, NOTE_PTRS_NOTE_IDS$, Fpos, 0 )
|
||||||
UserRec = DELETE( UserRec, NOTE_PTRS_ARCHIVED$, Fpos, 0 )
|
UserRec = DELETE( UserRec, NOTE_PTRS_ARCHIVED$, Fpos, 0 )
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
npParms = FIELDSTORE(npParms,@RM,4,0,UserRec)
|
npParms = FIELDSTORE(npParms,@RM,4,0,UserRec)
|
||||||
obj_Tables('WriteRec',npParms)
|
obj_Tables('WriteRec',npParms)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,17 +54,17 @@ RETURN Result
|
|||||||
Create:
|
Create:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
IF NOT(Admin_User( @USER4 )) THEN
|
IF NOT(Admin_User( @USER4 )) THEN
|
||||||
Message = 'You do not have the proper security to enter Message Notifications...'
|
Message = 'You do not have the proper security to enter Message Notifications...'
|
||||||
Message<micon$> = 'H'
|
Message<micon$> = 'H'
|
||||||
Msg( '', Message )
|
Msg( '', Message )
|
||||||
send_event( @window, 'CLOSE' )
|
send_event( @window, 'CLOSE' )
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
obj_Appwindow('Create',@WINDOW)
|
obj_Appwindow('Create',@WINDOW)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ Read:
|
|||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ RETURN
|
|||||||
Clear:
|
Clear:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
GOTO Refresh
|
GOTO Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -99,12 +99,12 @@ RETURN
|
|||||||
Delete:
|
Delete:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
IF NOT(Security_Check('RDS',DELETE$)) THEN
|
IF NOT(Security_Check('RDS',DELETE$)) THEN
|
||||||
Security_Err_Msg('RDS',DELETE$)
|
Security_Err_Msg('RDS',DELETE$)
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
Result = 0 ;* OK to proceed with the delete
|
Result = 0 ;* OK to proceed with the delete
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -114,9 +114,9 @@ RETURN
|
|||||||
Page:
|
Page:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
obj_Appwindow('Page')
|
obj_Appwindow('Page')
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -135,31 +135,31 @@ Refresh:
|
|||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
|
||||||
* QBF buttons
|
* QBF buttons
|
||||||
|
|
||||||
Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM
|
Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM
|
||||||
Ctrls := @WINDOW:'.QBF_PREV_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_ABS_FIX':@RM ; Props := 'ENABLED':@RM
|
||||||
Ctrls := @WINDOW:'.QBF_NEXT_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_LAST_FIX':@RM ; Props := 'ENABLED':@RM
|
||||||
Ctrls := @WINDOW:'.QBF_STOP_FIX' ; Props := 'ENABLED'
|
Ctrls := @WINDOW:'.QBF_STOP_FIX' ; Props := 'ENABLED'
|
||||||
|
|
||||||
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
|
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
|
||||||
Vals = 0:@RM:0:@RM:0:@RM:0:@RM:0:@RM:0
|
Vals = 0:@RM:0:@RM:0:@RM:0:@RM:0:@RM:0
|
||||||
END ELSE
|
END ELSE
|
||||||
Vals = 1:@RM:1:@RM:1:@RM:1:@RM:1:@RM:1
|
Vals = 1:@RM:1:@RM:1:@RM:1:@RM:1:@RM:1
|
||||||
END
|
END
|
||||||
|
|
||||||
Set_Property(Ctrls,Props,Vals)
|
Set_Property(Ctrls,Props,Vals)
|
||||||
|
|
||||||
* Turn edit table symbolic column backgrounds to green
|
* Turn edit table symbolic column backgrounds to green
|
||||||
|
|
||||||
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
|
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
|
||||||
|
|
||||||
ETCtrls = ETSymbolics<1>
|
ETCtrls = ETSymbolics<1>
|
||||||
ETCols = ETSymbolics<2>
|
ETCols = ETSymbolics<2>
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
||||||
ETCtrl = ETCtrls<1,I>
|
ETCtrl = ETCtrls<1,I>
|
||||||
IF ETCtrl NE @WINDOW:'.CASSETTES' THEN
|
IF ETCtrl NE @WINDOW:'.CASSETTES' THEN
|
||||||
ETList = Get_Property(ETCtrl,'LIST')
|
ETList = Get_Property(ETCtrl,'LIST')
|
||||||
@ -171,7 +171,7 @@ FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
|||||||
END
|
END
|
||||||
NEXT Line
|
NEXT Line
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -182,16 +182,16 @@ LUNotifyID:
|
|||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
TypeOver = ''
|
TypeOver = ''
|
||||||
TypeOver<PSELECT$> = 1
|
TypeOver<PSELECT$> = 1
|
||||||
|
|
||||||
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
|
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
|
||||||
IF NotifyID NE '' THEN
|
IF NotifyID NE '' THEN
|
||||||
obj_Appwindow('LUValReturn',NotifyID:@RM:FocusControl:@RM:FocusPos)
|
obj_Appwindow('LUValReturn',NotifyID:@RM:FocusControl:@RM:FocusPos)
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -202,53 +202,34 @@ RETURN
|
|||||||
AddUsers:
|
AddUsers:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
CtrlEntID = @WINDOW:'.USER_ID'
|
CtrlEntID = @WINDOW:'.USER_ID'
|
||||||
|
|
||||||
CurrUserIDs = Get_Property(CtrlEntID,'ARRAY')<1> ;* Existing MFC codes in edit table
|
CurrUserIDs = Get_Property(CtrlEntID,'ARRAY')<1> ;* Existing MFC codes in edit table
|
||||||
CurrUserIDsTrimmed = ''
|
CurrUserIDsTrimmed = ''
|
||||||
FOR I = 1 TO COUNT(CurrUserIDs,@VM) + (CurrUserIDs NE '')
|
FOR I = 1 TO COUNT(CurrUserIDs,@VM) + (CurrUserIDs NE '')
|
||||||
IF CurrUserIDs<1,I> NE '' THEN
|
IF CurrUserIDs<1,I> NE '' THEN
|
||||||
CurrUserIDsTrimmed<1,I> = CurrUserIDs<1,I>
|
CurrUserIDsTrimmed<1,I> = CurrUserIDs<1,I>
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
CurrUserIDs = CurrUserIDsTrimmed
|
CurrUserIDs = CurrUserIDsTrimmed
|
||||||
|
|
||||||
NewUserIDs = Popup(@WINDOW,'','SHOW_USERS')
|
NewUserIDs = Popup(@WINDOW,'','SHOW_USERS')
|
||||||
|
|
||||||
IF NewUserIDs = '' OR NewUserIDs = CHAR(27) THEN RETURN
|
IF NewUserIDs = '' OR NewUserIDs = CHAR(27) THEN RETURN
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
|
FOR I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
|
||||||
NewUserID = NewUserIDs<1,I>
|
NewUserID = NewUserIDs<1,I>
|
||||||
LOCATE NewUserID IN CurrUserIDs BY 'AL' USING @VM SETTING POS ELSE
|
LOCATE NewUserID IN CurrUserIDs BY 'AL' USING @VM SETTING POS ELSE
|
||||||
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
|
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
|
||||||
END
|
END
|
||||||
|
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
Set_Property(CtrlEntID,'DEFPROP',CurrUserIDs)
|
Set_Property(CtrlEntID,'DEFPROP',CurrUserIDs)
|
||||||
Send_Event(CtrlEntID,'CALCULATE',2)
|
Send_Event(CtrlEntID,'CALCULATE',2)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -866,8 +866,8 @@ AddMakeup:
|
|||||||
Convert @VM to '' in SlotWaferIDs
|
Convert @VM to '' in SlotWaferIDs
|
||||||
|
|
||||||
// Flush/update pending index transactions.
|
// Flush/update pending index transactions.
|
||||||
Update_Index('WO_MAT', 'MU_PART_NO', False$)
|
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
|
||||||
Update_Index('WO_MAT', 'CURR_STATUS', False$)
|
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN
|
IF Get_Status(errCode) THEN
|
||||||
ErrMsg(errCode)
|
ErrMsg(errCode)
|
||||||
@ -1197,3 +1197,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -666,7 +666,6 @@ Service SearchIndex(TableName, ColumnName, SearchValue, UpdateIndex)
|
|||||||
|
|
||||||
ServiceKeyID := '*' : TableName : '*' : ColumnName : '*' : SearchValue
|
ServiceKeyID := '*' : TableName : '*' : ColumnName : '*' : SearchValue
|
||||||
ServiceKeyID = SRP_Encode(ServiceKeyID, 'BASE64')
|
ServiceKeyID = SRP_Encode(ServiceKeyID, 'BASE64')
|
||||||
* KeyIDList = Memory_Services('GetValue', ServiceKeyID, True$, 5)
|
|
||||||
KeyIDList = ''
|
KeyIDList = ''
|
||||||
|
|
||||||
If TableName NE '' AND ColumnName NE '' AND SearchValue NE '' then
|
If TableName NE '' AND ColumnName NE '' AND SearchValue NE '' then
|
||||||
@ -674,7 +673,7 @@ Service SearchIndex(TableName, ColumnName, SearchValue, UpdateIndex)
|
|||||||
DictTableHandle = Database_Services('GetTableHandle', 'DICT.' : TableName)
|
DictTableHandle = Database_Services('GetTableHandle', 'DICT.' : TableName)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
If UpdateIndex then Update_Index(TableName, ColumnName 0)
|
If UpdateIndex then Update_Index(TableName, ColumnName, False$, True$)
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
Flag = ''
|
Flag = ''
|
||||||
Btree.Extract(ColumnName : @VM : SearchValue : @FM, Tablename, DictTableHandle, KeyIDList, 'S', Flag)
|
Btree.Extract(ColumnName : @VM : SearchValue : @FM, Tablename, DictTableHandle, KeyIDList, 'S', Flag)
|
||||||
@ -1045,3 +1044,4 @@ end service
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ $insert LOGICAL
|
|||||||
$insert SERVICE_SETUP
|
$insert SERVICE_SETUP
|
||||||
$Insert LSL_USERS_EQU
|
$Insert LSL_USERS_EQU
|
||||||
$Insert RLIST_EQUATES
|
$Insert RLIST_EQUATES
|
||||||
|
$Insert NOTIFICATION_EQUATES
|
||||||
|
|
||||||
equ crlf$ to \0D0A\
|
equ crlf$ to \0D0A\
|
||||||
equ tab$ to char(09)
|
equ tab$ to char(09)
|
||||||
@ -40,11 +41,17 @@ EQU FRIDAY$ to 5
|
|||||||
EQU SATURDAY$ to 6
|
EQU SATURDAY$ to 6
|
||||||
EQU SUNDAY$ to 7
|
EQU SUNDAY$ to 7
|
||||||
|
|
||||||
Declare Function Get.RecCount, SRP_Datetime, Datetime, SRP_MATH, Lsl_Users_Services
|
Declare Function Get.RecCount, SRP_Datetime, Datetime, SRP_MATH, Lsl_Users_Services, Active_Directory_Services
|
||||||
Declare Function DCount
|
Declare Function DCount, Database_Services, Environment_Services, SRP_Array, Logging_Services
|
||||||
Declare Function Database_Services,
|
Declare subroutine Btree.Extract, Logging_Services
|
||||||
Declare Function Environment_Services
|
|
||||||
Declare subroutine Btree.Extract
|
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\LSLUsers'
|
||||||
|
LogDate = Oconv(Date(), 'D4/')
|
||||||
|
LogTime = Oconv(Time(), 'MTS')
|
||||||
|
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Notification Groups Update Log.csv'
|
||||||
|
Headers = 'Logging DTM' : @FM : 'Notification ID' : @FM : 'Notes'
|
||||||
|
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||||
|
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||||
|
|
||||||
GoToService else
|
GoToService else
|
||||||
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||||
@ -187,6 +194,28 @@ Service GetOnShiftUsersByClass(Class, IncludeNextShift)
|
|||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
Service GetOnShiftUsers()
|
||||||
|
|
||||||
|
DatetimeNow = OConv(SRP_DateTime("Now"), 'DT')
|
||||||
|
CurrentShift = Lsl_Users_Services('GetShiftByDate', DatetimeNow)
|
||||||
|
Open 'DICT.LSL_USERS' to DictLSLUsers then
|
||||||
|
SearchString = ''
|
||||||
|
SearchString := 'SHIFT' : @VM : CurrentShift : @VM : '' : @FM ; // Include office personnel (i.e. no shift assigned)
|
||||||
|
SearchString := 'ACTIVE' : @VM : True$ : @FM
|
||||||
|
LSLUsersKeys = ''
|
||||||
|
Btree.Extract(SearchString, 'LSL_USERS', DictLSLUsers, LSLUsersKeys, '', '')
|
||||||
|
ErrCode = ''
|
||||||
|
IF Get_Status(ErrCode) then
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. Error calling Btree.Extract. Error code ':ErrCode:'.'
|
||||||
|
end
|
||||||
|
Response = LSLUsersKeys
|
||||||
|
end else
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. Error opening LSL_USERS dictionary.'
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetShiftByDate(Date, GenerateFlag)
|
Service GetShiftByDate(Date, GenerateFlag)
|
||||||
|
|
||||||
OnShift = ''; *Return Value
|
OnShift = ''; *Return Value
|
||||||
@ -350,3 +379,86 @@ Service GetShiftByDate(Date, GenerateFlag)
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
Service UpdateNotificationGroups()
|
||||||
|
|
||||||
|
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||||
|
Lock hSysLists, ServiceKeyID then
|
||||||
|
Open 'NOTIFICATION' to hTable then
|
||||||
|
EOF = False$
|
||||||
|
Select hTable
|
||||||
|
Loop
|
||||||
|
ReadNext KeyId else EOF = True$
|
||||||
|
Until EOF
|
||||||
|
Lock hTable, KeyId then
|
||||||
|
Read Rec from hTable, KeyId then
|
||||||
|
UseAD = Rec<NOTIFICATION_USE_ACTIVE_DIRECTORY$>
|
||||||
|
If UseAD then
|
||||||
|
LSLUserList = ''
|
||||||
|
// Update LSL_User list based on current members in Active Directory groups
|
||||||
|
ADGroups = Rec<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$>
|
||||||
|
For each GroupName in ADGroups using @VM
|
||||||
|
MemberList = Active_Directory_Services('GetADGroupMembersByGroupName', GroupName, 'INFINEON')
|
||||||
|
MemberList = SRP_Array('Rotate', MemberList, @FM, @VM)
|
||||||
|
ADUserNames = MemberList<1>
|
||||||
|
LSLUserNames = ''
|
||||||
|
LSLNames = ''
|
||||||
|
Open 'DICT.LSL_USERS' to hDict then
|
||||||
|
For each ADUserName in ADUserNames using @VM setting vPos
|
||||||
|
Query = 'DOMAIN_USERNAME':@VM:ADUserName:@FM:'ACTIVE':@VM:True$:@FM
|
||||||
|
Flag = ''
|
||||||
|
LSLUsername = ''
|
||||||
|
Btree.Extract(Query, 'LSL_USERS', hDict, LSLUsername, '', Flag)
|
||||||
|
If Flag EQ 0 then
|
||||||
|
If LSLUsername NE '' then
|
||||||
|
LSLUserList<0, -1> = LSLUsername
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = KeyId
|
||||||
|
LogData<3> = 'No LSL_USERS record found for active directory member "':ADUserName:'".'
|
||||||
|
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = KeyId
|
||||||
|
LogData<3> = 'Btree.Extract call failed for DOMAIN_USERNAME "':ADUserName:'".'
|
||||||
|
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
Next ADUserName
|
||||||
|
end
|
||||||
|
Next GroupName
|
||||||
|
LSLUserList = SRP_Array('Clean', LSLUserList, 'TrimAndMakeUnique', @VM)
|
||||||
|
LSLUserList = SRP_Array('SortSimpleList', LSLUserList, 'AscendingText', @VM)
|
||||||
|
Rec<NOTIFICATION_USER_ID$> = LSLUserList
|
||||||
|
Write Rec on hTable, KeyId else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = KeyId
|
||||||
|
LogData<3> = 'Failed to write record during update.'
|
||||||
|
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = KeyId
|
||||||
|
LogData<3> = 'Failed to read record during update.'
|
||||||
|
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
Unlock hTable, KeyId else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = KeyId
|
||||||
|
LogData<3> = 'Failed to unlock record during update.'
|
||||||
|
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Repeat
|
||||||
|
end
|
||||||
|
Unlock hSysLists, ServiceKeyID else Null
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
151
LSL2/STPROC/NDW_ACTIVE_DIRECTORY_GROUPS_EVENTS.txt
Normal file
151
LSL2/STPROC/NDW_ACTIVE_DIRECTORY_GROUPS_EVENTS.txt
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
Compile function NDW_ACTIVE_DIRECTORY_GROUPS_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
|
||||||
|
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||||
|
permission from Infineon.
|
||||||
|
|
||||||
|
Name : NDW_Active_Directory_Groups_Events
|
||||||
|
|
||||||
|
Description : This function acts as a commuter module for all events related to this window.
|
||||||
|
|
||||||
|
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||||
|
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||||
|
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||||
|
limited to the events which are currently promoted.
|
||||||
|
|
||||||
|
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||||
|
formatted like this:
|
||||||
|
|
||||||
|
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||||
|
|
||||||
|
Parameters :
|
||||||
|
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||||
|
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||||
|
Param1-15 [in] -- Additional event parameter holders
|
||||||
|
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||||
|
EVENT_SETUP insert
|
||||||
|
|
||||||
|
History : (Date, Initials, Notes)
|
||||||
|
10/01/24 djs Created initial commuter module.
|
||||||
|
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#pragma precomp SRP_PreCompiler
|
||||||
|
#window NDW_ACTIVE_DIRECTORY_GROUPS
|
||||||
|
|
||||||
|
$Insert EVENT_SETUP
|
||||||
|
$Insert LOGICAL
|
||||||
|
$Insert RTI_STYLE_EQUATES
|
||||||
|
$Insert MSG_EQUATES
|
||||||
|
|
||||||
|
Declare function Active_Directory_Services, Send_Message, SRP_Array
|
||||||
|
Declare subroutine End_Dialog, Set_Property, Btree.Extract
|
||||||
|
|
||||||
|
GoToEvent Event for CtrlEntId else
|
||||||
|
// Event not implemented
|
||||||
|
end
|
||||||
|
|
||||||
|
Return EventFlow or 1
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// EVENT HANDLERS
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Event WINDOW.CREATE(CreateParam)
|
||||||
|
|
||||||
|
SelGroups = CreateParam
|
||||||
|
Def = ""
|
||||||
|
Def<MCOL$> = -2
|
||||||
|
Def<MROW$> = -2
|
||||||
|
Def<MTEXT$> = "Loading groups..."
|
||||||
|
Def<MTYPE$> = "U"
|
||||||
|
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||||
|
|
||||||
|
ADGroupData = Active_Directory_Services('GetADGroupsByString', 'MES-Mesa*', 'INFINEON')
|
||||||
|
ADGroupData<-1> = Active_Directory_Services('GetADGroupsByString', 'IFX-IRF-Mesa*', 'INFINEON')
|
||||||
|
ADGroupData<-1> = Active_Directory_Services('GetADGroupsByString', 'KLU-Mesa*', 'INFINEON')
|
||||||
|
|
||||||
|
ADGroupData = SRP_Array('Clean', ADGroupData, 'TrimAndMakeUnique', @FM)
|
||||||
|
NumRows = DCount(ADGroupData, @FM)
|
||||||
|
If NumRows GT 0 then
|
||||||
|
For RowIndex = 1 to NumRows
|
||||||
|
ThisGroupID = ADGroupData<RowIndex, 1>
|
||||||
|
Selected = InList(SelGroups, ThisGroupID, @VM)
|
||||||
|
ADGroupData = Insert(ADGroupData, RowIndex, 1, 0, Selected)
|
||||||
|
Next RowIndex
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', ADGroupData)
|
||||||
|
|
||||||
|
ColStyles = Send_Message(@Window:'.EDT_AD_GROUPS','COLSTYLE',0,'')
|
||||||
|
|
||||||
|
ColStyles<1> = BitOr(ColStyles<1>,DTCS_CHECKBOX$)
|
||||||
|
ColStyles<1> = BitOr(ColStyles<1>,DTCS_CHECKBOXCENTER$)
|
||||||
|
|
||||||
|
void = Send_Message(@Window:'.EDT_AD_GROUPS','COLSTYLE',0,ColStyles)
|
||||||
|
|
||||||
|
Msg(@window, MsgUp) ;* take down the processing message
|
||||||
|
|
||||||
|
End Event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_OK.CLICK()
|
||||||
|
|
||||||
|
SelGroups = ''
|
||||||
|
List = Get_Property(@Window:'.EDT_AD_GROUPS', 'LIST')
|
||||||
|
If List NE '' then
|
||||||
|
For each Row in List using @FM setting RowIndex
|
||||||
|
RowSelected = Row<0, 1>
|
||||||
|
If RowSelected then
|
||||||
|
SelGroups<-1> = Row<0, 2> : @VM : Row<0, 3> : @VM : Row<0, 4>
|
||||||
|
end
|
||||||
|
Next Row
|
||||||
|
end
|
||||||
|
End_Dialog(@Window, SelGroups)
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_CANCEL.CLICK()
|
||||||
|
|
||||||
|
End_Dialog(@Window, '')
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event EDT_AD_GROUPS.ROWSELCHANGED(SelRow, SelState)
|
||||||
|
|
||||||
|
Def = ""
|
||||||
|
Def<MCOL$> = -2
|
||||||
|
Def<MROW$> = -2
|
||||||
|
Def<MTEXT$> = "Loading group data..."
|
||||||
|
Def<MTYPE$> = "U"
|
||||||
|
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||||
|
|
||||||
|
List = Get_Property(CtrlEntId, 'LIST')
|
||||||
|
RowData = List<SelRow>
|
||||||
|
GroupName = RowData<0, 2>
|
||||||
|
Array = Get_Property(@Window, '@':GroupName)
|
||||||
|
If Array EQ '' then
|
||||||
|
MemberList = Active_Directory_Services('GetADGroupMembersByGroupName', GroupName, 'INFINEON')
|
||||||
|
MemberList = SRP_Array('Rotate', MemberList, @FM, @VM)
|
||||||
|
ADUserNames = MemberList<1>
|
||||||
|
LSLUserNames = ''
|
||||||
|
LSLNames = ''
|
||||||
|
Open 'DICT.LSL_USERS' to hDict then
|
||||||
|
For each ADUserName in ADUserNames using @VM setting vPos
|
||||||
|
Query = 'DOMAIN_USERNAME':@VM:ADUserName:@FM
|
||||||
|
Flag = ''
|
||||||
|
LSLUsername = ''
|
||||||
|
Btree.Extract(Query, 'LSL_USERS', hDict, LSLUsername, '', Flag)
|
||||||
|
LSLUsernames<0, vPos> = LSLUsername<0, 1>
|
||||||
|
LSLNames<0, vPos> = Xlate('LSL_USERS', LSLUserName<0, 1>, 'FIRST_LAST', 'X')
|
||||||
|
Next ADUserName
|
||||||
|
end
|
||||||
|
Array = ADUsernames : @FM : LSLUsernames : @FM : LSLNames
|
||||||
|
Set_Property(@Window, '@':GroupName, Array)
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.EDT_AD_MEMBERS', 'ARRAY', Array)
|
||||||
|
|
||||||
|
Msg(@window, MsgUp) ;* take down the processing message
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
@ -93,7 +93,7 @@ Set_List:
|
|||||||
List = ""
|
List = ""
|
||||||
Table = "AUDIT_WO_MAST_SCHED"
|
Table = "AUDIT_WO_MAST_SCHED"
|
||||||
Field = "DATE_IN"
|
Field = "DATE_IN"
|
||||||
Update_Index(Table, Field, No$)
|
Update_Index(Table, Field, No$, True$)
|
||||||
|
|
||||||
Open Table to hTable else null
|
Open Table to hTable else null
|
||||||
|
|
||||||
@ -133,3 +133,4 @@ Set_List:
|
|||||||
Set_Property(@Window:".RPT_LIST", "OLE.List", List)
|
Set_Property(@Window:".RPT_LIST", "OLE.List", List)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -378,6 +378,7 @@ Event WINDOW.TIMER()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Notes_Services('UpdateNotes', @User4)
|
Notes_Services('UpdateNotes', @User4)
|
||||||
|
If Error_Services('HasError') then Error_Services('DisplayError')
|
||||||
NewMessages = Notes_Services('GetUnreadMessageCount', @User4)
|
NewMessages = Notes_Services('GetUnreadMessageCount', @User4)
|
||||||
|
|
||||||
ColorFill = ''
|
ColorFill = ''
|
||||||
@ -852,3 +853,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
438
LSL2/STPROC/NDW_NOTIFICATION_EVENTS.txt
Normal file
438
LSL2/STPROC/NDW_NOTIFICATION_EVENTS.txt
Normal file
@ -0,0 +1,438 @@
|
|||||||
|
Compile function NDW_NOTIFICATION_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
|
||||||
|
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||||
|
permission from Infineon.
|
||||||
|
|
||||||
|
Name : NDW_Notification_Events
|
||||||
|
|
||||||
|
Description : This function acts as a commuter module for all events related to this window.
|
||||||
|
|
||||||
|
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||||
|
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||||
|
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||||
|
limited to the events which are currently promoted.
|
||||||
|
|
||||||
|
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||||
|
formatted like this:
|
||||||
|
|
||||||
|
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||||
|
|
||||||
|
Parameters :
|
||||||
|
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||||
|
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||||
|
Param1-15 [in] -- Additional event parameter holders
|
||||||
|
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||||
|
EVENT_SETUP insert
|
||||||
|
|
||||||
|
History : (Date, Initials, Notes)
|
||||||
|
09/30/24 djs Created initial commuter module.
|
||||||
|
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#pragma precomp SRP_PreCompiler
|
||||||
|
#window NDW_NOTIFICATION
|
||||||
|
|
||||||
|
$Insert EVENT_SETUP
|
||||||
|
$Insert APP_INSERTS
|
||||||
|
$Insert MSG_EQUATES
|
||||||
|
$Insert POPUP_EQUATES
|
||||||
|
$Insert NOTIFICATION_EQUATES
|
||||||
|
|
||||||
|
EQU READONLY_GREEN$ TO 192 + (220*256) + (192*65536)
|
||||||
|
|
||||||
|
Declare function Admin_User, Database_Services, Error_Services, Active_Directory_Services, SRP_Array
|
||||||
|
Declare subroutine PlaceDialog, Error_Services, Database_Services, Btree.Extract
|
||||||
|
|
||||||
|
GoToEvent Event for CtrlEntId else
|
||||||
|
// Event not implemented
|
||||||
|
end
|
||||||
|
|
||||||
|
Return EventFlow or 1
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// EVENT HANDLERS
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Event WINDOW.CREATE(CreateParam)
|
||||||
|
|
||||||
|
PlaceDialog(-2, -2)
|
||||||
|
ColorArray = Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0)
|
||||||
|
ColorArray<1> = READONLY_GREEN$
|
||||||
|
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 1, 0, ColorArray)
|
||||||
|
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0, ColorArray)
|
||||||
|
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 1, 0, ColorArray)
|
||||||
|
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 2, 0, ColorArray)
|
||||||
|
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 3, 0, ColorArray)
|
||||||
|
|
||||||
|
End Event
|
||||||
|
|
||||||
|
|
||||||
|
Event WINDOW.READ()
|
||||||
|
|
||||||
|
Key = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
|
||||||
|
Begin Case
|
||||||
|
Case Key EQ ''
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', False$)
|
||||||
|
Case RowExists('NOTIFICATION', Key)
|
||||||
|
// Populate form
|
||||||
|
HaveLock = Database_Services('GetKeyIDLock', 'NOTIFICATION', Key, True$)
|
||||||
|
If HaveLock then
|
||||||
|
Set_Property(@Window, '@HAVE_LOCK', HaveLock)
|
||||||
|
Set_Property(@Window, '@LOCK_KEY', Key)
|
||||||
|
|
||||||
|
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', True$)
|
||||||
|
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', True$)
|
||||||
|
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', True$)
|
||||||
|
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', True$)
|
||||||
|
Set_Property(@Window:'.PUB_DELETE', 'ENABLED', True$)
|
||||||
|
Set_Property(@Window:'.PUB_SAVE', 'ENABLED', True$)
|
||||||
|
NotifyRec = Database_Services('ReadDataRow', 'NOTIFICATION', Key)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
Set_Property(@Window, '@RECORD', NotifyRec)
|
||||||
|
Set_Property(@Window:'.EDL_DESCRIPTION', 'TEXT', NotifyRec<NOTIFICATION_DESC$>)
|
||||||
|
UseAD = NotifyRec<NOTIFICATION_USE_ACTIVE_DIRECTORY$>
|
||||||
|
Set_Property(@Window:'.CHK_USE_AD', 'DEFPROP', UseAD)
|
||||||
|
LimitOnShift = NotifyRec<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$>
|
||||||
|
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP', LimitOnShift)
|
||||||
|
|
||||||
|
LSLUsers = NotifyRec<NOTIFICATION_USER_ID$>
|
||||||
|
LSLUsernames = Xlate('LSL_USERS', LSLUsers, 'FIRST_LAST', 'X')
|
||||||
|
LSLUsersArray = LSLUsers : @FM : LSLUsernames
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', LSLUsersArray)
|
||||||
|
ADGroups = NotifyRec<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$>
|
||||||
|
GroupList = ''
|
||||||
|
If ADGroups NE '' then
|
||||||
|
For each ADGroup in ADGroups using @VM setting vPos
|
||||||
|
GroupList<-1> = Active_Directory_Services('GetADGroupsByString', ADGroup, 'INFINEON')
|
||||||
|
Next ADGroup
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', GroupList)
|
||||||
|
GoSub EnableControls
|
||||||
|
end else
|
||||||
|
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error locking NOTIFICATION record "':Key:'" for update!')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error reading NOTIFICATION record "':Key:'"!')
|
||||||
|
end
|
||||||
|
Case Otherwise$
|
||||||
|
// User is creating a new record
|
||||||
|
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', True$)
|
||||||
|
GoSub EnableControls
|
||||||
|
End Case
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event WINDOW.CLEAR(bSaveKey, bSuppressWarning, bMaintainFocus)
|
||||||
|
|
||||||
|
GoSub EnableControls
|
||||||
|
Set_Property(@Window:'.PUB_DELETE', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', True$)
|
||||||
|
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'ENABLED', False$)
|
||||||
|
|
||||||
|
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.REM_ADD_USERS', 'ENABLED', False$)
|
||||||
|
|
||||||
|
Set_Property(@Window:'.GRB_AD_GROUPS', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.PUB_ADD_GROUPS', 'ENABLED', False$)
|
||||||
|
Set_Property(@Window:'.REM_ADD_GROUPS', 'ENABLED', False$)
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event WINDOW.WRITE()
|
||||||
|
|
||||||
|
Key = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
|
||||||
|
NotifyRec = Get_Property(@Window, '@RECORD')
|
||||||
|
NotifyRec<NOTIFICATION_DESC$> = Get_Property(@Window:'.EDL_DESCRIPTION', 'TEXT')
|
||||||
|
UserArray = Get_Property(@Window:'.EDT_LSL_USERS', 'ARRAY')
|
||||||
|
UserIds = UserArray<1>
|
||||||
|
NotifyRec<NOTIFICATION_USER_ID$> = UserIds
|
||||||
|
GroupArray = Get_Property(@Window:'.EDT_AD_GROUPS', 'ARRAY')
|
||||||
|
GroupIds = GroupArray<1>
|
||||||
|
NotifyRec<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$> = GroupIds
|
||||||
|
NotifyRec<NOTIFICATION_USE_ACTIVE_DIRECTORY$> = Get_Property(@Window:'.CHK_USE_AD', 'DEFPROP')
|
||||||
|
NotifyRec<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$> = Get_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP')
|
||||||
|
Database_Services('WriteDataRow', 'NOTIFICATION', Key, NotifyRec, True$, False$, True$)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
GoSub UnlockRec
|
||||||
|
Post_Event(@Window, 'CLEAR')
|
||||||
|
end else
|
||||||
|
Msg(@Window, '', 'OK', '', 'Error':@FM:Error_Services('GetMessage'))
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event WINDOW.CLOSE(CancelFlag, CloseFlags)
|
||||||
|
|
||||||
|
GoSub UnlockRec
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_SAVE.CLICK()
|
||||||
|
|
||||||
|
Post_Event(@Window, 'WRITE')
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_CLEAR.CLICK()
|
||||||
|
|
||||||
|
GoSub UnlockRec
|
||||||
|
Post_Event(@Window, 'CLEAR')
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_LU_ID.CLICK()
|
||||||
|
|
||||||
|
TypeOver = ''
|
||||||
|
TypeOver<PSELECT$> = 1
|
||||||
|
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
|
||||||
|
IF NotifyID NE '' THEN
|
||||||
|
Set_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT', NotifyID)
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event EDT_LSL_USERS.ROWSELCHANGED(SelRow, SelState)
|
||||||
|
|
||||||
|
GoSub EnableControls
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event EDT_AD_GROUPS.ROWSELCHANGED(SelRow, SelState)
|
||||||
|
|
||||||
|
GoSub EnableControls
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event EDL_NOTIFICATION_ID.CHANGED(NewData)
|
||||||
|
|
||||||
|
If NewData NE '' then
|
||||||
|
GoSub UnlockRec
|
||||||
|
Post_Event(@Window, 'READ')
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event EDL_NOTIFICATION_ID.LOSTFOCUS(Flag, FocusID)
|
||||||
|
|
||||||
|
If Flag EQ 1 then
|
||||||
|
GoSub UnlockRec
|
||||||
|
Post_Event(@Window, 'READ')
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_ADD_USERS.CLICK()
|
||||||
|
|
||||||
|
CurrUserIDs = Get_Property(@Window:'.EDT_LSL_USERS','ARRAY')<1>
|
||||||
|
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
|
||||||
|
|
||||||
|
LSLNames = Xlate('LSL_USERS', CurrUserIDs, 'FIRST_LAST', 'X')
|
||||||
|
NewArray = CurrUserIDs : @FM : LSLNames
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', NewArray)
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_REM_USERS.CLICK()
|
||||||
|
|
||||||
|
SelRows = Get_Property(@Window:'.EDT_LSL_USERS', 'SELPOS')
|
||||||
|
SelRows = SelRows<2>
|
||||||
|
SelData = ''
|
||||||
|
NewList = ''
|
||||||
|
If SelRows NE '' then
|
||||||
|
DataList = Get_Property(@Window:'.EDT_LSL_USERS', 'LIST')
|
||||||
|
For each Row in DataList using @FM setting RowIndex
|
||||||
|
If Not(InList(SelRows, RowIndex, @VM)) then NewList<-1> = Row
|
||||||
|
Next Row
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'LIST', NewList)
|
||||||
|
GoSub EnableControls
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_ADD_GROUPS.CLICK()
|
||||||
|
|
||||||
|
GroupArray = Get_Property(@Window:'.EDT_AD_GROUPS', 'ARRAY')
|
||||||
|
GroupIds = GroupArray<1>
|
||||||
|
SelGroups = Dialog_Box('NDW_ACTIVE_DIRECTORY_GROUPS', @Window, GroupIds)
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', SelGroups)
|
||||||
|
|
||||||
|
Def = ""
|
||||||
|
Def<MCOL$> = -2
|
||||||
|
Def<MROW$> = -2
|
||||||
|
Def<MTEXT$> = "Updating LSL user list..."
|
||||||
|
Def<MTYPE$> = "U"
|
||||||
|
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||||
|
|
||||||
|
GroupArray = Get_Property(@Window:'.EDT_AD_GROUPS', 'ARRAY')
|
||||||
|
GroupIds = GroupArray<1>
|
||||||
|
|
||||||
|
If GroupIds NE '' then
|
||||||
|
LSLUserNames = ''
|
||||||
|
LSLNames = ''
|
||||||
|
For each GroupId in GroupIds using @VM
|
||||||
|
MemberList = Active_Directory_Services('GetADGroupMembersByGroupName', GroupId, 'INFINEON')
|
||||||
|
MemberList = SRP_Array('Rotate', MemberList, @FM, @VM)
|
||||||
|
ADUserNames = MemberList<1>
|
||||||
|
|
||||||
|
Open 'DICT.LSL_USERS' to hDict then
|
||||||
|
For each ADUserName in ADUserNames using @VM setting vPos
|
||||||
|
Query = 'DOMAIN_USERNAME':@VM:ADUserName:@FM
|
||||||
|
Flag = ''
|
||||||
|
LSLUsername = ''
|
||||||
|
Btree.Extract(Query, 'LSL_USERS', hDict, LSLUsername, '', Flag)
|
||||||
|
If LSLUsername NE '' then LSLUsernames<0, -1> = LSLUsername<0, 1>
|
||||||
|
Next ADUserName
|
||||||
|
end
|
||||||
|
Next GroupId
|
||||||
|
If LSLUsernames NE '' then
|
||||||
|
LSLNames = Xlate('LSL_USERS', LSLUserNames, 'FIRST_LAST', 'X')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Array = LSLUsernames : @FM : LSLNames
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', Array)
|
||||||
|
|
||||||
|
Msg(@window, MsgUp) ;* take down the processing message
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event PUB_REM_GROUPS.CLICK()
|
||||||
|
|
||||||
|
SelRows = Get_Property(@Window:'.EDT_AD_GROUPS', 'SELPOS')
|
||||||
|
SelRows = SelRows<2>
|
||||||
|
SelData = ''
|
||||||
|
NewList = ''
|
||||||
|
If SelRows NE '' then
|
||||||
|
DataList = Get_Property(@Window:'.EDT_AD_GROUPS', 'LIST')
|
||||||
|
For each Row in DataList using @FM setting RowIndex
|
||||||
|
If Not(InList(SelRows, RowIndex, @VM)) then NewList<-1> = Row
|
||||||
|
Next Row
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', NewList)
|
||||||
|
GoSub EnableControls
|
||||||
|
end
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
Event CHK_USE_AD.CLICK()
|
||||||
|
|
||||||
|
GoSub EnableControls
|
||||||
|
|
||||||
|
end event
|
||||||
|
|
||||||
|
|
||||||
|
EnableControls:
|
||||||
|
|
||||||
|
NotifyID = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
|
||||||
|
UseAD = Get_Property(@Window:'.CHK_USE_AD', 'DEFPROP')
|
||||||
|
|
||||||
|
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', (NotifyID NE ''))
|
||||||
|
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', (NotifyID NE ''))
|
||||||
|
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', (NotifyID NE ''))
|
||||||
|
|
||||||
|
If UseAD NE True$ then Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP', False$)
|
||||||
|
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'ENABLED', UseAD)
|
||||||
|
|
||||||
|
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', (UseAD NE True$))
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', (NotifyID NE ''))
|
||||||
|
|
||||||
|
If NotifyID NE '' then
|
||||||
|
Backcolor = WHITE$
|
||||||
|
end else
|
||||||
|
Backcolor = GREY$
|
||||||
|
end
|
||||||
|
|
||||||
|
Set_Property(@Window:'.EDT_LSL_USERS', 'BACKCOLOR', Backcolor)
|
||||||
|
|
||||||
|
Set_Property(@Window:'.GRB_AD_GROUPS', 'ENABLED', (UseAD EQ True$))
|
||||||
|
Set_Property(@Window:'.PUB_ADD_GROUPS', 'ENABLED', (UseAD EQ True$))
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'ENABLED', (UseAD EQ True$))
|
||||||
|
|
||||||
|
If ( (NotifyID NE '') and (UseAD EQ True$) ) then
|
||||||
|
Backcolor = WHITE$
|
||||||
|
end else
|
||||||
|
Backcolor = GREY$
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.EDT_AD_GROUPS', 'BACKCOLOR', Backcolor)
|
||||||
|
|
||||||
|
DelBtnEnabled = False$
|
||||||
|
SelRows = Get_Property(@Window:'.EDT_LSL_USERS', 'SELPOS')
|
||||||
|
SelRows = SelRows<2>
|
||||||
|
SelData = ''
|
||||||
|
If SelRows NE '' then
|
||||||
|
Data = Get_Property(@Window:'.EDT_LSL_USERS', 'LIST')
|
||||||
|
Convert @VM to '' in Data
|
||||||
|
For each Row in SelRows using @VM
|
||||||
|
If Data<Row> NE '' then
|
||||||
|
SelData<-1> = Data<Row>
|
||||||
|
end
|
||||||
|
Next Row
|
||||||
|
If (SelData NE '') and (UseAD NE True$) then DelBtnEnabled = True$
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.PUB_REM_USERS', 'ENABLED', DelBtnEnabled)
|
||||||
|
|
||||||
|
DelBtnEnabled = False$
|
||||||
|
SelRows = Get_Property(@Window:'.EDT_AD_GROUPS', 'SELPOS')
|
||||||
|
SelRows = SelRows<2>
|
||||||
|
SelData = ''
|
||||||
|
If SelRows NE '' then
|
||||||
|
Data = Get_Property(@Window:'.EDT_AD_GROUPS', 'LIST')
|
||||||
|
Convert @VM to '' in Data
|
||||||
|
For each Row in SelRows using @VM
|
||||||
|
If Data<Row> NE '' then
|
||||||
|
SelData<-1> = Data<Row>
|
||||||
|
end
|
||||||
|
Next Row
|
||||||
|
If (SelData NE '') and (UseAD EQ True$) then DelBtnEnabled = True$
|
||||||
|
end
|
||||||
|
Set_Property(@Window:'.PUB_REM_GROUPS', 'ENABLED', DelBtnEnabled)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
UnlockRec:
|
||||||
|
|
||||||
|
Key = Get_Property(@Window, '@LOCK_KEY')
|
||||||
|
If Key NE '' then
|
||||||
|
HaveLock = Get_Property(@Window, '@HAVE_LOCK')
|
||||||
|
If HaveLock then
|
||||||
|
Database_Services('ReleaseKeyIDLock', 'NOTIFICATION', Key)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
|
@ -67,7 +67,7 @@ OnClick.HYP_FIND:
|
|||||||
Case Field EQ "WO" ; Field = "WO_NO2"
|
Case Field EQ "WO" ; Field = "WO_NO2"
|
||||||
Case Field EQ "PSN" ; Field = "PSN_NO"
|
Case Field EQ "PSN" ; Field = "PSN_NO"
|
||||||
End Case
|
End Case
|
||||||
Update_Index(Table, Field, No$)
|
Update_Index(Table, Field, No$, Yes$)
|
||||||
Extract_SI_Keys(Table, Field, Find, Keys)
|
Extract_SI_Keys(Table, Field, Find, Keys)
|
||||||
rv = Xlate(Table, Keys, "REACT_NO", "X") :@FM: Xlate(Table, Keys, "WO_NO", "X") :@FM: Keys
|
rv = Xlate(Table, Keys, "REACT_NO", "X") :@FM: Xlate(Table, Keys, "WO_NO", "X") :@FM: Keys
|
||||||
Appts = "";!!
|
Appts = "";!!
|
||||||
@ -109,3 +109,4 @@ Window.CREATE:
|
|||||||
|
|
||||||
SRP_Redirect_OLE_Events()
|
SRP_Redirect_OLE_Events()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1,15 +1,80 @@
|
|||||||
Compile function Notes_Services(@Service, @Params)
|
Compile function Notes_Services(@Service, @Params)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
|
||||||
Declare function Database_Services,obj_Notes_Sent, Get_Status, Error_Services, Obj_Tables, Datetime, SRP_Datetime
|
Name : RDS_Services
|
||||||
Declare subroutine Obj_Tables, Obj_Notes_Sent, Update_Index, Errmsg, Database_Services, Btree.Extract, Error_Services
|
|
||||||
Declare subroutine Notes_Services
|
Description : Handler program for all RDS services.
|
||||||
|
|
||||||
|
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||||
|
assumptions built into way errors are managed which are important to understand in order to properly
|
||||||
|
work with Error Services:
|
||||||
|
|
||||||
|
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||||
|
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||||
|
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||||
|
list and the current routine appears at the top of the list. We are using this orientation because
|
||||||
|
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||||
|
|
||||||
|
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||||
|
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||||
|
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||||
|
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||||
|
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||||
|
originating procedure is waiting.
|
||||||
|
|
||||||
|
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||||
|
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||||
|
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||||
|
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||||
|
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||||
|
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||||
|
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||||
|
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||||
|
|
||||||
|
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||||
|
error conditions that were set before.
|
||||||
|
|
||||||
|
Parameters :
|
||||||
|
Service [in] -- Name of the service being requested
|
||||||
|
Param1-10 [in/out] -- Additional request parameter holders
|
||||||
|
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||||
|
|
||||||
|
Metadata :
|
||||||
|
|
||||||
|
History : (Date, Initials, Notes)
|
||||||
|
10/16/24 djs Added service to process notes queue.
|
||||||
|
|
||||||
|
***********************************************************************************************************************/
|
||||||
#pragma precomp SRP_PreCompiler
|
#pragma precomp SRP_PreCompiler
|
||||||
|
|
||||||
$insert LOGICAL
|
$Insert SERVICE_SETUP
|
||||||
$insert NOTE_PTRS_EQU
|
$Insert LOGICAL
|
||||||
$insert MSG_EQUATES
|
$Insert NOTE_PTRS_EQUATES
|
||||||
$Insert NOTES_EQU
|
$Insert MSG_EQUATES
|
||||||
*$Insert NOTES_EQUATES
|
$Insert NOTES_EQUATES
|
||||||
|
$Insert LSL_USERS_EQUATES
|
||||||
|
$Insert EMAIL_BOX_EQUATES
|
||||||
|
$Insert NOTES_QUEUE_EQUATES
|
||||||
|
$Insert NOTIFICATION_EQUATES
|
||||||
|
|
||||||
|
Declare function Database_Services, obj_Notes_Sent, Get_Status, Error_Services, Obj_Tables, Datetime, SRP_Datetime
|
||||||
|
Declare function SRP_Array, Environment_Services, Logging_Services, RTI_CreateGuid, LSL_Users_Services
|
||||||
|
Declare subroutine Obj_Tables, Obj_Notes_Sent, Update_Index, Errmsg, Database_Services, Btree.Extract, Error_Services
|
||||||
|
Declare subroutine Notes_Services, Logging_Services
|
||||||
|
|
||||||
|
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\NOTES'
|
||||||
|
LogDate = Oconv(Date(), 'D4/')
|
||||||
|
LogTime = Oconv(Time(), 'MTS')
|
||||||
|
|
||||||
|
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Notes Queue Processing Log.csv'
|
||||||
|
Headers = 'Logging DTM' : @FM : 'Notes Queue ID' : @FM : 'Notes'
|
||||||
|
objNotesQProcLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||||
|
|
||||||
|
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Notes Queue Log.csv'
|
||||||
|
Headers = 'Logging DTM' : @FM : 'Notes Queue ID' : @FM : 'Notes'
|
||||||
|
objNotesQueueLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||||
|
|
||||||
|
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||||
|
|
||||||
GoToService
|
GoToService
|
||||||
|
|
||||||
@ -20,6 +85,7 @@ Return Response or ""
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
Service SnoozeNewMessageNotifications(UserID)
|
Service SnoozeNewMessageNotifications(UserID)
|
||||||
|
|
||||||
Open 'NOTE_PTRS' to hTable then
|
Open 'NOTE_PTRS' to hTable then
|
||||||
SnoozeTime = Datetime()
|
SnoozeTime = Datetime()
|
||||||
WriteV SnoozeTime to hTable, UserID, NOTE_PTRS_SNOOZE$ else
|
WriteV SnoozeTime to hTable, UserID, NOTE_PTRS_SNOOZE$ else
|
||||||
@ -31,7 +97,9 @@ Service SnoozeNewMessageNotifications(UserID)
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service AllowNewMessageNotifications(UserID)
|
Service AllowNewMessageNotifications(UserID)
|
||||||
|
|
||||||
Open 'NOTE_PTRS' to hTable then
|
Open 'NOTE_PTRS' to hTable then
|
||||||
SnoozeTime = ''
|
SnoozeTime = ''
|
||||||
WriteV SnoozeTime to hTable, UserID, NOTE_PTRS_SNOOZE$ else
|
WriteV SnoozeTime to hTable, UserID, NOTE_PTRS_SNOOZE$ else
|
||||||
@ -43,6 +111,7 @@ Service AllowNewMessageNotifications(UserID)
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service CheckForNotificationSnooze(UserID)
|
Service CheckForNotificationSnooze(UserID)
|
||||||
|
|
||||||
SnoozeRow = ''
|
SnoozeRow = ''
|
||||||
@ -62,8 +131,9 @@ Service CheckForNotificationSnooze(UserID)
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetInboxMessages(UserID)
|
Service GetInboxMessages(UserID)
|
||||||
//debug
|
|
||||||
InboxList = ''
|
InboxList = ''
|
||||||
UserRec = Database_Services('ReadDataRow','NOTE_PTRS', @USER4, '', '', '')
|
UserRec = Database_Services('ReadDataRow','NOTE_PTRS', @USER4, '', '', '')
|
||||||
MessageCount = Dcount(UserRec<1>, @VM)
|
MessageCount = Dcount(UserRec<1>, @VM)
|
||||||
@ -80,10 +150,12 @@ Service GetInboxMessages(UserID)
|
|||||||
end
|
end
|
||||||
Next index
|
Next index
|
||||||
Response = InboxList
|
Response = InboxList
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetArchivedMessages(UserID)
|
Service GetArchivedMessages(UserID)
|
||||||
//debug
|
|
||||||
ArchiveList = ''
|
ArchiveList = ''
|
||||||
UserRec = Database_Services('ReadDataRow','NOTE_PTRS', @USER4, '', '', '')
|
UserRec = Database_Services('ReadDataRow','NOTE_PTRS', @USER4, '', '', '')
|
||||||
MessageCount = Dcount(UserRec<1>, @VM)
|
MessageCount = Dcount(UserRec<1>, @VM)
|
||||||
@ -100,21 +172,17 @@ Service GetArchivedMessages(UserID)
|
|||||||
end
|
end
|
||||||
Next index
|
Next index
|
||||||
Response = ArchiveList
|
Response = ArchiveList
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service UpdateNotes(UserID)
|
Service UpdateNotes(UserID)
|
||||||
ErrorMsg = ''
|
|
||||||
IF UserID = '' THEN ErrorMsg = 'Unassigned Parameter "UserID" passed to object. (':Method:')'
|
|
||||||
|
|
||||||
|
ErrorMsg = ''
|
||||||
IF ErrorMsg NE '' THEN RETURN
|
IF UserID NE '' then
|
||||||
|
NPRec = Database_Services('ReadDataRow', 'NOTE_PTRS', UserID)
|
||||||
//OtParms = 'NOTE_PTRS':@RM:UserID
|
If Error_Services('NoError') then
|
||||||
|
IF LEN(NPRec) > 60000 THEN
|
||||||
//NPRec = obj_Tables('ReadRec',OtParms) ;* If not found then returns null, otherwise reads and sets the lock
|
|
||||||
NPRec = Database_Services('ReadDataRow', 'NOTE_PTRS', UserID)
|
|
||||||
|
|
||||||
IF LEN(NPRec) > 60000 THEN
|
|
||||||
* Dump the oldest note pointers
|
* Dump the oldest note pointers
|
||||||
PtrCnt = COUNT(NPRec<note_ptrs_from$>, @vm) + (NPRec<note_ptrs_from$> NE '')
|
PtrCnt = COUNT(NPRec<note_ptrs_from$>, @vm) + (NPRec<note_ptrs_from$> NE '')
|
||||||
FOR N = PtrCnt TO (PtrCnt - 100) STEP -1
|
FOR N = PtrCnt TO (PtrCnt - 100) STEP -1
|
||||||
@ -128,11 +196,11 @@ IF LEN(NPRec) > 60000 THEN
|
|||||||
NPRec = Delete(NPRec, note_ptrs_archived$, N, 0)
|
NPRec = Delete(NPRec, note_ptrs_archived$, N, 0)
|
||||||
NEXT N
|
NEXT N
|
||||||
TLen = LEN(NPRec)
|
TLen = LEN(NPRec)
|
||||||
END
|
END
|
||||||
|
|
||||||
NotesSentKeys = obj_Notes_Sent('GetUserKeys',UserID)
|
NotesSentKeys = obj_Notes_Sent('GetUserKeys',UserID)
|
||||||
|
|
||||||
IF NotesSentKeys NE '' THEN
|
IF NotesSentKeys NE '' THEN
|
||||||
FOR I = 1 TO COUNT(NotesSentKeys,@VM) + (NotesSentKeys NE '')
|
FOR I = 1 TO COUNT(NotesSentKeys,@VM) + (NotesSentKeys NE '')
|
||||||
|
|
||||||
NotesSentKey = NotesSentKeys<1,I>
|
NotesSentKey = NotesSentKeys<1,I>
|
||||||
@ -171,19 +239,26 @@ IF NotesSentKeys NE '' THEN
|
|||||||
Database_Services('WriteDataRow', 'NOTE_PTRS', UserID, NPRec, True$, False$, True$)
|
Database_Services('WriteDataRow', 'NOTE_PTRS', UserID, NPRec, True$, False$, True$)
|
||||||
NEXT I
|
NEXT I
|
||||||
IF Get_Status(errCode) THEN
|
IF Get_Status(errCode) THEN
|
||||||
ErrMsg(errCode)
|
ErrorMsg = 'Error in service: ':Service:'. Error code: ':errCode
|
||||||
END ELSE
|
END ELSE
|
||||||
obj_Notes_Sent('Delete',NotesSentKeys)
|
obj_Notes_Sent('Delete',NotesSentKeys)
|
||||||
|
Update_Index('NOTES_SENT','USER_ID', False$, True$)
|
||||||
Update_Index('NOTES_SENT','USER_ID','')
|
|
||||||
END
|
END
|
||||||
END ELSE
|
END
|
||||||
//obj_Tables('UnlockRec',OtParms)
|
end else
|
||||||
END
|
ErrorMsg = Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMsg = 'Error in service: ':Service:'. Unassigned Parameter "UserID" passed into service.'
|
||||||
|
end
|
||||||
|
|
||||||
|
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetUnreadMessageCount(UserID)
|
Service GetUnreadMessageCount(UserID)
|
||||||
|
|
||||||
unreadMessageCount = 0
|
unreadMessageCount = 0
|
||||||
IF UserID NE '' then
|
IF UserID NE '' then
|
||||||
if xlate( 'NOTE_PTRS', @user4, 'NEW_MESSAGES', 'X' ) then
|
if xlate( 'NOTE_PTRS', @user4, 'NEW_MESSAGES', 'X' ) then
|
||||||
@ -197,9 +272,12 @@ Service GetUnreadMessageCount(UserID)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
Response = unreadMessageCount
|
Response = unreadMessageCount
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetNewMessages(UserId)
|
Service GetNewMessages(UserId)
|
||||||
|
|
||||||
NotesSentKeys = ''
|
NotesSentKeys = ''
|
||||||
IF UserId NE '' THEN
|
IF UserId NE '' THEN
|
||||||
|
|
||||||
@ -214,9 +292,12 @@ Service GetNewMessages(UserId)
|
|||||||
END
|
END
|
||||||
end
|
end
|
||||||
Response = NotesSentKeys
|
Response = NotesSentKeys
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service MarkAllAsRead(UserId)
|
Service MarkAllAsRead(UserId)
|
||||||
|
|
||||||
if UserID NE '' then
|
if UserID NE '' then
|
||||||
NotePtrsRec = Database_Services('ReadDataRow', 'NOTE_PTRS', UserId)
|
NotePtrsRec = Database_Services('ReadDataRow', 'NOTE_PTRS', UserId)
|
||||||
NotePtrsStatus = NotePtrsRec<NOTE_PTRS_NEW$>
|
NotePtrsStatus = NotePtrsRec<NOTE_PTRS_NEW$>
|
||||||
@ -230,12 +311,240 @@ Service MarkAllAsRead(UserId)
|
|||||||
end else
|
end else
|
||||||
Error_Services('Set', 'Error in Notes Service, MarkAllAsRead. UserId parameter not supplied')
|
Error_Services('Set', 'Error in Notes Service, MarkAllAsRead. UserId parameter not supplied')
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
Service SendNotes()
|
||||||
|
|
||||||
|
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||||
|
Lock hSysLists, ServiceKeyID then
|
||||||
|
ErrorMsg = ''
|
||||||
|
Open 'NOTES_QUEUE' to hNotesQueue then
|
||||||
|
Select hNotesQueue
|
||||||
|
EOF = False$
|
||||||
|
Loop
|
||||||
|
ReadNext NotesQueueId else EOF = True$
|
||||||
|
Until EOF
|
||||||
|
// Send NOTES record
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Being processing NOTES_QUEUE record, "':NotesQueueID:'".'
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
|
||||||
|
DeleteRec = False$
|
||||||
|
Read NotesQueueRec from hNotesQueue, NotesQueueId then
|
||||||
|
NotesId = NotesQueueRec<NOTES_QUEUE.NOTES_ID$>
|
||||||
|
If NotesId NE '' then
|
||||||
|
NotesRec = Database_Services('ReadDataRow', 'NOTES', NotesId)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
If NotesRec NE '' then
|
||||||
|
DeleteRec = True$
|
||||||
|
|
||||||
|
Recipients = NotesRec<NOTES_SEND_TO$>
|
||||||
|
SentFrom = NotesRec<NOTES_FROM$>
|
||||||
|
Subject = NotesRec<NOTES_SUBJECT$>
|
||||||
|
Message = NotesRec<NOTES_MESSAGE$>
|
||||||
|
AttachWindow = NotesRec<NOTES_ATTACH_WINDOW$>
|
||||||
|
AttachKeys = NotesRec<NOTES_ATTACH_KEYS$>
|
||||||
|
SendToGroup = NotesRec<NOTES_MSG_GROUPS_IDS$>
|
||||||
|
|
||||||
|
GroupRecipients = ''
|
||||||
|
|
||||||
|
If SendToGroup NE '' then
|
||||||
|
NotifyGroupRecipients = ''
|
||||||
|
SecGroupRecipients = ''
|
||||||
|
For each GroupID in SendToGroup using @VM
|
||||||
|
If RowExists('NOTIFICATION', GroupID) then
|
||||||
|
GroupRec = Database_Services('ReadDataRow', 'NOTIFICATION', GroupID)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
GroupUsers = GroupRec<NOTIFICATION_USER_ID$>
|
||||||
|
LimitToOnShift = GroupRec<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$>
|
||||||
|
If LimitToOnShift then
|
||||||
|
UsersOnShift = LSL_Users_Services('GetOnShiftUsers')
|
||||||
|
NotifyGroupRecipients = SRP_Array('Join', GroupUsers, UsersOnShift, 'AND', @VM)
|
||||||
|
end else
|
||||||
|
NotifyGroupRecipients = GroupUsers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
If RowExists('SEC_GROUPS', GroupID) then
|
||||||
|
! Todo: Add SEC_GROUPS support
|
||||||
|
end
|
||||||
|
GroupRecipients = SRP_Array('Join', NotifyGroupRecipients, GroupRecipients, 'OR', @VM)
|
||||||
|
GroupRecipients = SRP_Array('Join', SecGroupRecipients, GroupRecipients, 'OR', @VM)
|
||||||
|
Next GroupID
|
||||||
|
end
|
||||||
|
|
||||||
|
thisRecipients = ''
|
||||||
|
RecipCnt = 0
|
||||||
|
Recipients = SRP_Array('Join', GroupRecipients, Recipients, 'OR', @VM)
|
||||||
|
thisRecipients = SRP_Array('Clean', Recipients, 'TrimAndMakeUnique', @VM)
|
||||||
|
RecipCnt = DCount(thisRecipients, @VM)
|
||||||
|
|
||||||
|
// Previous logic from obj_Notes
|
||||||
|
CurrDTM = OConv(Date(),'D4/'):' ':OConv(Time(),'MTHS')
|
||||||
|
|
||||||
|
RecipientsText = thisRecipients
|
||||||
|
|
||||||
|
SWAP @VM WITH ', ' IN RecipientsText
|
||||||
|
|
||||||
|
FOR RecipIndex = 1 TO RecipCnt
|
||||||
|
|
||||||
|
thisRecipient = thisRecipients<1, RecipIndex>
|
||||||
|
|
||||||
|
obj_Notes_Sent('Create',thisRecipient:@RM:NotesId:@RM:CurrDTM) ;* Add to Notes Sent buffer table
|
||||||
|
|
||||||
|
UserRec = XLATE('LSL_USERS',thisRecipient,'','X')
|
||||||
|
FwdFlag = UserRec<LSL_USERS_FWD_EMAIL$>
|
||||||
|
eMailAddr = UserRec<LSL_USERS_EMAIL$>
|
||||||
|
|
||||||
|
IF FwdFlag = 1 AND eMailAddr NE '' THEN
|
||||||
|
|
||||||
|
Text = ''
|
||||||
|
Text<-1> = 'OI eMail From: ':OCONV(SentFrom,'[XLATE_CONV,LSL_USERS*FIRST_LAST]'):' at ':CurrDTM
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Recipients: ':RecipientsText
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Subject: ':Subject
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Message: '
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = Message
|
||||||
|
Text<-1> = ''
|
||||||
|
|
||||||
|
IF AttachWindow NE '' THEN
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Attached Window: ':AttachWindow
|
||||||
|
END
|
||||||
|
|
||||||
|
IF AttachKeys NE '' THEN
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Record Key: ':AttachKeys
|
||||||
|
END
|
||||||
|
|
||||||
|
IF SendToGroup NE '' THEN
|
||||||
|
Text<-1> = ''
|
||||||
|
Text<-1> = 'Sent to Group: ':SendToGroup
|
||||||
|
END
|
||||||
|
|
||||||
|
HeaderText = Text<1>
|
||||||
|
|
||||||
|
CONVERT \00\ TO ',' IN Text
|
||||||
|
SWAP @VM WITH ':@VM:' IN Text
|
||||||
|
SWAP @FM WITH CHAR(13):CHAR(10) IN Text
|
||||||
|
SWAP @TM WITH CHAR(13):CHAR(10) IN Text
|
||||||
|
|
||||||
|
eMailBoxKey = NotesId:'*':thisRecipient
|
||||||
|
|
||||||
|
eMailBoxRec = ''
|
||||||
|
eMailBoxRec<EMAIL_BOX_EMAIL_ADDR$> = eMailAddr
|
||||||
|
eMailBoxRec<EMAIL_BOX_EMAIL_TEXT$> = Text
|
||||||
|
eMailBoxRec<EMAIL_BOX_EMAIL_HEADER$> = HeaderText
|
||||||
|
eMailBoxRec<EMAIL_BOX_FROM_USER$> = SentFrom
|
||||||
|
|
||||||
|
ebParms = 'EMAIL_BOX':@RM:eMailBoxKey:@RM:@RM:eMailBoxRec
|
||||||
|
obj_Tables('WriteRec',ebParms)
|
||||||
|
|
||||||
|
END ;* End of check for forwarding flag
|
||||||
|
|
||||||
|
Next RecipIndex
|
||||||
|
end else
|
||||||
|
// Log this condition, but delete record since we have nothing to send.
|
||||||
|
DeleteRec = True$
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Error in ':Service:' service. Failed to send Note due to null NOTES record, "':NotesId:'", read in.'
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Error in ':Service:' service. Failed to read NOTES record, "':NotesId:'". Error message: ':Error_Services('GetMessage')
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
// Log this condition, but delete record since we have nothing to send.
|
||||||
|
DeleteRec = True$
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Error in ':Service:' service. Null NotesId in NOTES_QUEUE record, "':NotesQueueId:'".'
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Error in ':Service:' service. Error reading NOTES_QUEUE record, "':NotesQueueId:'". File error: ':@File.Error
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
If DeleteRec then
|
||||||
|
Database_Services('DeleteDataRow', 'NOTES_QUEUE', NotesQueueId, True$, False$)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Successfuly deleted NOTES_QUEUE record, "':NotesQueueID:'".'
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Repeat
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesQueueId
|
||||||
|
LogData<3> = 'Error in ':Service:' service. Failed to open NOTES_QUEUE table.'
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
Unlock hSysLists, ServiceKeyID else Null
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
Service AddToQueue(NotesId)
|
||||||
|
|
||||||
|
If NotesId NE '' then
|
||||||
|
If RowExists('NOTES', NotesId) then
|
||||||
|
QueueId = RTI_CreateGuid()
|
||||||
|
If QueueId NE '' then
|
||||||
|
QueueRec = NotesId
|
||||||
|
Database_Services('WriteDataRow', 'NOTES_QUEUE', QueueId, QueueRec)
|
||||||
|
If Error_Services('HasError') then
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesId
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. Failed to write NOTES_QUEUE record, "':QueueID:'", for NOTES record, "':NotesId:'".'
|
||||||
|
ErrorMsg := 'Error message: ':Error_Services('GetMessage')
|
||||||
|
LogData<3> = ErrorMsg
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesId
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. Failed to genereate NOTES_QUEUE Id for NOTES record, "':NotesId:'".'
|
||||||
|
LogData<3> = ErrorMsg
|
||||||
|
Logging_Services('AppendLog', objNotesQProcLog, LogData, @RM, @FM)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesId
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. NOTES record, "':NotesId:'", does not exist!.'
|
||||||
|
LogData<3> = ErrorMsg
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDtm
|
||||||
|
LogData<2> = NotesId
|
||||||
|
ErrorMsg = 'Error in ':Service:' service. Null NOTES Id passed into service.'
|
||||||
|
LogData<3> = ErrorMsg
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ COMPILE FUNCTION Note_Message(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event, RList
|
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event, RList
|
||||||
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow
|
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Notes_Services
|
||||||
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note, obj_Notes_Sent
|
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note, obj_Notes_Sent
|
||||||
|
|
||||||
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, Admin_User, Printer_Select, obj_Notes
|
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, Admin_User, Printer_Select, obj_Notes
|
||||||
@ -41,9 +41,6 @@ BEGIN CASE
|
|||||||
CASE Event = 'CLOSE' ; GOSUB Close
|
CASE Event = 'CLOSE' ; GOSUB Close
|
||||||
CASE Event = 'READ' ; GOSUB Read
|
CASE Event = 'READ' ; GOSUB Read
|
||||||
CASE Event = 'WRITE' ; GOSUB Write
|
CASE Event = 'WRITE' ; GOSUB Write
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
END CASE
|
END CASE
|
||||||
|
|
||||||
CASE EntID = @WINDOW:'.YOUR_GROUPS' AND Event = 'CLICK' ; GOSUB YourGroupsClick
|
CASE EntID = @WINDOW:'.YOUR_GROUPS' AND Event = 'CLICK' ; GOSUB YourGroupsClick
|
||||||
@ -70,14 +67,13 @@ END
|
|||||||
RETURN Result
|
RETURN Result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Create:
|
Create:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
obj_Appwindow('Create',@WINDOW)
|
obj_Appwindow('Create',@WINDOW)
|
||||||
|
|
||||||
IF Parm1 NE '' THEN
|
IF Parm1 NE '' THEN
|
||||||
AttachWindow = Parm1[1,@FM]
|
AttachWindow = Parm1[1,@FM]
|
||||||
AttachKey = Parm1[COL2()+1,@FM]
|
AttachKey = Parm1[COL2()+1,@FM]
|
||||||
|
|
||||||
@ -85,9 +81,9 @@ IF Parm1 NE '' THEN
|
|||||||
Set_Property(@WINDOW,'@ATTACH_WINDOW',AttachWindow)
|
Set_Property(@WINDOW,'@ATTACH_WINDOW',AttachWindow)
|
||||||
Set_Property(@WINDOW,'@ATTACH_KEY',AttachKey)
|
Set_Property(@WINDOW,'@ATTACH_KEY',AttachKey)
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -96,55 +92,54 @@ RETURN
|
|||||||
Close:
|
Close:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
End_Dialog(@WINDOW,'')
|
End_Dialog(@WINDOW,'')
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Refresh:
|
Refresh:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
IF MemberOf(@USER4,'OI_ADMIN') THEN
|
IF MemberOf(@USER4,'OI_ADMIN') THEN
|
||||||
Set_Property(@WINDOW:'.SEQ','VISIBLE',1)
|
Set_Property(@WINDOW:'.SEQ','VISIBLE',1)
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.SEQ','VISIBLE',0)
|
Set_Property(@WINDOW:'.SEQ','VISIBLE',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
IF Get_Property(@WINDOW:'.ENTRY_ID','DEFPROP') = '' THEN
|
IF Get_Property(@WINDOW:'.ENTRY_ID','DEFPROP') = '' THEN
|
||||||
Set_Property(@WINDOW:'.ENTRY_ID','ENABLED',1)
|
Set_Property(@WINDOW:'.ENTRY_ID','ENABLED',1)
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.ENTRY_ID','ENABLED',0)
|
Set_Property(@WINDOW:'.ENTRY_ID','ENABLED',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
IF Get_Property(@WINDOW:'.ENTRY_DATE','DEFPROP') = '' THEN
|
IF Get_Property(@WINDOW:'.ENTRY_DATE','DEFPROP') = '' THEN
|
||||||
Set_Property(@WINDOW:'.ENTRY_DATE','ENABLED',1)
|
Set_Property(@WINDOW:'.ENTRY_DATE','ENABLED',1)
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.ENTRY_DATE','ENABLED',0)
|
Set_Property(@WINDOW:'.ENTRY_DATE','ENABLED',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
IF Get_Property(@WINDOW:'.ENTRY_TIME','DEFPROP') = '' THEN
|
IF Get_Property(@WINDOW:'.ENTRY_TIME','DEFPROP') = '' THEN
|
||||||
Set_Property(@WINDOW:'.ENTRY_TIME','ENABLED',1)
|
Set_Property(@WINDOW:'.ENTRY_TIME','ENABLED',1)
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.ENTRY_TIME','ENABLED',0)
|
Set_Property(@WINDOW:'.ENTRY_TIME','ENABLED',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
AttachWindow = Get_Property(@WINDOW:'.ATTACH_WINDOW','DEFPROP')
|
AttachWindow = Get_Property(@WINDOW:'.ATTACH_WINDOW','DEFPROP')
|
||||||
IF AttachWindow NE '' THEN
|
IF AttachWindow NE '' THEN
|
||||||
Set_Property(@WINDOW:'.ATTACH_GROUP','ENABLED',1)
|
Set_Property(@WINDOW:'.ATTACH_GROUP','ENABLED',1)
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.ATTACH_GROUP','ENABLED',0)
|
Set_Property(@WINDOW:'.ATTACH_GROUP','ENABLED',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
* Turn edit table symbolic column backgrounds to green
|
* Turn edit table symbolic column backgrounds to green
|
||||||
|
|
||||||
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
|
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
|
||||||
|
|
||||||
ETCtrls = ETSymbolics<1>
|
ETCtrls = ETSymbolics<1>
|
||||||
ETCols = ETSymbolics<2>
|
ETCols = ETSymbolics<2>
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
||||||
ETCtrl = ETCtrls<1,I>
|
ETCtrl = ETCtrls<1,I>
|
||||||
|
|
||||||
ETList = Get_Property(ETCtrl,'LIST')
|
ETList = Get_Property(ETCtrl,'LIST')
|
||||||
@ -156,19 +151,19 @@ FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
|||||||
END
|
END
|
||||||
NEXT Line
|
NEXT Line
|
||||||
|
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Read:
|
Read:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
EntryID = Get_Property(@WINDOW:'.ENTRY_ID','DEFPROP')
|
EntryID = Get_Property(@WINDOW:'.ENTRY_ID','DEFPROP')
|
||||||
|
|
||||||
IF EntryID = '' THEN
|
IF EntryID = '' THEN
|
||||||
Set_Property(@WINDOW:'.ENTRY_ID','DEFPROP',@USER4)
|
Set_Property(@WINDOW:'.ENTRY_ID','DEFPROP',@USER4)
|
||||||
Send_Event(@WINDOW:'.ENTRY_ID','LOSTFOCUS')
|
Send_Event(@WINDOW:'.ENTRY_ID','LOSTFOCUS')
|
||||||
Set_Property(@WINDOW:'.ENTRY_DATE','DEFPROP',OCONV(Date(),'D4/'))
|
Set_Property(@WINDOW:'.ENTRY_DATE','DEFPROP',OCONV(Date(),'D4/'))
|
||||||
@ -191,11 +186,11 @@ IF EntryID = '' THEN
|
|||||||
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
||||||
|
|
||||||
END ELSE
|
END ELSE
|
||||||
Set_Property(@WINDOW:'.SEND','ENABLED',0)
|
Set_Property(@WINDOW:'.SEND','ENABLED',0)
|
||||||
END
|
END
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -204,54 +199,35 @@ RETURN
|
|||||||
Write:
|
Write:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
NoteID = Get_Property(@WINDOW:'.SEQ','DEFPROP')
|
NoteID = Get_Property(@WINDOW:'.SEQ','DEFPROP')
|
||||||
|
|
||||||
SendToArray = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
SendToArray = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
||||||
SendToIDs = SendToArray<COL$ST_ID>
|
SendToIDs = SendToArray<COL$ST_ID>
|
||||||
|
|
||||||
IF RowExists('NOTES',NoteID) THEN
|
IF RowExists('NOTES',NoteID) THEN
|
||||||
|
|
||||||
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
||||||
Send_Event(@WINDOW,'CLOSE')
|
Send_Event(@WINDOW,'CLOSE')
|
||||||
|
|
||||||
END ELSE
|
END ELSE
|
||||||
|
|
||||||
Forward_Event()
|
Forward_Event()
|
||||||
|
Notes_Services('AddToQueue', NoteId)
|
||||||
|
|
||||||
obj_Notes('PostEMail',NoteID) ;* Forwards to Outlook eMail if the users flag is set
|
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN
|
|
||||||
ErrMsg(errCode)
|
|
||||||
END
|
END
|
||||||
|
|
||||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
|
||||||
|
|
||||||
Pos = 1
|
|
||||||
Flag = ""
|
|
||||||
LOOP
|
|
||||||
REMOVE SendToID FROM SendToIDs AT Pos SETTING FLAG
|
|
||||||
IF SendToID NE '' THEN
|
|
||||||
obj_Notes_Sent('Create',SendToID:@RM:NoteID:@RM:CurrDTM)
|
|
||||||
END
|
|
||||||
WHILE Flag
|
|
||||||
REPEAT
|
|
||||||
|
|
||||||
END
|
|
||||||
|
|
||||||
RETURN 0
|
RETURN 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
YourGroupsClick:
|
YourGroupsClick:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
SelectSent = 'SELECT MSG_GROUPS WITH ENTRY_ID = ':QUOTE(@USER4):' BY GROUP_NAME'
|
SelectSent = 'SELECT MSG_GROUPS WITH ENTRY_ID = ':QUOTE(@USER4):' BY GROUP_NAME'
|
||||||
|
|
||||||
RList(SelectSent,TARGET_ACTIVELIST$, '', '', '' )
|
RList(SelectSent,TARGET_ACTIVELIST$, '', '', '' )
|
||||||
|
|
||||||
IF @RECCOUNT THEN
|
IF @RECCOUNT THEN
|
||||||
|
|
||||||
GroupNames = Popup(@WINDOW,'','SHOW_GROUP_NAMES')
|
GroupNames = Popup(@WINDOW,'','SHOW_GROUP_NAMES')
|
||||||
|
|
||||||
@ -269,23 +245,22 @@ IF @RECCOUNT THEN
|
|||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
END ELSE
|
END ELSE
|
||||||
|
|
||||||
ErrMsg('You do not have any group names...')
|
ErrMsg('You do not have any group names...')
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
CopyYourSelfClick:
|
CopyYourSelfClick:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
NewSendToIDs = ''
|
NewSendToIDs = ''
|
||||||
|
|
||||||
GOSUB AddSendToIDs
|
GOSUB AddSendToIDs
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -294,15 +269,15 @@ RETURN
|
|||||||
AllActiveUsersClick:
|
AllActiveUsersClick:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
Check = Msg(@WINDOW,'','CC_ALL_USERS')
|
Check = Msg(@WINDOW,'','CC_ALL_USERS')
|
||||||
|
|
||||||
IF Check = CHAR(27) THEN RETURN
|
IF Check = CHAR(27) THEN RETURN
|
||||||
|
|
||||||
NewSendToIDs = obj_Notes('AllActiveUsers')
|
NewSendToIDs = obj_Notes('AllActiveUsers')
|
||||||
|
|
||||||
Set_Property(@WINDOW:'.SEND_TO','ARRAY','')
|
Set_Property(@WINDOW:'.SEND_TO','ARRAY','')
|
||||||
|
|
||||||
GOSUB AddSendToIDs
|
GOSUB AddSendToIDs
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -311,12 +286,11 @@ RETURN
|
|||||||
AllUsersClick:
|
AllUsersClick:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
NewSendToIDs = Popup(@WINDOW,'','USER_ID')
|
||||||
|
|
||||||
NewSendToIDs = Popup(@WINDOW,'','USER_ID')
|
IF NewSendToIDs = CHAR(27) THEN RETURN
|
||||||
|
|
||||||
IF NewSendToIDs = CHAR(27) THEN RETURN
|
GOSUB AddSendToIDs
|
||||||
|
|
||||||
GOSUB AddSendToIDs
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -325,44 +299,44 @@ RETURN
|
|||||||
AddSendToIDs:
|
AddSendToIDs:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
SendToArray = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
SendToArray = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
||||||
RawSendToIDs = SendToArray<COL$ST_ID>
|
RawSendToIDs = SendToArray<COL$ST_ID>
|
||||||
|
|
||||||
SendToCnt = 0
|
SendToCnt = 0
|
||||||
SendToIDs = ''
|
SendToIDs = ''
|
||||||
|
|
||||||
TestCnt = COUNT(RawSendToIDs,@VM) + (RawSendToIDs NE '')
|
TestCnt = COUNT(RawSendToIDs,@VM) + (RawSendToIDs NE '')
|
||||||
FOR I = 1 TO TestCnt
|
FOR I = 1 TO TestCnt
|
||||||
IF RawSendToIDs<1,I> NE '' THEN
|
IF RawSendToIDs<1,I> NE '' THEN
|
||||||
SendToIDs<1,-1> = RawSendToIDs<1,I>
|
SendToIDs<1,-1> = RawSendToIDs<1,I>
|
||||||
SendToCnt += 1
|
SendToCnt += 1
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
NewCnt = COUNT(NewSendToIDs,@VM) + (NewSendToIDs NE '')
|
NewCnt = COUNT(NewSendToIDs,@VM) + (NewSendToIDs NE '')
|
||||||
|
|
||||||
FOR I = 1 TO NewCnt
|
FOR I = 1 TO NewCnt
|
||||||
NewSendToID = NewSendToIDs<1,I>
|
NewSendToID = NewSendToIDs<1,I>
|
||||||
LOCATE NewSendToID IN SendToIDs BY 'AL' USING @VM SETTING Pos ELSE
|
LOCATE NewSendToID IN SendToIDs BY 'AL' USING @VM SETTING Pos ELSE
|
||||||
SendToIDs = INSERT(SendToIDs,1,Pos,0,NewSendToID)
|
SendToIDs = INSERT(SendToIDs,1,Pos,0,NewSendToID)
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
SendToYourself = Get_Property(@WINDOW:'.COPY_YOURSELF','CHECK')
|
SendToYourself = Get_Property(@WINDOW:'.COPY_YOURSELF','CHECK')
|
||||||
|
|
||||||
Myself = @USER4
|
Myself = @USER4
|
||||||
|
|
||||||
LOCATE Myself IN SendToIDs BY 'AL' USING @VM SETTING Pos THEN
|
LOCATE Myself IN SendToIDs BY 'AL' USING @VM SETTING Pos THEN
|
||||||
IF SendToYourSelf = 0 THEN SendToIDs = DELETE(SendToIDS,1,Pos,0)
|
IF SendToYourSelf = 0 THEN SendToIDs = DELETE(SendToIDS,1,Pos,0)
|
||||||
END ELSE
|
END ELSE
|
||||||
IF SendToYourSelf = 1 THEN SendToIDs = INSERT(SendToIDs,1,Pos,0,Myself)
|
IF SendToYourSelf = 1 THEN SendToIDs = INSERT(SendToIDs,1,Pos,0,Myself)
|
||||||
END
|
END
|
||||||
|
|
||||||
SendToIDs := @VM ;* BlankLine on end
|
SendToIDs := @VM ;* BlankLine on end
|
||||||
|
|
||||||
SendToArray<COL$ST_ID> = SendToIDs
|
SendToArray<COL$ST_ID> = SendToIDs
|
||||||
Set_Property(@WINDOW:'.SEND_TO','DEFPROP',SendToArray)
|
Set_Property(@WINDOW:'.SEND_TO','DEFPROP',SendToArray)
|
||||||
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -371,174 +345,171 @@ RETURN
|
|||||||
Reply:
|
Reply:
|
||||||
* * * * * *
|
* * * * * *
|
||||||
|
|
||||||
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM
|
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.FROM':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.FROM':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.SEND_TO':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.SEND_TO':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP'
|
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP'
|
||||||
|
|
||||||
Vals = Get_Property(Ctrls,Props)
|
Vals = Get_Property(Ctrls,Props)
|
||||||
|
|
||||||
Message = Vals[1,@RM]
|
Message = Vals[1,@RM]
|
||||||
Subject = Vals[COL2()+1,@RM]
|
Subject = Vals[COL2()+1,@RM]
|
||||||
FromID = Vals[COL2()+1,@RM]
|
FromID = Vals[COL2()+1,@RM]
|
||||||
SendTo = Vals[COL2()+1,@RM]
|
SendTo = Vals[COL2()+1,@RM]
|
||||||
AttachWindow = Vals[COL2()+1,@RM]
|
AttachWindow = Vals[COL2()+1,@RM]
|
||||||
AttachKey = Vals[COL2()+1,@RM]
|
AttachKey = Vals[COL2()+1,@RM]
|
||||||
EntryID = Vals[COL2()+1,@RM]
|
EntryID = Vals[COL2()+1,@RM]
|
||||||
EntryDate = Vals[COL2()+1,@RM]
|
EntryDate = Vals[COL2()+1,@RM]
|
||||||
EntryTime = Vals[COL2()+1,@RM]
|
EntryTime = Vals[COL2()+1,@RM]
|
||||||
|
|
||||||
|
|
||||||
EntryDate = OCONV(Date(),'D2/') ;* JCH 7/15/2010
|
EntryDate = OCONV(Date(),'D2/') ;* JCH 7/15/2010
|
||||||
EntryTime = OCONV(Time(),'MTH') ;* JCH 7/15/2010
|
EntryTime = OCONV(Time(),'MTH') ;* JCH 7/15/2010
|
||||||
|
|
||||||
SWAP @TM WITH @TM:'>' IN Message
|
SWAP @TM WITH @TM:'>' IN Message
|
||||||
|
|
||||||
Subject = 'RE: ':Subject
|
Subject = 'RE: ':Subject
|
||||||
Message = CRLF$:CRLF$:'>':Message
|
Message = CRLF$:CRLF$:'>':Message
|
||||||
|
|
||||||
Set_Property(@WINDOW,'SAVEWARN',0)
|
Set_Property(@WINDOW,'SAVEWARN',0)
|
||||||
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
||||||
|
|
||||||
IF EntID = 'NOTE_MESSAGE.REPLY_ALL' THEN
|
IF EntID = 'NOTE_MESSAGE.REPLY_ALL' THEN
|
||||||
Set_Property('NOTE_MESSAGE.SEND_TO','DEFPROP',SendTo)
|
Set_Property('NOTE_MESSAGE.SEND_TO','DEFPROP',SendTo)
|
||||||
NewSendToIDs = FromID
|
NewSendToIDs = FromID
|
||||||
GOSUB AddSendToIDs
|
GOSUB AddSendToIDs
|
||||||
Set_Property(@WINDOW:'.FROM','DEFPROP',@USER4)
|
Set_Property(@WINDOW:'.FROM','DEFPROP',@USER4)
|
||||||
END ELSE
|
END ELSE
|
||||||
Ctrls = @WINDOW:'.FROM':@RM ; Props = 'DEFPROP':@RM ; Vals = @USER4:@RM
|
Ctrls = @WINDOW:'.FROM':@RM ; Props = 'DEFPROP':@RM ; Vals = @USER4:@RM
|
||||||
Ctrls := @WINDOW:'.SEND_TO' ; Props := 'DEFPROP' ; Vals := FromID
|
Ctrls := @WINDOW:'.SEND_TO' ; Props := 'DEFPROP' ; Vals := FromID
|
||||||
Set_Property(Ctrls,Props,Vals)
|
Set_Property(Ctrls,Props,Vals)
|
||||||
END
|
END
|
||||||
|
|
||||||
SeqNo = NextKey('NOTES')
|
SeqNo = NextKey('NOTES')
|
||||||
Set_Property(@WINDOW:'.SEQ','DEFPROP',SeqNo)
|
Set_Property(@WINDOW:'.SEQ','DEFPROP',SeqNo)
|
||||||
|
|
||||||
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM ; Vals = Message:@RM
|
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM ; Vals = Message:@RM
|
||||||
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM ; Vals := Subject:@RM
|
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM ; Vals := Subject:@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM ; Vals := Attachwindow:@RM
|
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM ; Vals := Attachwindow:@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachKey:@RM
|
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachKey:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryID:@RM
|
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryID:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryDate:@RM
|
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryDate:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP' ; Vals := EntryTime
|
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP' ; Vals := EntryTime
|
||||||
|
|
||||||
Set_Property(Ctrls,Props,Vals)
|
Set_Property(Ctrls,Props,Vals)
|
||||||
|
|
||||||
Send_Event(@WINDOW:'.FROM_NAME','CALCULATE')
|
Send_Event(@WINDOW:'.FROM_NAME','CALCULATE')
|
||||||
Send_Event(@WINDOW:'.ENTRY_ID_NAME','CALCULATE')
|
Send_Event(@WINDOW:'.ENTRY_ID_NAME','CALCULATE')
|
||||||
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
||||||
|
|
||||||
IOOptions = Get_Property( @WINDOW, 'IOOPTIONS' )
|
IOOptions = Get_Property( @WINDOW, 'IOOPTIONS' )
|
||||||
|
|
||||||
IOOptions<2> = 0 ;* do the lock creating a new reply another WTFO??????
|
IOOptions<2> = 0 ;* do the lock creating a new reply another WTFO??????
|
||||||
|
|
||||||
Set_Property( @WINDOW, 'IOOPTIONS', IoOptions )
|
Set_Property( @WINDOW, 'IOOPTIONS', IoOptions )
|
||||||
|
|
||||||
|
|
||||||
Set_Property(@WINDOW:'.SEND','ENABLED',1)
|
Set_Property(@WINDOW:'.SEND','ENABLED',1)
|
||||||
Set_Property(@WINDOW:'.REPLY','ENABLED',0)
|
Set_Property(@WINDOW:'.REPLY','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.REPLY_ALL','ENABLED',0)
|
Set_Property(@WINDOW:'.REPLY_ALL','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
||||||
Set_Property(@WINDOW:'.MESSAGE', "FOCUS", 1)
|
Set_Property(@WINDOW:'.MESSAGE', "FOCUS", 1)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Forward:
|
Forward:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM
|
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.FROM':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.FROM':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.SEND_TO':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.SEND_TO':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM
|
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP'
|
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP'
|
||||||
|
|
||||||
Vals = Get_Property(Ctrls,Props)
|
Vals = Get_Property(Ctrls,Props)
|
||||||
|
|
||||||
OrgMessage = Vals[1,@RM]
|
OrgMessage = Vals[1,@RM]
|
||||||
Subject = Vals[COL2()+1,@RM]
|
Subject = Vals[COL2()+1,@RM]
|
||||||
FromID = Vals[COL2()+1,@RM]
|
FromID = Vals[COL2()+1,@RM]
|
||||||
SendTo = Vals[COL2()+1,@RM]
|
SendTo = Vals[COL2()+1,@RM]
|
||||||
AttachWindow = Vals[COL2()+1,@RM]
|
AttachWindow = Vals[COL2()+1,@RM]
|
||||||
AttachKey = Vals[COL2()+1,@RM]
|
AttachKey = Vals[COL2()+1,@RM]
|
||||||
EntryID = Vals[COL2()+1,@RM]
|
EntryID = Vals[COL2()+1,@RM]
|
||||||
EntryDate = Vals[COL2()+1,@RM]
|
EntryDate = Vals[COL2()+1,@RM]
|
||||||
EntryTime = Vals[COL2()+1,@RM]
|
EntryTime = Vals[COL2()+1,@RM]
|
||||||
|
|
||||||
SWAP @TM WITH @TM:'>' IN OrgMessage
|
SWAP @TM WITH @TM:'>' IN OrgMessage
|
||||||
|
|
||||||
SendToUserIDs = SendTo<COL$ST_ID>
|
SendToUserIDs = SendTo<COL$ST_ID>
|
||||||
SWAP @VM WITH ', ' IN SendToUserIDs
|
SWAP @VM WITH ', ' IN SendToUserIDs
|
||||||
|
|
||||||
Subject = '[FW: ':Subject:']'
|
Subject = '[FW: ':Subject:']'
|
||||||
|
|
||||||
Message = CRLF$:CRLF$
|
Message = CRLF$:CRLF$
|
||||||
Message := '--------- Original Message ---------':CRLF$:CRLF$
|
Message := '--------- Original Message ---------':CRLF$:CRLF$
|
||||||
Message := 'Subject: ':Subject:CRLF$
|
Message := 'Subject: ':Subject:CRLF$
|
||||||
Message := ' Date: ':OCONV(EntryDate,'D4/'):' ':OCONV(EntryTime,'MTS'):CRLF$
|
Message := ' Date: ':OCONV(EntryDate,'D4/'):' ':OCONV(EntryTime,'MTS'):CRLF$
|
||||||
Message := ' From: ':FromID:CRLF$
|
Message := ' From: ':FromID:CRLF$
|
||||||
Message := ' To: ':SendToUserIDs:CRLF$
|
Message := ' To: ':SendToUserIDs:CRLF$
|
||||||
Message := CRLF$:CRLF$
|
Message := CRLF$:CRLF$
|
||||||
|
|
||||||
Message := CRLF$:CRLF$:'>':OrgMessage
|
Message := CRLF$:CRLF$:'>':OrgMessage
|
||||||
|
|
||||||
Set_Property(@WINDOW,'SAVEWARN',0)
|
Set_Property(@WINDOW,'SAVEWARN',0)
|
||||||
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
Send_Event(@WINDOW,'CLEAR',0,1,1)
|
||||||
|
|
||||||
IF EntID = 'NOTE_MESSAGE.REPLY_ALL' THEN
|
IF EntID = 'NOTE_MESSAGE.REPLY_ALL' THEN
|
||||||
Set_Property('NOTE_MESSAGE.SEND_TO','DEFPROP',SendTo)
|
Set_Property('NOTE_MESSAGE.SEND_TO','DEFPROP',SendTo)
|
||||||
NewSendToIDs = FromID
|
NewSendToIDs = FromID
|
||||||
GOSUB AddSendToIDs
|
GOSUB AddSendToIDs
|
||||||
Set_Property(@WINDOW:'.FROM','DEFPROP',@USER4)
|
Set_Property(@WINDOW:'.FROM','DEFPROP',@USER4)
|
||||||
END ELSE
|
END ELSE
|
||||||
Ctrls = @WINDOW:'.FROM':@RM ; Props = 'DEFPROP':@RM ; Vals = @USER4:@RM
|
Ctrls = @WINDOW:'.FROM':@RM ; Props = 'DEFPROP':@RM ; Vals = @USER4:@RM
|
||||||
Ctrls := @WINDOW:'.SEND_TO' ; Props := 'DEFPROP' ; Vals := ''
|
Ctrls := @WINDOW:'.SEND_TO' ; Props := 'DEFPROP' ; Vals := ''
|
||||||
Set_Property(Ctrls,Props,Vals)
|
Set_Property(Ctrls,Props,Vals)
|
||||||
END
|
END
|
||||||
|
|
||||||
SeqNo = NextKey('NOTES')
|
SeqNo = NextKey('NOTES')
|
||||||
Set_Property(@WINDOW:'.SEQ','DEFPROP',SeqNo)
|
Set_Property(@WINDOW:'.SEQ','DEFPROP',SeqNo)
|
||||||
|
|
||||||
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM ; Vals = Message:@RM
|
Ctrls = @WINDOW:'.MESSAGE':@RM ; Props = 'DEFPROP':@RM ; Vals = Message:@RM
|
||||||
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM ; Vals := Subject:@RM
|
Ctrls := @WINDOW:'.SUBJECT':@RM ; Props := 'DEFPROP':@RM ; Vals := Subject:@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachWindow:@RM
|
Ctrls := @WINDOW:'.ATTACH_WINDOW':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachWindow:@RM
|
||||||
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachKey:@RM
|
Ctrls := @WINDOW:'.ATTACH_KEY':@RM ; Props := 'DEFPROP':@RM ; Vals := AttachKey:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryID:@RM
|
Ctrls := @WINDOW:'.ENTRY_ID':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryID:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryDate:@RM
|
Ctrls := @WINDOW:'.ENTRY_DATE':@RM ; Props := 'DEFPROP':@RM ; Vals := EntryDate:@RM
|
||||||
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP' ; Vals := EntryTime
|
Ctrls := @WINDOW:'.ENTRY_TIME' ; Props := 'DEFPROP' ; Vals := EntryTime
|
||||||
|
|
||||||
Set_Property(Ctrls,Props,Vals)
|
Set_Property(Ctrls,Props,Vals)
|
||||||
|
|
||||||
Send_Event(@WINDOW:'.FROM_NAME','CALCULATE')
|
Send_Event(@WINDOW:'.FROM_NAME','CALCULATE')
|
||||||
Send_Event(@WINDOW:'.ENTRY_ID_NAME','CALCULATE')
|
Send_Event(@WINDOW:'.ENTRY_ID_NAME','CALCULATE')
|
||||||
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
Send_Event(@WINDOW:'.SEND_TO','CALCULATE',COL$ST_NAME)
|
||||||
|
|
||||||
IOOptions = Get_Property( @WINDOW, 'IOOPTIONS' )
|
IOOptions = Get_Property( @WINDOW, 'IOOPTIONS' )
|
||||||
|
|
||||||
IOOptions<2> = 0 ;* do the lock creating a new reply another WTFO??????
|
IOOptions<2> = 0 ;* do the lock creating a new reply another WTFO??????
|
||||||
|
|
||||||
Set_Property( @WINDOW, 'IOOPTIONS', IoOptions )
|
Set_Property( @WINDOW, 'IOOPTIONS', IoOptions )
|
||||||
|
|
||||||
Set_Property(@WINDOW:'.SEND','ENABLED',1)
|
Set_Property(@WINDOW:'.SEND','ENABLED',1)
|
||||||
Set_Property(@WINDOW:'.REPLY','ENABLED',0)
|
Set_Property(@WINDOW:'.REPLY','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.REPLY_ALL','ENABLED',0)
|
Set_Property(@WINDOW:'.REPLY_ALL','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
Set_Property(@WINDOW:'.FORWARD','ENABLED',0)
|
||||||
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
Set_Property(@WINDOW:'.MENU.FILE.SAVE_ROW','ENABLED',1)
|
||||||
Set_Property(@WINDOW:'.MESSAGE', "FOCUS", 1)
|
Set_Property(@WINDOW:'.MESSAGE', "FOCUS", 1)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -547,12 +518,12 @@ RETURN
|
|||||||
ViewAttachment:
|
ViewAttachment:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
AttachWindow = Get_Property(@WINDOW:'.ATTACH_WINDOW','DEFPROP')
|
AttachWindow = Get_Property(@WINDOW:'.ATTACH_WINDOW','DEFPROP')
|
||||||
AttachKey = Get_Property(@WINDOW:'.ATTACH_KEY','DEFPROP')
|
AttachKey = Get_Property(@WINDOW:'.ATTACH_KEY','DEFPROP')
|
||||||
|
|
||||||
IF AttachWindow NE '' AND AttachKey NE '' THEN
|
IF AttachWindow NE '' AND AttachKey NE '' THEN
|
||||||
obj_Appwindow('ViewRelated',AttachWindow:@RM:AttachKey)
|
obj_Appwindow('ViewRelated',AttachWindow:@RM:AttachKey)
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -561,93 +532,84 @@ RETURN
|
|||||||
SendToPC:
|
SendToPC:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
NextColumn = Parm1
|
NextColumn = Parm1
|
||||||
NextRow = Parm2
|
NextRow = Parm2
|
||||||
|
|
||||||
Forward_Event(NextColumn,NextRow)
|
Forward_Event(NextColumn,NextRow)
|
||||||
|
|
||||||
CurrRow = Get_Property(@WINDOW:'.SEND_TO','ROWDATA')
|
CurrRow = Get_Property(@WINDOW:'.SEND_TO','ROWDATA')
|
||||||
|
|
||||||
CurrRow<COL$ST_NAME> = OCONV(CurrRow<1,COL$ST_ID>,'[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
CurrRow<COL$ST_NAME> = OCONV(CurrRow<1,COL$ST_ID>,'[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||||
|
|
||||||
Set_Property(@WINDOW:'.SEND_TO','ROWDATA',CurrRow)
|
Set_Property(@WINDOW:'.SEND_TO','ROWDATA',CurrRow)
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Print:
|
Print:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
PrintPath = Printer_Select('',1) ;* Get default printer
|
PrintPath = Printer_Select('',1) ;* Get default printer
|
||||||
|
|
||||||
Stat = Set_Printer( 'INIT', '', '', 1.25:@FM:'':@FM:1.0:@FM:'', 0,'',PrintPath )
|
Stat = Set_Printer( 'INIT', '', '', 1.25:@FM:'':@FM:1.0:@FM:'', 0,'',PrintPath )
|
||||||
GOSUB CheckErr
|
GOSUB CheckErr
|
||||||
|
|
||||||
Font = "Courier New,12,L,1"
|
Font = "Courier New,12,L,1"
|
||||||
CONVERT ',' TO @FM IN Font
|
CONVERT ',' TO @FM IN Font
|
||||||
Hf = Font
|
Hf = Font
|
||||||
Stat = Set_Printer( 'FONT', Font )
|
Stat = Set_Printer( 'FONT', Font )
|
||||||
GOSUB CheckErr
|
GOSUB CheckErr
|
||||||
|
|
||||||
|
|
||||||
SendTo = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
SendTo = Get_Property(@WINDOW:'.SEND_TO','ARRAY')
|
||||||
|
|
||||||
Void = Set_Printer( 'TEXT', 'TO:' )
|
Void = Set_Printer( 'TEXT', 'TO:' )
|
||||||
Table = ''
|
Table = ''
|
||||||
|
|
||||||
SendTo<1> = ex_vm_rem( SendTo<1> )
|
SendTo<1> = ex_vm_rem( SendTo<1> )
|
||||||
Rcnt = COUNT(SendTo<1>,@VM) + (SendTo NE '')
|
Rcnt = COUNT(SendTo<1>,@VM) + (SendTo NE '')
|
||||||
|
|
||||||
FOR I = 1 TO Rcnt
|
FOR I = 1 TO Rcnt
|
||||||
Tvar = SendTo<2,I>:@VM:SendTo<2,I+1>:@VM:SendTo<2,I+2>
|
Tvar = SendTo<2,I>:@VM:SendTo<2,I+1>:@VM:SendTo<2,I+2>
|
||||||
Table<-1> = Tvar
|
Table<-1> = Tvar
|
||||||
I = I+2 ; *skip column 2 & 3 that just got appended
|
I = I+2 ; *skip column 2 & 3 that just got appended
|
||||||
next i
|
next i
|
||||||
Void = Set_Printer( 'ADDTABLE', '2880':@VM:'2880':@VM:'2880', '', Table, '','','', TB_ALL )
|
Void = Set_Printer( 'ADDTABLE', '2880':@VM:'2880':@VM:'2880', '', Table, '','','', TB_ALL )
|
||||||
Void = Set_Printer( 'TEXT', '' )
|
Void = Set_Printer( 'TEXT', '' )
|
||||||
Void = Set_Printer( 'TEXT', 'From: ':Get_Property(@WINDOW:'.FROM','DEFPROP'):' ':Get_Property(@WINDOW:'.FROM_NAME','DEFPROP'))
|
Void = Set_Printer( 'TEXT', 'From: ':Get_Property(@WINDOW:'.FROM','DEFPROP'):' ':Get_Property(@WINDOW:'.FROM_NAME','DEFPROP'))
|
||||||
Void = Set_Printer( 'TEXT', '' )
|
Void = Set_Printer( 'TEXT', '' )
|
||||||
Void = Set_Printer( 'TEXT', 'Date: ':Get_Property(@WINDOW:'.ENTRY_DATE','DEFPROP'))
|
Void = Set_Printer( 'TEXT', 'Date: ':Get_Property(@WINDOW:'.ENTRY_DATE','DEFPROP'))
|
||||||
Void = Set_Printer( 'TEXT', '' )
|
Void = Set_Printer( 'TEXT', '' )
|
||||||
Void = Set_Printer( 'TEXT', 'Subject: ':Get_Property(@WINDOW:'.SUBJECT'))
|
Void = Set_Printer( 'TEXT', 'Subject: ':Get_Property(@WINDOW:'.SUBJECT'))
|
||||||
Void = Set_Printer( 'TEXT', '' )
|
Void = Set_Printer( 'TEXT', '' )
|
||||||
Void = Set_Printer( 'TEXT', ' M E S S A G E' )
|
Void = Set_Printer( 'TEXT', ' M E S S A G E' )
|
||||||
Void = Set_Printer( 'TEXT', '' )
|
Void = Set_Printer( 'TEXT', '' )
|
||||||
|
|
||||||
MessageText = Get_Property(@WINDOW:'.MESSAGE','DEFPROP')
|
MessageText = Get_Property(@WINDOW:'.MESSAGE','DEFPROP')
|
||||||
|
|
||||||
SWAP @TM WITH CRLF$ IN MessageText
|
SWAP @TM WITH CRLF$ IN MessageText
|
||||||
|
|
||||||
TableColInfo = '9360'
|
TableColInfo = '9360'
|
||||||
x = Set_Printer("ADDTABLE", TableColInfo, '', MessageText, '', '', 1, TB_NONE)
|
x = Set_Printer("ADDTABLE", TableColInfo, '', MessageText, '', '', 1, TB_NONE)
|
||||||
|
|
||||||
Stat = Set_Printer( 'TERM' )
|
Stat = Set_Printer( 'TERM' )
|
||||||
|
|
||||||
|
GOSUB CheckErr
|
||||||
|
|
||||||
GOSUB CheckErr
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
CheckErr:
|
CheckErr:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
IF Stat < 0 THEN
|
IF Stat < 0 THEN
|
||||||
Void = msg( '', Stat )
|
Void = msg( '', Stat )
|
||||||
Stat = Set_Printer( 'TERM' )
|
Stat = Set_Printer( 'TERM' )
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ COMPILE FUNCTION obj_Notes(Method,Parms)
|
|||||||
|
|
||||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, SRP_Send_Mail, obj_Calendar, Database_Services, SRP_Stopwatch
|
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, SRP_Send_Mail, obj_Calendar, Database_Services, SRP_Stopwatch
|
||||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, obj_Notes_Sent, Btree.Extract, Send_Info, obj_Notes
|
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, obj_Notes_Sent, Btree.Extract, Send_Info, obj_Notes
|
||||||
Declare subroutine Obj_Post_Log, SRP_Stopwatch
|
DECLARE SUBROUTINE Obj_Post_Log, SRP_Stopwatch, Notes_Services
|
||||||
|
|
||||||
$INSERT MSG_EQUATES
|
$INSERT MSG_EQUATES
|
||||||
$INSERT NOTES_EQU
|
$INSERT NOTES_EQU
|
||||||
@ -69,11 +69,11 @@ RETURN Result
|
|||||||
Inbox:
|
Inbox:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
UserName = Parms[1,@RM]
|
UserName = Parms[1,@RM]
|
||||||
|
|
||||||
IF UserName = '' THEN UserName = @USER4
|
IF UserName = '' THEN UserName = @USER4
|
||||||
|
|
||||||
IF XLATE( 'NOTE_PTRS', UserName, 'NEW_MESSAGES', 'X' ) THEN
|
IF XLATE( 'NOTE_PTRS', UserName, 'NEW_MESSAGES', 'X' ) THEN
|
||||||
NotePtrRec = XLATE( 'NOTE_PTRS', UserName, '', 'X' )
|
NotePtrRec = XLATE( 'NOTE_PTRS', UserName, '', 'X' )
|
||||||
IF NotePtrRec<NOTE_PTRS_NEW$,1> = 'Yes' THEN
|
IF NotePtrRec<NOTE_PTRS_NEW$,1> = 'Yes' THEN
|
||||||
|
|
||||||
@ -87,36 +87,40 @@ IF XLATE( 'NOTE_PTRS', UserName, 'NEW_MESSAGES', 'X' ) THEN
|
|||||||
MsgInfo<MROW$> = -2
|
MsgInfo<MROW$> = -2
|
||||||
Msg( @WINDOW, MsgInfo )
|
Msg( @WINDOW, MsgInfo )
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Create:
|
Create:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Recipients = Parms[1,@RM]
|
|
||||||
SentFrom = Parms[COL2()+1,@RM]
|
|
||||||
Subject = Parms[COL2()+1,@RM]
|
|
||||||
Message = Parms[COL2()+1,@RM]
|
|
||||||
AttachWindow = Parms[COL2()+1,@RM]
|
|
||||||
AttachKeys = Parms[COL2()+1,@RM]
|
|
||||||
SendToGroup = Parms[COL2()+1,@RM]
|
|
||||||
|
|
||||||
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
Recipients = Parms[1,@RM]
|
||||||
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
SentFrom = Parms[COL2()+1,@RM]
|
||||||
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
Subject = Parms[COL2()+1,@RM]
|
||||||
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
Message = Parms[COL2()+1,@RM]
|
||||||
|
AttachWindow = Parms[COL2()+1,@RM]
|
||||||
|
AttachKeys = Parms[COL2()+1,@RM]
|
||||||
|
SendToGroup = Parms[COL2()+1,@RM]
|
||||||
|
|
||||||
IF NOT(ASSIGNED(AttachWindow)) THEN AttachWindow = ''
|
IF ( NOT(ASSIGNED(Recipients)) AND NOT(ASSIGNED(SendToGroup)) ) THEN
|
||||||
IF NOT(ASSIGNED(AttachKeys)) THEN AttachKeys = ''
|
ErrorMsg = 'Unassigned Parameter "Recipients" or "SendToGroup" passed to object. (':Method:')'
|
||||||
IF NOT(ASSIGNED(SendToGroup)) THEN SendToGroup = ''
|
end
|
||||||
|
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
||||||
|
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
||||||
|
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
||||||
|
|
||||||
IF ErrorMsg NE '' THEN RETURN
|
IF NOT(ASSIGNED(AttachWindow)) THEN AttachWindow = ''
|
||||||
|
IF NOT(ASSIGNED(AttachKeys)) THEN AttachKeys = ''
|
||||||
|
IF NOT(ASSIGNED(SendToGroup)) THEN SendToGroup = ''
|
||||||
|
|
||||||
thisRecipients = ''
|
IF ErrorMsg NE '' THEN RETURN
|
||||||
RecipCnt = 0
|
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
thisRecipients = ''
|
||||||
|
RecipCnt = 0
|
||||||
|
|
||||||
|
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
||||||
Recipient = Recipients<1,I>
|
Recipient = Recipients<1,I>
|
||||||
IF Recipient NE '' THEN
|
IF Recipient NE '' THEN
|
||||||
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
||||||
@ -124,131 +128,64 @@ FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
|||||||
RecipCnt += 1
|
RecipCnt += 1
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
NextNoteKey = NextKey('NOTES')
|
NextNoteKey = NextKey('NOTES')
|
||||||
|
|
||||||
NoteRec = ''
|
NoteRec = ''
|
||||||
NoteRec<notes_message_type$> = 'I'
|
NoteRec<notes_message_type$> = 'I'
|
||||||
NoteRec<notes_entry_date$> = Date()
|
NoteRec<notes_entry_date$> = Date()
|
||||||
NoteRec<notes_entry_time$> = Time()
|
NoteRec<notes_entry_time$> = Time()
|
||||||
NoteRec<notes_send_to$> = thisRecipients
|
NoteRec<notes_send_to$> = thisRecipients
|
||||||
NoteRec<notes_from$> = SentFrom
|
NoteRec<notes_from$> = SentFrom
|
||||||
NoteRec<notes_message$> = Message
|
NoteRec<notes_message$> = Message
|
||||||
NoteRec<notes_entry_id$> = @USER4
|
NoteRec<notes_entry_id$> = @USER4
|
||||||
NoteRec<notes_subject$> = Subject
|
NoteRec<notes_subject$> = Subject
|
||||||
NoteRec<notes_attach_window$> = AttachWindow
|
NoteRec<notes_attach_window$> = AttachWindow
|
||||||
NoteRec<notes_attach_keys$> = AttachKeys
|
NoteRec<notes_attach_keys$> = AttachKeys
|
||||||
NoteRec<notes_msg_groups_ids$> = SendToGroup
|
NoteRec<notes_msg_groups_ids$> = SendToGroup
|
||||||
|
|
||||||
OtParms = 'NOTES':@RM:NextNoteKey:@RM:@RM:NoteRec
|
OtParms = 'NOTES':@RM:NextNoteKey:@RM:@RM:NoteRec
|
||||||
obj_Tables('WriteRec',OtParms) ;* Writes the Note record to disk
|
obj_Tables('WriteRec',OtParms) ;* Writes the Note record to disk
|
||||||
|
|
||||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
Notes_Services('AddToQueue', NextNoteKey)
|
||||||
|
|
||||||
RecipientsText = thisRecipients
|
|
||||||
|
|
||||||
SWAP @VM WITH ', ' IN RecipientsText
|
|
||||||
|
|
||||||
FOR I = 1 TO RecipCnt
|
|
||||||
|
|
||||||
thisRecipient = thisRecipients<1,I>
|
|
||||||
|
|
||||||
obj_Notes_Sent('Create',thisRecipient:@RM:NextNoteKey:@RM:CurrDTM) ;* Add to Notes Sent buffer table
|
|
||||||
|
|
||||||
UserRec = XLATE('LSL_USERS',thisRecipient,'','X')
|
|
||||||
FwdFlag = UserRec<LSL_USERS_FWD_EMAIL$>
|
|
||||||
eMailAddr = UserRec<LSL_USERS_EMAIL$>
|
|
||||||
|
|
||||||
IF FwdFlag = 1 AND eMailAddr NE '' THEN
|
|
||||||
|
|
||||||
Text = ''
|
|
||||||
Text<-1> = 'OI eMail From: ':OCONV(SentFrom,'[XLATE_CONV,LSL_USERS*FIRST_LAST]'):' at ':CurrDTM
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Recipients: ':RecipientsText
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Subject: ':Subject
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Message: '
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = Message
|
|
||||||
Text<-1> = ''
|
|
||||||
|
|
||||||
IF AttachWindow NE '' THEN
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Attached Window: ':AttachWindow
|
|
||||||
END
|
|
||||||
|
|
||||||
IF AttachKeys NE '' THEN
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Record Key: ':AttachKeys
|
|
||||||
END
|
|
||||||
|
|
||||||
IF SendToGroup NE '' THEN
|
|
||||||
Text<-1> = ''
|
|
||||||
Text<-1> = 'Sent to Group: ':SendToGroup
|
|
||||||
END
|
|
||||||
|
|
||||||
HeaderText = Text<1>
|
|
||||||
|
|
||||||
CONVERT \00\ TO ',' IN Text
|
|
||||||
SWAP @VM WITH ':@VM:' IN Text
|
|
||||||
SWAP @FM WITH CHAR(13):CHAR(10) IN Text
|
|
||||||
SWAP @TM WITH CHAR(13):CHAR(10) IN Text
|
|
||||||
|
|
||||||
eMailBoxKey = NextNoteKey:'*':thisRecipient
|
|
||||||
|
|
||||||
eMailBoxRec = ''
|
|
||||||
eMailBoxRec<EMAIL_BOX_EMAIL_ADDR$> = eMailAddr
|
|
||||||
eMailBoxRec<EMAIL_BOX_EMAIL_TEXT$> = Text
|
|
||||||
eMailBoxRec<EMAIL_BOX_EMAIL_HEADER$> = HeaderText
|
|
||||||
eMailBoxRec<EMAIL_BOX_FROM_USER$> = SentFrom
|
|
||||||
|
|
||||||
ebParms = 'EMAIL_BOX':@RM:eMailBoxKey:@RM:@RM:eMailBoxRec
|
|
||||||
obj_Tables('WriteRec',ebParms)
|
|
||||||
|
|
||||||
END ;* End of check for forwarding flag
|
|
||||||
|
|
||||||
NEXT I
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Rebuild:
|
Rebuild:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
thisRecipient = Parms[1,@RM]
|
||||||
|
|
||||||
thisRecipient = Parms[1,@RM]
|
IF thisRecipient = '' THEN thisRecipient = @USER4
|
||||||
|
|
||||||
IF thisRecipient = '' THEN thisRecipient = @USER4
|
SelectSent = 'SELECT NOTES WITH SEND_TO "':thisRecipient:'" AND WITH ENTRY_DATE GE ':QUOTE(OCONV(Date()-90,'D4/'))
|
||||||
|
|
||||||
SelectSent = 'SELECT NOTES WITH SEND_TO "':thisRecipient:'" AND WITH ENTRY_DATE GE ':QUOTE(OCONV(Date()-90,'D4/'))
|
RList(SelectSent,'NOTES',TARGET_ACTIVELIST$,'','')
|
||||||
|
|
||||||
RList(SelectSent,'NOTES',TARGET_ACTIVELIST$,'','')
|
IF Get_Status(errCode) THEN
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN
|
|
||||||
ErrMsg(errCode)
|
ErrMsg(errCode)
|
||||||
END
|
END
|
||||||
|
|
||||||
NoteIDs = ''
|
NoteIDs = ''
|
||||||
|
|
||||||
Done = 0
|
Done = 0
|
||||||
LOOP
|
LOOP
|
||||||
READNEXT NoteID ELSE Done = 1
|
READNEXT NoteID ELSE Done = 1
|
||||||
UNTIL Done
|
UNTIL Done
|
||||||
LOCATE NoteID IN NoteIDs BY 'DR' USING @FM SETTING Pos ELSE
|
LOCATE NoteID IN NoteIDs BY 'DR' USING @FM SETTING Pos ELSE
|
||||||
NoteIDs = INSERT(NoteIDs,Pos,0,0,NoteID)
|
NoteIDs = INSERT(NoteIDs,Pos,0,0,NoteID)
|
||||||
END
|
END
|
||||||
REPEAT
|
REPEAT
|
||||||
|
|
||||||
|
|
||||||
OtParms = 'NOTE_PTRS':@RM:thisRecipient
|
OtParms = 'NOTE_PTRS':@RM:thisRecipient
|
||||||
obj_Tables('LockRec',OtParms) ;* If not found then returns null, otherwise reads and sets the lock
|
obj_Tables('LockRec',OtParms) ;* If not found then returns null, otherwise reads and sets the lock
|
||||||
NPRec = ''
|
NPRec = ''
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(NoteIDs,@FM) + (NoteIDs NE '')
|
FOR I = 1 TO COUNT(NoteIDs,@FM) + (NoteIDs NE '')
|
||||||
|
|
||||||
NoteID = NoteIDs<I>
|
NoteID = NoteIDs<I>
|
||||||
|
|
||||||
@ -285,65 +222,63 @@ FOR I = 1 TO COUNT(NoteIDs,@FM) + (NoteIDs NE '')
|
|||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
UNTIL LEN(NPRec) > 128000
|
UNTIL LEN(NPRec) > 128000
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
OtParms = FIELDSTORE(OtParms,@RM,4,0,NPRec)
|
OtParms = FIELDSTORE(OtParms,@RM,4,0,NPRec)
|
||||||
obj_Tables('WriteRec',OtParms)
|
obj_Tables('WriteRec',OtParms)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
AllActiveUsers:
|
AllActiveUsers:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
OPEN 'DICT.LSL_USERS' TO DictVar ELSE RETURN
|
OPEN 'DICT.LSL_USERS' TO DictVar ELSE RETURN
|
||||||
|
|
||||||
SearchString = 'ACTIVE':@VM:'1':@FM
|
SearchString = 'ACTIVE':@VM:'1':@FM
|
||||||
TableName = 'LSL_USERS'
|
TableName = 'LSL_USERS'
|
||||||
Option = ''
|
Option = ''
|
||||||
Flag = ''
|
Flag = ''
|
||||||
|
|
||||||
Btree.Extract(SearchString, TableName, DictVar, AllUserList, Option, Flag )
|
Btree.Extract(SearchString, TableName, DictVar, AllUserList, Option, Flag )
|
||||||
|
|
||||||
IF Get_Status(errCode) THEN RETURN
|
IF Get_Status(errCode) THEN RETURN
|
||||||
|
|
||||||
Result = AllUserList
|
Result = AllUserList
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
PostEMail:
|
PostEMail:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
NoteKey = Parms[1,@RM]
|
NoteKey = Parms[1,@RM]
|
||||||
|
|
||||||
IF NoteKey = '' THEN RETURN
|
IF NoteKey = '' THEN RETURN
|
||||||
|
|
||||||
NoteRec = XLATE('NOTES',NoteKey,'','X')
|
NoteRec = XLATE('NOTES',NoteKey,'','X')
|
||||||
|
|
||||||
SentFrom = NoteRec<NOTES_FROM$>
|
SentFrom = NoteRec<NOTES_FROM$>
|
||||||
Recipients = NoteRec<NOTES_SEND_TO$>
|
Recipients = NoteRec<NOTES_SEND_TO$>
|
||||||
Subject = NoteRec<NOTES_SUBJECT$>
|
Subject = NoteRec<NOTES_SUBJECT$>
|
||||||
Message = NoteRec<NOTES_MESSAGE$>
|
Message = NoteRec<NOTES_MESSAGE$>
|
||||||
AttachWindow = NoteRec<NOTES_ATTACH_WINDOW$>
|
AttachWindow = NoteRec<NOTES_ATTACH_WINDOW$>
|
||||||
AttachKeys = NoteRec<NOTES_ATTACH_KEYS$>
|
AttachKeys = NoteRec<NOTES_ATTACH_KEYS$>
|
||||||
SendToGroup = NoteRec<NOTES_MSG_GROUPS_IDS$>
|
SendToGroup = NoteRec<NOTES_MSG_GROUPS_IDS$>
|
||||||
|
|
||||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
||||||
|
|
||||||
RecipientsText = Recipients
|
RecipientsText = Recipients
|
||||||
|
|
||||||
SWAP @VM WITH ', ' IN RecipientsText
|
SWAP @VM WITH ', ' IN RecipientsText
|
||||||
|
|
||||||
|
|
||||||
RecipCnt = COUNT(Recipients,@VM) + (Recipients NE '')
|
RecipCnt = COUNT(Recipients,@VM) + (Recipients NE '')
|
||||||
|
|
||||||
FOR I = 1 TO RecipCnt
|
FOR I = 1 TO RecipCnt
|
||||||
|
|
||||||
Recipient = Recipients<1,I>
|
Recipient = Recipients<1,I>
|
||||||
|
|
||||||
@ -403,8 +338,7 @@ FOR I = 1 TO RecipCnt
|
|||||||
|
|
||||||
END ;* End of check for forwarding flag
|
END ;* End of check for forwarding flag
|
||||||
|
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -459,9 +393,7 @@ ForwardEMail:
|
|||||||
|
|
||||||
MsgSent = SRP_Send_Mail(Message, ConfigFile)
|
MsgSent = SRP_Send_Mail(Message, ConfigFile)
|
||||||
|
|
||||||
IF MsgSent = 1 THEN
|
IF MsgSent NE True$ THEN
|
||||||
* obj_Tables('DeleteRec',mbParms)
|
|
||||||
END ELSE
|
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
obj_Tables('UnlockRec',mbParms)
|
obj_Tables('UnlockRec',mbParms)
|
||||||
|
|
||||||
@ -498,23 +430,22 @@ EMail:
|
|||||||
|
|
||||||
* Direct outside eMail without creating a NOTES record
|
* Direct outside eMail without creating a NOTES record
|
||||||
|
|
||||||
|
Recipients = Parms[1,@RM]
|
||||||
|
SentFrom = Parms[COL2()+1,@RM]
|
||||||
|
Subject = Parms[COL2()+1,@RM]
|
||||||
|
Message = Parms[COL2()+1,@RM]
|
||||||
|
|
||||||
Recipients = Parms[1,@RM]
|
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
||||||
SentFrom = Parms[COL2()+1,@RM]
|
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
||||||
Subject = Parms[COL2()+1,@RM]
|
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
||||||
Message = Parms[COL2()+1,@RM]
|
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
||||||
|
|
||||||
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
IF ErrorMsg NE '' THEN RETURN
|
||||||
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
|
||||||
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
|
||||||
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
|
||||||
|
|
||||||
IF ErrorMsg NE '' THEN RETURN
|
thisRecipients = ''
|
||||||
|
RecipCnt = 0
|
||||||
|
|
||||||
thisRecipients = ''
|
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
||||||
RecipCnt = 0
|
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
|
||||||
Recipient = Recipients<1,I>
|
Recipient = Recipients<1,I>
|
||||||
IF Recipient NE '' THEN
|
IF Recipient NE '' THEN
|
||||||
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
||||||
@ -522,16 +453,16 @@ FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
|||||||
RecipCnt += 1
|
RecipCnt += 1
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
RecipientsText = OCONV(thisRecipients,'[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
RecipientsText = OCONV(thisRecipients,'[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||||
|
|
||||||
SWAP @VM WITH ', ' IN RecipientsText
|
SWAP @VM WITH ', ' IN RecipientsText
|
||||||
|
|
||||||
CurrDTM = obj_Calendar('CurrDTM')
|
CurrDTM = obj_Calendar('CurrDTM')
|
||||||
|
|
||||||
|
|
||||||
FOR I = 1 TO RecipCnt
|
FOR I = 1 TO RecipCnt
|
||||||
thisRecipient = thisRecipients<1,I>
|
thisRecipient = thisRecipients<1,I>
|
||||||
|
|
||||||
UserRec = XLATE('LSL_USERS',thisRecipient,'','X')
|
UserRec = XLATE('LSL_USERS',thisRecipient,'','X')
|
||||||
@ -562,7 +493,6 @@ FOR I = 1 TO RecipCnt
|
|||||||
ConfigFile<1> = SendUsing_Port$
|
ConfigFile<1> = SendUsing_Port$
|
||||||
ConfigFile<2> = ''
|
ConfigFile<2> = ''
|
||||||
ConfigFile<3> = 25 ;* Server port
|
ConfigFile<3> = 25 ;* Server port
|
||||||
*ConfigFile<4> = 'appmail.eu.infineon.com' ;* IFX Mail server
|
|
||||||
ConfigFile<4> = 'mailrelay-external.infineon.com'
|
ConfigFile<4> = 'mailrelay-external.infineon.com'
|
||||||
ConfigFile<5> = Yes$ ;* Authenticate
|
ConfigFile<5> = Yes$ ;* Authenticate
|
||||||
ConfigFile<6> = 'oinotify@infineon.com' ;* Username
|
ConfigFile<6> = 'oinotify@infineon.com' ;* Username
|
||||||
@ -587,10 +517,7 @@ FOR I = 1 TO RecipCnt
|
|||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
NEXT I ;* End of Recipient Loop
|
||||||
|
|
||||||
NEXT I ;* End of Recipient Loop
|
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -598,30 +525,30 @@ RETURN
|
|||||||
* * * * * * *
|
* * * * * * *
|
||||||
BulkCreate:
|
BulkCreate:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
* SRP_Stopwatch('Reset')
|
|
||||||
Recipients = Parms[1,@RM]
|
|
||||||
SentFrom = Parms[COL2()+1,@RM]
|
|
||||||
Subject = Parms[COL2()+1,@RM]
|
|
||||||
Message = Parms[COL2()+1,@RM]
|
|
||||||
AttachWindow = Parms[COL2()+1,@RM]
|
|
||||||
AttachKeys = Parms[COL2()+1,@RM]
|
|
||||||
SendToGroup = Parms[COL2()+1,@RM]
|
|
||||||
|
|
||||||
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
Recipients = Parms[1,@RM]
|
||||||
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
SentFrom = Parms[COL2()+1,@RM]
|
||||||
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
Subject = Parms[COL2()+1,@RM]
|
||||||
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
Message = Parms[COL2()+1,@RM]
|
||||||
|
AttachWindow = Parms[COL2()+1,@RM]
|
||||||
|
AttachKeys = Parms[COL2()+1,@RM]
|
||||||
|
SendToGroup = Parms[COL2()+1,@RM]
|
||||||
|
|
||||||
IF NOT(ASSIGNED(AttachWindow)) THEN AttachWindow = ''
|
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
||||||
IF NOT(ASSIGNED(AttachKeys)) THEN AttachKeys = ''
|
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
||||||
IF NOT(ASSIGNED(SendToGroup)) THEN SendToGroup = ''
|
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
||||||
|
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
||||||
|
|
||||||
IF ErrorMsg NE '' THEN RETURN
|
IF NOT(ASSIGNED(AttachWindow)) THEN AttachWindow = ''
|
||||||
|
IF NOT(ASSIGNED(AttachKeys)) THEN AttachKeys = ''
|
||||||
|
IF NOT(ASSIGNED(SendToGroup)) THEN SendToGroup = ''
|
||||||
|
|
||||||
thisRecipients = ''
|
IF ErrorMsg NE '' THEN RETURN
|
||||||
RecipCnt = 0
|
|
||||||
|
|
||||||
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
thisRecipients = ''
|
||||||
|
RecipCnt = 0
|
||||||
|
|
||||||
|
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
||||||
Recipient = Recipients<1,I>
|
Recipient = Recipients<1,I>
|
||||||
IF Recipient NE '' THEN
|
IF Recipient NE '' THEN
|
||||||
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
||||||
@ -629,54 +556,51 @@ FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
|||||||
RecipCnt += 1
|
RecipCnt += 1
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
NextNoteKey = NextKey('NOTES')
|
NextNoteKey = NextKey('NOTES')
|
||||||
|
|
||||||
NoteRec = ''
|
NoteRec = ''
|
||||||
NoteRec<notes_message_type$> = 'I'
|
NoteRec<notes_message_type$> = 'I'
|
||||||
NoteRec<notes_entry_date$> = Date()
|
NoteRec<notes_entry_date$> = Date()
|
||||||
NoteRec<notes_entry_time$> = Time()
|
NoteRec<notes_entry_time$> = Time()
|
||||||
NoteRec<notes_send_to$> = thisRecipients
|
NoteRec<notes_send_to$> = thisRecipients
|
||||||
NoteRec<notes_from$> = SentFrom
|
NoteRec<notes_from$> = SentFrom
|
||||||
NoteRec<notes_message$> = Message
|
NoteRec<notes_message$> = Message
|
||||||
NoteRec<notes_entry_id$> = @USER4
|
NoteRec<notes_entry_id$> = @USER4
|
||||||
NoteRec<notes_subject$> = Subject
|
NoteRec<notes_subject$> = Subject
|
||||||
NoteRec<notes_attach_window$> = AttachWindow
|
NoteRec<notes_attach_window$> = AttachWindow
|
||||||
NoteRec<notes_attach_keys$> = AttachKeys
|
NoteRec<notes_attach_keys$> = AttachKeys
|
||||||
NoteRec<notes_msg_groups_ids$> = SendToGroup
|
NoteRec<notes_msg_groups_ids$> = SendToGroup
|
||||||
|
|
||||||
OtParms = 'NOTES':@RM:NextNoteKey:@RM:@RM:NoteRec
|
OtParms = 'NOTES':@RM:NextNoteKey:@RM:@RM:NoteRec
|
||||||
|
|
||||||
Fields = notes_message_type$:@VM ; Values = 'I' :@VM
|
Fields = notes_message_type$:@VM ; Values = 'I' :@VM
|
||||||
Fields := notes_entry_date$:@VM ; Values := Date() :@VM
|
Fields := notes_entry_date$:@VM ; Values := Date() :@VM
|
||||||
Fields := notes_entry_time$:@VM ; Values := Time() :@VM
|
Fields := notes_entry_time$:@VM ; Values := Time() :@VM
|
||||||
Fields := notes_send_to$:@VM ; Values := thisRecipients :@VM
|
Fields := notes_send_to$:@VM ; Values := thisRecipients :@VM
|
||||||
Fields := notes_from$:@VM ; Values := SentFrom :@VM
|
Fields := notes_from$:@VM ; Values := SentFrom :@VM
|
||||||
Fields := notes_message$:@VM ; Values := Message :@VM
|
Fields := notes_message$:@VM ; Values := Message :@VM
|
||||||
Fields := notes_entry_id$:@VM ; Values := @USER4 :@VM
|
Fields := notes_entry_id$:@VM ; Values := @USER4 :@VM
|
||||||
Fields := notes_subject$:@VM ; Values := Subject :@VM
|
Fields := notes_subject$:@VM ; Values := Subject :@VM
|
||||||
Fields := notes_attach_window$:@VM ; Values := AttachWindow :@VM
|
Fields := notes_attach_window$:@VM ; Values := AttachWindow :@VM
|
||||||
Fields := notes_attach_keys$:@VM ; Values := AttachKeys :@VM
|
Fields := notes_attach_keys$:@VM ; Values := AttachKeys :@VM
|
||||||
Fields := notes_msg_groups_ids$ ; Values := SendToGroup
|
Fields := notes_msg_groups_ids$ ; Values := SendToGroup
|
||||||
|
|
||||||
oblParms = 'NOTES' :@RM
|
oblParms = 'NOTES' :@RM
|
||||||
oblParms := NextNoteKey :@RM
|
oblParms := NextNoteKey :@RM
|
||||||
oblParms := Fields :@RM
|
oblParms := Fields :@RM
|
||||||
oblParms := Values :@RM
|
oblParms := Values :@RM
|
||||||
oblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP"
|
oblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP"
|
||||||
|
|
||||||
* SRP_Stopwatch('Start', 'NOTES Write')
|
obj_Tables('WriteRec',OtParms) ;* Writes the Note record to disk
|
||||||
//Obj_Post_Log('Create', oblParms)
|
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
||||||
obj_Tables('WriteRec',OtParms) ;* Writes the Note record to disk
|
|
||||||
* SRP_Stopwatch('Stop', 'NOTES Write')
|
|
||||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
|
||||||
|
|
||||||
RecipientsText = thisRecipients
|
RecipientsText = thisRecipients
|
||||||
|
|
||||||
SWAP @VM WITH ', ' IN RecipientsText
|
SWAP @VM WITH ', ' IN RecipientsText
|
||||||
|
|
||||||
FOR I = 1 TO RecipCnt
|
FOR I = 1 TO RecipCnt
|
||||||
|
|
||||||
thisRecipient = thisRecipients<1,I>
|
thisRecipient = thisRecipients<1,I>
|
||||||
|
|
||||||
@ -731,7 +655,6 @@ FOR I = 1 TO RecipCnt
|
|||||||
eMailBoxRec<EMAIL_BOX_FROM_USER$> = SentFrom
|
eMailBoxRec<EMAIL_BOX_FROM_USER$> = SentFrom
|
||||||
SRP_Stopwatch('Start', 'Email Write')
|
SRP_Stopwatch('Start', 'Email Write')
|
||||||
ebParms = 'EMAIL_BOX':@RM:eMailBoxKey:@RM:@RM:eMailBoxRec
|
ebParms = 'EMAIL_BOX':@RM:eMailBoxKey:@RM:@RM:eMailBoxRec
|
||||||
//obj_Tables('WriteRec',ebParms)
|
|
||||||
|
|
||||||
Fields = EMAIL_BOX_EMAIL_ADDR$:@VM ; Values = eMailAddr :@VM
|
Fields = EMAIL_BOX_EMAIL_ADDR$:@VM ; Values = eMailAddr :@VM
|
||||||
Fields := EMAIL_BOX_EMAIL_TEXT$:@VM ; Values := Text :@VM
|
Fields := EMAIL_BOX_EMAIL_TEXT$:@VM ; Values := Text :@VM
|
||||||
@ -743,15 +666,10 @@ FOR I = 1 TO RecipCnt
|
|||||||
eblParms := Fields :@RM
|
eblParms := Fields :@RM
|
||||||
eblParms := Values :@RM
|
eblParms := Values :@RM
|
||||||
eblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP"
|
eblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP"
|
||||||
* obj_Tables('WriteRec',ebParms)
|
|
||||||
Obj_Post_Log('Create' eblParms)
|
Obj_Post_Log('Create' eblParms)
|
||||||
* SRP_Stopwatch('Stop', 'Email Write')
|
|
||||||
END ;* End of check for forwarding flag
|
END ;* End of check for forwarding flag
|
||||||
|
|
||||||
NEXT I
|
NEXT I
|
||||||
//SRP_Stopwatch('ShowAll')
|
|
||||||
* Test = SRP_Stopwatch('GetAll')
|
|
||||||
* debug
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ COMPILE FUNCTION obj_Notes_Sent(Method,Parms)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables
|
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables
|
||||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, ErrMsg, Btree.Extract,ErrMsg, Update_Index
|
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, ErrMsg, Btree.Extract,ErrMsg, Update_Index
|
||||||
|
|
||||||
@ -58,53 +57,51 @@ END
|
|||||||
RETURN Result
|
RETURN Result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Create:
|
Create:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
Recipient = Parms[1,@RM]
|
Recipient = Parms[1,@RM]
|
||||||
NoteID = Parms[COL2()+1,@RM]
|
NoteID = Parms[COL2()+1,@RM]
|
||||||
TxDTM = Parms[COL2()+1,@RM] ;* In External format
|
TxDTM = Parms[COL2()+1,@RM] ;* In External format
|
||||||
|
|
||||||
IF Recipient = '' THEN ErrorMsg = 'Unassigned Parameter "Recipient" passed to object. (':Method:')'
|
IF Recipient = '' THEN ErrorMsg = 'Unassigned Parameter "Recipient" passed to object. (':Method:')'
|
||||||
IF NoteID = '' THEN ErrorMsg = 'Unassigned Parameter "NoteID" passed to object. (':Method:')'
|
IF NoteID = '' THEN ErrorMsg = 'Unassigned Parameter "NoteID" passed to object. (':Method:')'
|
||||||
IF TxDTM = '' THEN ErrorMsg = 'Unassigned Parameter "TxDTM" passed to object. (':Method:')'
|
IF TxDTM = '' THEN ErrorMsg = 'Unassigned Parameter "TxDTM" passed to object. (':Method:')'
|
||||||
|
|
||||||
IF ErrorMsg NE '' THEN RETURN
|
IF ErrorMsg NE '' THEN RETURN
|
||||||
|
|
||||||
thisTxDTM = ICONV(TxDTM,'DT')
|
thisTxDTM = ICONV(TxDTM,'DT')
|
||||||
|
|
||||||
IF thisTxDTM = '' THEN
|
IF thisTxDTM = '' THEN
|
||||||
ErrorMsg = 'Invalid parameter "TxDTM" = ':QUOTE(TxDTM):' passed to object. (':Method:')'
|
ErrorMsg = 'Invalid parameter "TxDTM" = ':QUOTE(TxDTM):' passed to object. (':Method:')'
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
OtParms = 'NOTES_SENT':@RM:Recipient:'*':NoteID:@RM:@RM:TxDTM ;* First (and only) field in record is TxDTM
|
OtParms = 'NOTES_SENT':@RM:Recipient:'*':NoteID:@RM:@RM:TxDTM ;* First (and only) field in record is TxDTM
|
||||||
obj_Tables('WriteRec',OtParms) ;* Writes new record
|
obj_Tables('WriteRec',OtParms) ;* Writes new record
|
||||||
|
|
||||||
Update_Index('NOTES_SENT','USER_ID','')
|
Update_Index('NOTES_SENT','USER_ID','', True$)
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
Delete:
|
Delete:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
|
||||||
NotesSentKeys = Parms[1,@RM]
|
NotesSentKeys = Parms[1,@RM]
|
||||||
|
|
||||||
IF NotesSentKeys = '' THEN RETURN
|
IF NotesSentKeys = '' THEN RETURN
|
||||||
|
|
||||||
OPEN 'NOTES_SENT' TO NotesSentFile THEN
|
OPEN 'NOTES_SENT' TO NotesSentFile THEN
|
||||||
KeyCnt = COUNT(NotesSentKeys,@VM) + (NotesSentKeys NE '')
|
KeyCnt = COUNT(NotesSentKeys,@VM) + (NotesSentKeys NE '')
|
||||||
FOR I = 1 TO KeyCnt
|
FOR I = 1 TO KeyCnt
|
||||||
DELETE NotesSentFile,NotesSentKeys<1,I> ELSE NULL
|
DELETE NotesSentFile,NotesSentKeys<1,I> ELSE NULL
|
||||||
NEXT I
|
NEXT I
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -113,11 +110,11 @@ RETURN
|
|||||||
GetUserKeys:
|
GetUserKeys:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
Recipient = Parms[1,@RM]
|
Recipient = Parms[1,@RM]
|
||||||
|
|
||||||
IF Recipient = '' THEN RETURN
|
IF Recipient = '' THEN RETURN
|
||||||
|
|
||||||
OPEN 'DICT.NOTES_SENT' TO DictVar THEN
|
OPEN 'DICT.NOTES_SENT' TO DictVar THEN
|
||||||
SearchString = 'USER_ID':@VM:Recipient:@FM
|
SearchString = 'USER_ID':@VM:Recipient:@FM
|
||||||
Flag = ''
|
Flag = ''
|
||||||
Btree.Extract(SearchString,'NOTES_SENT',DictVar,NotesSentKeys,'',Flag)
|
Btree.Extract(SearchString,'NOTES_SENT',DictVar,NotesSentKeys,'',Flag)
|
||||||
@ -127,8 +124,7 @@ OPEN 'DICT.NOTES_SENT' TO DictVar THEN
|
|||||||
END
|
END
|
||||||
|
|
||||||
Result = NotesSentKeys
|
Result = NotesSentKeys
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ COMPILE FUNCTION obj_Note_Ptrs(Method,Parms)
|
|||||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_Notes_Sent
|
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_Notes_Sent
|
||||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, obj_Notes_Sent, Update_Index
|
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, obj_Notes_Sent, Update_Index
|
||||||
|
|
||||||
|
$INSERT LOGICAL
|
||||||
$INSERT MSG_EQUATES
|
$INSERT MSG_EQUATES
|
||||||
$INSERT NOTES_EQU
|
$INSERT NOTES_EQU
|
||||||
$INSERT NOTE_PTRS_EQU
|
$INSERT NOTE_PTRS_EQU
|
||||||
@ -128,7 +129,7 @@ IF NotesSentKeys NE '' THEN
|
|||||||
END ELSE
|
END ELSE
|
||||||
obj_Notes_Sent('Delete',NotesSentKeys)
|
obj_Notes_Sent('Delete',NotesSentKeys)
|
||||||
|
|
||||||
Update_Index('NOTES_SENT','USER_ID','')
|
Update_Index('NOTES_SENT','USER_ID', False$, True$)
|
||||||
END
|
END
|
||||||
END ELSE
|
END ELSE
|
||||||
obj_Tables('UnlockRec',OtParms)
|
obj_Tables('UnlockRec',OtParms)
|
||||||
|
@ -1730,7 +1730,7 @@ END
|
|||||||
|
|
||||||
* obj_PRS_Stage('Convert',PSNo) ;* Dead JCH 3/11/2013
|
* obj_PRS_Stage('Convert',PSNo) ;* Dead JCH 3/11/2013
|
||||||
// Flush pending index transactions
|
// Flush pending index transactions
|
||||||
Update_Index("PRS_LAYER", "PRS_PROP_KEY", "")
|
Update_Index("PRS_LAYER", "PRS_PROP_KEY", False$, True$)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -2109,3 +2109,4 @@ GetQAMet:
|
|||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,8 +198,8 @@ PostReactItems:
|
|||||||
//obj_Tables('WriteRec',otParms)
|
//obj_Tables('WriteRec',otParms)
|
||||||
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, ReactorLogRec, 1, 0, 1)
|
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, ReactorLogRec, 1, 0, 1)
|
||||||
|
|
||||||
Update_Index('REACT_ITEM_HIST', 'INST_RL_ID', '') ;* Don't wait for indexer - flush pending indexes now
|
Update_Index('REACT_ITEM_HIST', 'INST_RL_ID', False$, True$) ;* Don't wait for indexer - flush pending indexes now
|
||||||
Update_Index('REACT_ITEM_HIST', 'REM_RL_ID', '')
|
Update_Index('REACT_ITEM_HIST', 'REM_RL_ID', False$, True$)
|
||||||
end else
|
end else
|
||||||
Error_Services('Add', ValidationFailureReason)
|
Error_Services('Add', ValidationFailureReason)
|
||||||
end
|
end
|
||||||
@ -299,8 +299,8 @@ UnpostReactItems:
|
|||||||
//obj_Tables('WriteRec',otParms)
|
//obj_Tables('WriteRec',otParms)
|
||||||
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, ReactorLogRec, 1,0,1)
|
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, ReactorLogRec, 1,0,1)
|
||||||
|
|
||||||
Update_Index('REACT_ITEM_HIST', 'REM_RL_ID', '') ;* Don't wait for indexer - flush pending indexes now
|
Update_Index('REACT_ITEM_HIST', 'REM_RL_ID', False$, True$) ;* Don't wait for indexer - flush pending indexes now
|
||||||
Update_Index('REACT_ITEM_HIST', 'INST_RL_ID', '')
|
Update_Index('REACT_ITEM_HIST', 'INST_RL_ID', False$, True$)
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -392,3 +392,4 @@ RETURN
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ Appts:
|
|||||||
// Build list of keys that fall on the three days
|
// Build list of keys that fall on the three days
|
||||||
Keys = ""
|
Keys = ""
|
||||||
Field = "DATE_SPAN_XREF"
|
Field = "DATE_SPAN_XREF"
|
||||||
Update_Index(Table, Field, No$)
|
Update_Index(Table, Field, No$, Yes$)
|
||||||
For i = 0 to 2
|
For i = 0 to 2
|
||||||
Extract_SI_Keys(Table, Field, Date+i, rv)
|
Extract_SI_Keys(Table, Field, Date+i, rv)
|
||||||
Keys<-1> = rv
|
Keys<-1> = rv
|
||||||
@ -271,3 +271,4 @@ Print_Two:
|
|||||||
Next r
|
Next r
|
||||||
Next x
|
Next x
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -3548,10 +3548,10 @@ Service ProcessSQLRequests()
|
|||||||
GoSub ClearCursors
|
GoSub ClearCursors
|
||||||
Sentence = 'SELECT ':Tablename:' WITH RESPONSE_DATE EQ "" BY REQUEST_DATE BY REQUEST_TIME'
|
Sentence = 'SELECT ':Tablename:' WITH RESPONSE_DATE EQ "" BY REQUEST_DATE BY REQUEST_TIME'
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
Update_Index(Tablename, 'REQUEST_DATE', 0)
|
Update_Index(Tablename, 'REQUEST_DATE', False$, True$)
|
||||||
Update_Index(Tablename, 'REQUEST_TIME', 0)
|
Update_Index(Tablename, 'REQUEST_TIME', False$, True$)
|
||||||
Update_Index(Tablename, 'RESPONSE_DATE', 0)
|
Update_Index(Tablename, 'RESPONSE_DATE', False$, True$)
|
||||||
Update_Index(Tablename, 'RESPONSE_TIME', 0)
|
Update_Index(Tablename, 'RESPONSE_TIME', False$, True$)
|
||||||
RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
|
RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
|
||||||
EOF = False$
|
EOF = False$
|
||||||
Loop
|
Loop
|
||||||
@ -3640,3 +3640,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ Bump:
|
|||||||
Table = "WO_MAST_SCHED"
|
Table = "WO_MAST_SCHED"
|
||||||
|
|
||||||
Open Table to hTable then
|
Open Table to hTable then
|
||||||
Update_Index(Table, "DATE_REACT", No$)
|
Update_Index(Table, "DATE_REACT", No$, Yes$)
|
||||||
Extract_SI_Keys(Table, "DATE_REACT", DateReact, Keys)
|
Extract_SI_Keys(Table, "DATE_REACT", DateReact, Keys)
|
||||||
Duration = (Appt<3> - Appt<2>)
|
Duration = (Appt<3> - Appt<2>)
|
||||||
If Noon then Duration -= .5
|
If Noon then Duration -= .5
|
||||||
@ -785,7 +785,7 @@ return
|
|||||||
WO_Status_Colors:
|
WO_Status_Colors:
|
||||||
Color_F = "" ; Color_B = "" ; Color_S = ""
|
Color_F = "" ; Color_B = "" ; Color_S = ""
|
||||||
Begin Case
|
Begin Case
|
||||||
Case Event EQ "Down – No Material" ; Color_F = White$ ; Color_B = "Sienna" ; Color_S = "Offline"
|
Case Event EQ "Down – No Material" ; Color_F = White$ ; Color_B = "Sienna" ; Color_S = "Offline"
|
||||||
Case Event ; Color_F = Black$ ; Color_B = "GoldenRod" ; Color_S = "Offline"
|
Case Event ; Color_F = Black$ ; Color_B = "GoldenRod" ; Color_S = "Offline"
|
||||||
Case WO.Done ; Color_F = Black$ ; Color_B = "Gainsboro" ; Color_S = "Completed"
|
Case WO.Done ; Color_F = Black$ ; Color_B = "Gainsboro" ; Color_S = "Completed"
|
||||||
Case Hot ; Color_F = Black$ ; Color_B = "LightCoral" ; Color_S = "Hot"
|
Case Hot ; Color_F = Black$ ; Color_B = "LightCoral" ; Color_S = "Hot"
|
||||||
@ -855,3 +855,4 @@ Reactor_List:
|
|||||||
Next i
|
Next i
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -506,8 +506,8 @@ Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False, Tr
|
|||||||
WOMatRow<12> = RDSNo ; // Restore the RDS No so the index on RDS_FINAL_SIG will be forced to recalculate with the most recent value.
|
WOMatRow<12> = RDSNo ; // Restore the RDS No so the index on RDS_FINAL_SIG will be forced to recalculate with the most recent value.
|
||||||
WOMatRow<23> = True$ ; // Restore the MakeUp box flag so the index will be forced to recalculate.
|
WOMatRow<23> = True$ ; // Restore the MakeUp box flag so the index will be forced to recalculate.
|
||||||
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False, True$)
|
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False, True$)
|
||||||
call Update_Index('WO_MAT', 'MU_PART_NO', False$)
|
call Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
|
||||||
call Update_Index('WO_MAT', 'CURR_STATUS', False$)
|
call Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -950,3 +950,4 @@ Debug
|
|||||||
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,6 +94,24 @@ $Insert PS_EQUATES
|
|||||||
* $INSERT PRINTSETUP_EQUATES
|
* $INSERT PRINTSETUP_EQUATES
|
||||||
* equ REV_CREATE_ENGINE_NO_UI$ to 0x040
|
* equ REV_CREATE_ENGINE_NO_UI$ to 0x040
|
||||||
|
|
||||||
|
Main:
|
||||||
|
debug
|
||||||
|
Recipients = ''
|
||||||
|
SentFrom = @USER4
|
||||||
|
|
||||||
|
SendToGroup = 'RDS_HOLD' : @VM : 'FI_SUPPORT'
|
||||||
|
|
||||||
|
Subject = 'Testing 2'
|
||||||
|
Message = 'Testing 1234'
|
||||||
|
AttachWindow = ''
|
||||||
|
AttachKey = ''
|
||||||
|
|
||||||
|
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||||
|
obj_Notes('Create',Parms)
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
* Main:
|
* Main:
|
||||||
* debug
|
* debug
|
||||||
* Open 'LSL_USERS' to hTable then
|
* Open 'LSL_USERS' to hTable then
|
||||||
@ -203,3 +221,4 @@ Main2:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ Service ChangeToolMode(ToolID, NewMode, NewReason, CurrUser, ForceModeChange)
|
|||||||
// Close old mode record
|
// Close old mode record
|
||||||
// Don't wait for the indexer. Flush pending index transactions BEFORE reading
|
// Don't wait for the indexer. Flush pending index transactions BEFORE reading
|
||||||
// the Tool CURR_MODE_KEY.
|
// the Tool CURR_MODE_KEY.
|
||||||
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$)
|
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$, True$)
|
||||||
// Get Current Mode - There should only be one key, but we will verify before proceeding.
|
// Get Current Mode - There should only be one key, but we will verify before proceeding.
|
||||||
CurrModeKeys = Xlate('TOOL', ToolID, TOOL_CURR_MODE_KEY$, 'X')
|
CurrModeKeys = Xlate('TOOL', ToolID, TOOL_CURR_MODE_KEY$, 'X')
|
||||||
// CurrModeKey will be set within the following GoSub
|
// CurrModeKey will be set within the following GoSub
|
||||||
@ -313,10 +313,10 @@ VerifyCurrModeIndex:
|
|||||||
StopDtm = ToolLogRec<TOOL_LOG_STOP_DTM$>
|
StopDtm = ToolLogRec<TOOL_LOG_STOP_DTM$>
|
||||||
ToolLogRec<TOOL_LOG_STOP_DTM$> = ''
|
ToolLogRec<TOOL_LOG_STOP_DTM$> = ''
|
||||||
Database_Services('WriteDataRow', 'TOOL_LOG', CurrModeKey, ToolLogRec, True$, False$, True$)
|
Database_Services('WriteDataRow', 'TOOL_LOG', CurrModeKey, ToolLogRec, True$, False$, True$)
|
||||||
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$)
|
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$, True$)
|
||||||
ToolLogRec<TOOL_LOG_STOP_DTM$> = StopDtm
|
ToolLogRec<TOOL_LOG_STOP_DTM$> = StopDtm
|
||||||
Database_Services('WriteDataRow', 'TOOL_LOG', CurrModeKey, ToolLogRec, True$, False$, True$)
|
Database_Services('WriteDataRow', 'TOOL_LOG', CurrModeKey, ToolLogRec, True$, False$, True$)
|
||||||
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$)
|
Update_Index('TOOL_LOG', 'TOOL_CURR_MODE', False$, True$)
|
||||||
Next CurrModeKey
|
Next CurrModeKey
|
||||||
|
|
||||||
// The index should be healthy now and we should only have one key.
|
// The index should be healthy now and we should only have one key.
|
||||||
@ -328,3 +328,4 @@ VerifyCurrModeIndex:
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -409,3 +409,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ Open:
|
|||||||
|
|
||||||
// Update indexes
|
// Update indexes
|
||||||
Wait = SRP_Wait("Init", "Scheduler Load":@RM:"Updating indexes...")
|
Wait = SRP_Wait("Init", "Scheduler Load":@RM:"Updating indexes...")
|
||||||
Update_Index(Table, "SCHED_DT", No$)
|
Update_Index(Table, "SCHED_DT", No$, Yes$)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@ -286,3 +286,4 @@ Check_Pace:
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
|
|
||||||
|
25
LSL2/STPROCINS/NOTES_EQUATES.txt
Normal file
25
LSL2/STPROCINS/NOTES_EQUATES.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
compile insert NOTES_EQUATES
|
||||||
|
* Equates for NOTES created on 10/16/2024 11:02AM
|
||||||
|
|
||||||
|
Equ NOTES_MESSAGE_TYPE$ to 1
|
||||||
|
equ NOTES_ENTRY_DATE$ to 2
|
||||||
|
equ NOTES_ENTRY_TIME$ to 3
|
||||||
|
equ NOTES_SEND_TO$ to 4
|
||||||
|
equ NOTES_FROM$ to 5
|
||||||
|
equ NOTES_COMPANY$ to 6
|
||||||
|
equ NOTES_PHONE$ to 7
|
||||||
|
equ NOTES_INTL_PHONE$ to 8
|
||||||
|
equ NOTES_MESSAGE$ to 9
|
||||||
|
equ NOTES_ENTRY_ID$ to 10
|
||||||
|
equ NOTES_PT_PHONED$ to 11
|
||||||
|
equ NOTES_PT_CALL_BACK$ to 12
|
||||||
|
equ NOTES_PT_RET_CALL$ to 13
|
||||||
|
equ NOTES_PT_WANTS_SEE$ to 14
|
||||||
|
equ NOTES_PT_WILL_CALL$ to 15
|
||||||
|
equ NOTES_PT_WAS_IN$ to 16
|
||||||
|
equ NOTES_PT_URGENT$ to 17
|
||||||
|
equ NOTES_SUBJECT$ to 18
|
||||||
|
equ NOTES_ATTACH_WINDOW$ to 19
|
||||||
|
equ NOTES_ATTACH_KEYS$ to 20 ;* Not used anymore
|
||||||
|
equ NOTES_ATTACH_KEY$ to 20
|
||||||
|
equ NOTES_MSG_GROUPS_IDS$ to 21
|
12
LSL2/STPROCINS/NOTES_QUEUE_EQUATES.txt
Normal file
12
LSL2/STPROCINS/NOTES_QUEUE_EQUATES.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
compile insert NOTES_QUEUE_EQUATES
|
||||||
|
/*----------------------------------------
|
||||||
|
Author : Table Create Insert Routine
|
||||||
|
Written : 16/10/2024
|
||||||
|
Description : Insert for Table NOTES_QUEUE
|
||||||
|
----------------------------------------*/
|
||||||
|
#ifndef __NOTES_QUEUE_EQUATES__
|
||||||
|
#define __NOTES_QUEUE_EQUATES__
|
||||||
|
|
||||||
|
equ NOTES_QUEUE.NOTES_ID$ to 1
|
||||||
|
|
||||||
|
#endif
|
14
LSL2/STPROCINS/NOTE_PTRS_EQUATES.txt
Normal file
14
LSL2/STPROCINS/NOTE_PTRS_EQUATES.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
compile insert NOTE_PTRS_EQUATES
|
||||||
|
* Equates for NOTE_PTRS created on 08/03/95 07:31AM
|
||||||
|
|
||||||
|
Equ NOTE_PTRS_SUBJECT$ to 1
|
||||||
|
Equ NOTE_PTRS_FROM$ to 2
|
||||||
|
Equ NOTE_PTRS_DATE$ to 3
|
||||||
|
Equ NOTE_PTRS_TIME$ to 4
|
||||||
|
Equ NOTE_PTRS_NEW$ to 5
|
||||||
|
Equ NOTE_PTRS_ATTACHMENT$ to 6
|
||||||
|
Equ NOTE_PTRS_NOTE_IDS$ to 7
|
||||||
|
Equ NOTE_PTRS_ARCHIVED$ to 8
|
||||||
|
Equ NOTE_PTRS_SNOOZE$ to 9
|
||||||
|
|
||||||
|
|
@ -9,3 +9,6 @@ compile insert NOTIFICATION_EQUATES
|
|||||||
Equ NOTIFICATION_NOTIFY_ID$ To 0
|
Equ NOTIFICATION_NOTIFY_ID$ To 0
|
||||||
Equ NOTIFICATION_DESC$ To 1
|
Equ NOTIFICATION_DESC$ To 1
|
||||||
Equ NOTIFICATION_USER_ID$ To 2
|
Equ NOTIFICATION_USER_ID$ To 2
|
||||||
|
Equ NOTIFICATION_USE_ACTIVE_DIRECTORY$ To 3
|
||||||
|
Equ NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$ To 4
|
||||||
|
Equ NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$ To 5
|
||||||
|
@ -666,7 +666,6 @@ Service SearchIndex(TableName, ColumnName, SearchValue, UpdateIndex)
|
|||||||
|
|
||||||
ServiceKeyID := '*' : TableName : '*' : ColumnName : '*' : SearchValue
|
ServiceKeyID := '*' : TableName : '*' : ColumnName : '*' : SearchValue
|
||||||
ServiceKeyID = SRP_Encode(ServiceKeyID, 'BASE64')
|
ServiceKeyID = SRP_Encode(ServiceKeyID, 'BASE64')
|
||||||
* KeyIDList = Memory_Services('GetValue', ServiceKeyID, True$, 5)
|
|
||||||
KeyIDList = ''
|
KeyIDList = ''
|
||||||
|
|
||||||
If TableName NE '' AND ColumnName NE '' AND SearchValue NE '' then
|
If TableName NE '' AND ColumnName NE '' AND SearchValue NE '' then
|
||||||
@ -674,7 +673,7 @@ Service SearchIndex(TableName, ColumnName, SearchValue, UpdateIndex)
|
|||||||
DictTableHandle = Database_Services('GetTableHandle', 'DICT.' : TableName)
|
DictTableHandle = Database_Services('GetTableHandle', 'DICT.' : TableName)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
If UpdateIndex then Update_Index(TableName, ColumnName 0)
|
If UpdateIndex then Update_Index(TableName, ColumnName, False$, True$)
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
Flag = ''
|
Flag = ''
|
||||||
Btree.Extract(ColumnName : @VM : SearchValue : @FM, Tablename, DictTableHandle, KeyIDList, 'S', Flag)
|
Btree.Extract(ColumnName : @VM : SearchValue : @FM, Tablename, DictTableHandle, KeyIDList, 'S', Flag)
|
||||||
@ -1045,3 +1044,4 @@ end service
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3548,10 +3548,10 @@ Service ProcessSQLRequests()
|
|||||||
GoSub ClearCursors
|
GoSub ClearCursors
|
||||||
Sentence = 'SELECT ':Tablename:' WITH RESPONSE_DATE EQ "" BY REQUEST_DATE BY REQUEST_TIME'
|
Sentence = 'SELECT ':Tablename:' WITH RESPONSE_DATE EQ "" BY REQUEST_DATE BY REQUEST_TIME'
|
||||||
Set_Status(0)
|
Set_Status(0)
|
||||||
Update_Index(Tablename, 'REQUEST_DATE', 0)
|
Update_Index(Tablename, 'REQUEST_DATE', False$, True$)
|
||||||
Update_Index(Tablename, 'REQUEST_TIME', 0)
|
Update_Index(Tablename, 'REQUEST_TIME', False$, True$)
|
||||||
Update_Index(Tablename, 'RESPONSE_DATE', 0)
|
Update_Index(Tablename, 'RESPONSE_DATE', False$, True$)
|
||||||
Update_Index(Tablename, 'RESPONSE_TIME', 0)
|
Update_Index(Tablename, 'RESPONSE_TIME', False$, True$)
|
||||||
RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
|
RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
|
||||||
EOF = False$
|
EOF = False$
|
||||||
Loop
|
Loop
|
||||||
@ -3640,3 +3640,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,24 +1,26 @@
|
|||||||
Compile Subroutine Temp(dummy)
|
Compile Subroutine Temp(dummy)
|
||||||
|
Declare Function datetime
|
||||||
Debug
|
Debug
|
||||||
|
|
||||||
Open 'SYSENV' To hSysenv Then
|
dt = datetime()
|
||||||
Open 'TEMP_SYSENV' To hNewSysenv Then
|
|
||||||
Select hSysenv
|
*Open 'SYSENV' To hSysenv Then
|
||||||
EOF = 0
|
* Open 'TEMP_SYSENV' To hNewSysenv Then
|
||||||
Loop
|
* Select hSysenv
|
||||||
Readnext Key Else EOF = 1
|
* EOF = 0
|
||||||
Until EOF
|
* Loop
|
||||||
//If IndexC(Key, 'SRP', 1) then
|
* Readnext Key Else EOF = 1
|
||||||
Read Rec From hSysenv, Key Then
|
* Until EOF
|
||||||
Write Rec To hNewSysenv, Key Else
|
* //If IndexC(Key, 'SRP', 1) then
|
||||||
Debug
|
* Read Rec From hSysenv, Key Then
|
||||||
end
|
* Write Rec To hNewSysenv, Key Else
|
||||||
End
|
* Debug
|
||||||
//end
|
* end
|
||||||
Repeat
|
* End
|
||||||
End
|
* //end
|
||||||
End
|
* Repeat
|
||||||
|
* End
|
||||||
|
*End
|
||||||
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user