pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -10,7 +10,7 @@ $Insert MSG_EQUATES
Declare function Get_Property, Pm_Services, obj_PM_Spec, Database_Services, SRP_Array, SRP_Datetime, Msg, Datetime
Declare function Memberof
Declare subroutine Set_Property, Pm_Services, Start_Window, Obj_Appwindow
Declare subroutine Set_Property, Pm_Services, Start_Window, Obj_Appwindow, PlaceDialog
// Columns in OLE Edit Table
EQU COL$PM_ID TO 1
@ -34,11 +34,11 @@ If Event EQ 'OLE' then
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
* Transfer Param4 to Param3
* Transfer Param5 to Param4
* Transfer Param6 to Param5
* Transfer Param7 to Param6
* Transfer Param8 to Param7
* Transfer Param4 to Param3
* Transfer Param5 to Param4
* Transfer Param6 to Param5
* Transfer Param7 to Param6
* Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntId else
@ -52,25 +52,36 @@ Return EventFlow or 1
//-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam)
GoSub Setup_OLE_Controls
GoSub SetupForm
GoSub Setup_OLE_Controls
GoSub SetupForm
GoSub GetKeys
stat = Set_Property(@WINDOW,'TIMER',10000:@FM:0) ;
stat = Set_Property(@WINDOW,'TIMER',10000:@FM:0)
PlaceDialog(-2, -2)
End Event
Event CHK_ARCHIVED.CLICK()
GoSub GetKeys
end event
Event EDT_5S_TABLE.OnClick(Cell, Point, Button, Shift, Ctrl)
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
RowClicked = Field(Cell, ';' , 2)
SelArray = 1 : @FM : RowClicked
Set_Property(@Window: '.EDT_SEL_ROW', "TEXT", RowClicked)
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 1)
end event
Event EDT_5S_TABLE.OnButtonClick(Cell, Point, Button, Shift, Ctrl)
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
TableData = Get_Property(EdtTableCtrl, "OLE.ARRAY")
TableData = SRP_Array("Rotate", TableData)
@ -118,14 +129,16 @@ Event EDT_5S_TABLE.OnButtonClick(Cell, Point, Button, Shift, Ctrl)
GoSub GetKeys
end
Case ColClicked EQ COL$PM_ID
Case Otherwise$
Case 1
End Case
end event
Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
TableData = Get_Property(EdtTableCtrl, "OLE.ARRAY")
TableData = SRP_Array("Rotate", TableData)
@ -140,22 +153,30 @@ Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
CurrPMId = PMSRec<PM_SPEC_PM_KEYS$, 1>
Start_Window('NDW_PM_HISTORY', @Window, PMSID)
Case 1
Case Otherwise$
End Case
end event
Event EDT_5S_TABLE.OnLostFocus()
//Set_Property(@Window : '.EDT_SEL_ROW', 'TEXT', ''); *Clear out selected row.
//Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
end event
Event PUB_ADD_NEW_PM_SPEC.CLICK()
Start_Window('PM_SPEC', @Window, '')
end event
Event PUB_VIEW_SELECTED.CLICK()()
Event PUB_VIEW_SELECTED.CLICK()
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
RowSelected = Get_Property(@Window : '.EDT_SEL_ROW', 'TEXT')
TableData = Get_Property(EdtTableCtrl, "OLE.ARRAY")
@ -166,12 +187,14 @@ Event PUB_VIEW_SELECTED.CLICK()()
if SelectedPmsKey NE '' then
obj_AppWindow('ViewRelated','PM_SPEC':@RM:SelectedPmsKey)
end
end event
Event WINDOW.TIMER()
GoSub GetKeys
end event
//-----------------------------------------------------------------------------
@ -179,38 +202,39 @@ end event
//-----------------------------------------------------------------------------
GetKeys:
//Step 1: Check if the archived button is set
ShowArchived = Get_Property(@Window : '.CHK_ARCHIVED', 'CHECK')
//Step 2: Get the 5S keys, passing the Show Archived variable
FiveSPMKeys = Pm_Services('Get5SPMs', ShowArchived)
FormatData:
TableData = ''
For each PMKey in FiveSPMKeys using @VM setting tPos
//Record for the PM Specification
PMSpecRecord = Database_Services('ReadDataRow', 'PM_SPEC', PMKey)
//Record for the currently scheduled PM for the specificed PM Spec.
CurrPMKey = PMSpecRecord<PM_SPEC_PM_KEYS$>
CurrPMRecord = Database_Services('ReadDataRow', 'PM', CurrPMKey)
CurrPMDesc = PMSpecRecord<PM_SPEC_DESC$>
CurrPMLastPM = OCONV(XLate('PM_SPEC', PMKey, 'LAST_PM_DTM', 'X'), 'DT')
//Sched Calculation
CurrPMSchedDT = CurrPMRecord<PM_SCHED_DT$>
CurrPMSchedTM = CurrPMRecord<PM_SCHED_TM$>
SchedStarts = obj_PM_Spec('SchedStart',PMKey:@RM:PMSpecRecord)
EarlyStarts = obj_PM_Spec('EarlyStart',PMKey:@RM:PMSpecRecord)
LateStarts = obj_PM_Spec('LateStart',PMKey:@RM:PMSpecRecord)
TableData = ''
TableData<tPos, COL$PM_ID> = PMKey
TableData<tPos, COL$DESC> = CurrPMDesc
TableData<tPos, COL$LAST_PM> = CurrPMLastPM
TableData<tPos, COL$EARLY_START> = EarlyStarts
TableData<tPos, COL$SCHED_START> = SchedStarts
TableData<tPos, COL$LATE_START> = LateStarts
Next PMKey
For each PMKey in FiveSPMKeys using @VM setting tPos
//Record for the PM Specification
PMSpecRecord = Database_Services('ReadDataRow', 'PM_SPEC', PMKey)
//Record for the currently scheduled PM for the specificed PM Spec.
CurrPMKey = PMSpecRecord<PM_SPEC_PM_KEYS$>
CurrPMRecord = Database_Services('ReadDataRow', 'PM', CurrPMKey)
CurrPMDesc = PMSpecRecord<PM_SPEC_DESC$>
CurrPMLastPM = OConv(PMSpecRecord<PM_SPEC_LAST_PM_COMP_DTM$>, 'DT')
//Sched Calculation
CurrPMSchedDT = CurrPMRecord<PM_SCHED_DT$>
CurrPMSchedTM = CurrPMRecord<PM_SCHED_TM$>
SchedStarts = obj_PM_Spec('SchedStart',PMKey:@RM:PMSpecRecord)
EarlyStarts = obj_PM_Spec('EarlyStart',PMKey:@RM:PMSpecRecord)
LateStarts = obj_PM_Spec('LateStart',PMKey:@RM:PMSpecRecord)
TableData<tPos, COL$PM_ID> = PMKey
TableData<tPos, COL$DESC> = CurrPMDesc
TableData<tPos, COL$LAST_PM> = CurrPMLastPM
TableData<tPos, COL$EARLY_START> = EarlyStarts
TableData<tPos, COL$SCHED_START> = SchedStarts
TableData<tPos, COL$LATE_START> = LateStarts
Next PMKey
PopulateTable:
@ -228,11 +252,8 @@ PopulateTable:
Set_Property(EdtTableCtrl, "OLE.CellType[7; ALL]", ColumnSettings)
ColorCodeRows:
//Here we color code all the rows based on whether they're not due, due, or overdue.
TableData = Get_Property(EdtTableCtrl, "OLE.ARRAY")
TableData = SRP_Array('Rotate', TableData)
@ -276,6 +297,7 @@ ColorCodeRows:
return
SetupForm:
If NOT(Memberof(@User4, 'SUPERVISOR')) then
@ -284,9 +306,12 @@ SetupForm:
end
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
return
Setup_OLE_Controls:
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
//Row Selection Settings
RowSelArray = Get_Property(EdtTableCtrl, "OLE.SelectionStyle")
@ -346,8 +371,7 @@ Setup_OLE_Controls:
Send_Message(EdtTableCtrl, 'QUALIFY_EVENT', 'OLE.OnButtonClick', Qualifier)
Send_Message(EdtTableCtrl, 'QUALIFY_EVENT', 'OLE.OnDblClick', Qualifier)
Send_Message(EdtTableCtrl, 'QUALIFY_EVENT', 'OLE.OnLostFocus', Qualifier)
return