Merged PR 16672: updated 5S form and PM History form to fit longer descriptions
updated 5S form and PM History form to fit longer descriptions Related work items: #110769
This commit is contained in:
@ -1,8 +1,38 @@
|
||||
Compile function NDW_5S_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_5S_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)
|
||||
05/14/2025 djs Modified edit table properties to fit longer descriptions
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_5S
|
||||
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert PM_EQUATES
|
||||
@ -21,7 +51,6 @@ EQU COL$SCHED_START TO 5
|
||||
EQU COL$LATE_START TO 6
|
||||
EQU COL$ACTION TO 7
|
||||
|
||||
|
||||
// Form colors
|
||||
EQU RED$FIVES TO '5924072'
|
||||
EQU GREEN$FIVES TO '7596927'
|
||||
@ -34,11 +63,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
|
||||
@ -79,8 +108,11 @@ Event CHK_ARCHIVED.CLICK()
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event CMB_AREA.CHANGED(NewData)
|
||||
|
||||
GoSub GetKeys
|
||||
|
||||
end event
|
||||
|
||||
|
||||
@ -144,9 +176,9 @@ Event EDT_5S_TABLE.OnButtonClick(Cell, Point, Button, Shift, Ctrl)
|
||||
GoSub GetKeys
|
||||
end
|
||||
Case ColClicked EQ COL$PM_ID
|
||||
|
||||
Null
|
||||
Case Otherwise$
|
||||
|
||||
Null
|
||||
End Case
|
||||
|
||||
end event
|
||||
@ -169,20 +201,12 @@ Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
|
||||
|
||||
Start_Window('NDW_PM_HISTORY', @Window, PMSID)
|
||||
Case Otherwise$
|
||||
|
||||
Null
|
||||
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, '')
|
||||
@ -217,11 +241,12 @@ end event
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GetKeys:
|
||||
|
||||
ShowArchived = Get_Property(@Window : '.CHK_ARCHIVED', 'CHECK')
|
||||
SelectedArea = Get_Property(@Window : '.CMB_AREA', 'TEXT')
|
||||
|
||||
FiveSPMKeys = Pm_Services('Get5SPMs', ShowArchived, SelectedArea)
|
||||
|
||||
|
||||
FormatData:
|
||||
|
||||
TableData = ''
|
||||
@ -250,17 +275,17 @@ FormatData:
|
||||
TableData<tPos, COL$LATE_START> = LateStarts
|
||||
Next PMKey
|
||||
|
||||
|
||||
PopulateTable:
|
||||
|
||||
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
|
||||
TableData = SRP_Array("Rotate", TableData)
|
||||
Set_Property(EdtTableCtrl, "OLE.ARRAY", TableData)
|
||||
//Set last column in row to a PUB
|
||||
// Set last column in row to a PUB
|
||||
Set_Property(EdtTableCtrl, "OLE.CellType[7; ALL]", "Push Button")
|
||||
Set_Property(EdtTableCtrl, "OLE.CellText[7; ALL]", "Click To Complete")
|
||||
Set_Property(EdtTableCtrl, "OLE.CellImage[7; ALL]", 1)
|
||||
|
||||
//Get All Cell Settings
|
||||
// Get All Cell Settings
|
||||
ColumnSettings = Get_Property(EdtTableCtrl, "OLE.CellType[3; ALL]")
|
||||
ColumnSettings<2,3> = 0; *Turns off data from cell 7 of each row.
|
||||
Set_Property(EdtTableCtrl, "OLE.CellType[7; ALL]", ColumnSettings)
|
||||
@ -268,7 +293,7 @@ PopulateTable:
|
||||
|
||||
ColorCodeRows:
|
||||
|
||||
//Here we color code all the rows based on whether they're not due, due, or overdue.
|
||||
// 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)
|
||||
CurrDTM = SRP_Datetime('Now')
|
||||
@ -318,7 +343,6 @@ SetupForm:
|
||||
Set_Property(@Window : '.PUB_ADD_NEW_PM_SPEC', 'VISIBLE', 0)
|
||||
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'VISIBLE', 0)
|
||||
end
|
||||
|
||||
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
|
||||
|
||||
return
|
||||
@ -327,51 +351,44 @@ return
|
||||
Setup_OLE_Controls:
|
||||
|
||||
EdtTableCtrl = @Window : '.EDT_5S_TABLE'
|
||||
//Row Selection Settings
|
||||
// Row Selection Settings
|
||||
RowSelArray = Get_Property(EdtTableCtrl, "OLE.SelectionStyle")
|
||||
RowSelArray<7> = 'Header'
|
||||
RowSelArray<8> = True$;*Always show row selection
|
||||
Set_Property(EdtTableCtrl, "OLE.SelectionStyle", RowSelArray)
|
||||
Set_Property(EdtTableCtrl, 'OLE.Redraw', False$)
|
||||
//Set up columns
|
||||
// Set up columns
|
||||
Set_Property(EdtTableCtrl, "OLE.Dimension", 7);*Define number of columns
|
||||
|
||||
HeaderTitles = 'PM ID':@VM:'Desc':@VM:'Last PM':@VM:'Early Start':@VM:'Sched Start':@VM:'Late Start':@VM:'Action'; *Define the column header titles
|
||||
Set_Property(EdtTableCtrl, "OLE.TitleList", HeaderTitles); *Set the column titles
|
||||
|
||||
//Set the column Sizes
|
||||
// Set the column Sizes
|
||||
Set_Property(EdtTableCtrl, "OLE.HeaderColumn[1]", '':@FM:False$)
|
||||
ColSize = Get_Property(EdtTableCtrl, "OLE.DataColumn[1]")
|
||||
|
||||
//Column 1
|
||||
// Column 1
|
||||
ColSize<1> = 45
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$PM_ID:"]", ColSize)
|
||||
|
||||
//Column 2
|
||||
ColSize<1> = 160
|
||||
//ColSize<4> = True$
|
||||
// Column 2
|
||||
ColSize<1> = 200
|
||||
ColSize<4> = True$
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$DESC:"]", ColSize)
|
||||
//Set_Property(Ctrl, "OLE.DataColumn[":COL$ELAP_HRS:"]", ColSize)
|
||||
|
||||
//Column 3
|
||||
ColSize<4> = False$
|
||||
// Column 3
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$LAST_PM:"]", ColSize)
|
||||
|
||||
//Column 4
|
||||
// Column 4
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$EARLY_START:"]", ColSize)
|
||||
|
||||
//Column 5
|
||||
// Column 5
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$SCHED_START:"]", ColSize)
|
||||
|
||||
//Column 6
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$LATE_START:"]", ColSize)
|
||||
|
||||
//Column 7
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$ACTION:"]", ColSize)
|
||||
|
||||
Set_Property(EdtTableCtrl, 'OLE.Border', 'XP Flat')
|
||||
Set_Property(EdtTableCtrl, 'OLE.Font', 'Segoe UI' : @SVM : '15')
|
||||
Set_Property(EdtTableCtrl, "OLE.CellProtection[All; All]", 'RO')
|
||||
@ -388,5 +405,3 @@ Setup_OLE_Controls:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -1,10 +1,41 @@
|
||||
Compile function NDW_PM_HISTORY_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_PM_History_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)
|
||||
05/14/2025 djs Modified edit table properties to fit longer descriptions
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_PM_HISTORY
|
||||
|
||||
Declare function Get_Property, Obj_Pm_Spec, Database_Services, SRP_Array, SRP_Datetime, Utility, OConv, Datetime
|
||||
Declare subroutine Set_Property, Send_Message, Msg
|
||||
Declare subroutine Set_Property, Send_Message, Msg, PlaceDialog
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert PM_EQUATES
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
@ -17,6 +48,19 @@ EQU COL$DATEDUE to 4
|
||||
EQU COL$LATE to 5
|
||||
EQU COL$USER to 6
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
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
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
@ -35,12 +79,17 @@ Event WINDOW.CREATE(CreateParam)
|
||||
IF PMSpecID NE '' then
|
||||
GoSub RunReport
|
||||
end
|
||||
PlaceDialog(-2, -2)
|
||||
|
||||
End Event
|
||||
|
||||
Event PUB_SEARCH.CLICK()
|
||||
|
||||
GoSub RunReport
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_EXPORT_TO_EXCEL.CLICK()
|
||||
PmsId = Get_Property(@Window : '.EDL_PM_SPEC', 'TEXT')
|
||||
If PmsId NE '' then
|
||||
@ -80,8 +129,6 @@ Event PUB_EXPORT_TO_EXCEL.CLICK()
|
||||
End
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end event
|
||||
|
||||
@ -96,41 +143,53 @@ RunReport:
|
||||
PMDescription = XLATE('PM_SPEC', PMSpecId, PM_SPEC_DESC$, 'X')
|
||||
PMHistory = obj_pm_spec('GetHistory', PMSpecId);*Returns list of PM Keys delimited by @VM
|
||||
PMHistoryArray = ''
|
||||
for each PMId in PMHistory using @VM setting pPos
|
||||
Def = ""
|
||||
Def<MCAPTION$> = "Loading PM History..."
|
||||
Def<MTYPE$ > = "GC"
|
||||
Def<MEXTENT$ > = DCount(PMHistory, @VM)
|
||||
MsgUp = Msg(@window, Def)
|
||||
For each PMId in PMHistory using @VM setting pPos
|
||||
PMRec = Database_Services('ReadDataRow', 'PM', PMId)
|
||||
SchedDtm = SRP_Datetime('Combine', PMRec<PM_SCHED_DT$>, PMRec<PM_SCHED_TM$>)
|
||||
DueByDTM = obj_PM_Spec('LateStart',PMId:@RM:PMSpecRecord)
|
||||
Late = Xlate('PM', PMId, 'LATE', 'X')
|
||||
If Late then Late = 'Yes' else Late = 'No'
|
||||
|
||||
PMHistoryArray<pPos, COL$PMID> = PMId
|
||||
PMHistoryArray<pPos, COL$DESC> = PMDescription
|
||||
PMHistoryArray<pPos, COL$DATECOMP> = OCONV(PMRec<PM_COMP_DTM$>, 'DT')
|
||||
PMHistoryArray<pPos, COL$DATEDUE> = OCONV(SchedDtm, 'DT')
|
||||
PMHistoryArray<pPos, COL$LATE> = Late
|
||||
PMHistoryArray<pPos, COL$USER> = PMRec<PM_COMP_BY$>
|
||||
PMHistoryArray<pPos, COL$USER> = OConv(PMRec<PM_COMP_BY$>, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||
While Msg(@window, MsgUp, pPos, MSGINSTUPDATE$) ; * update the gauge and check if cancel was pressed
|
||||
Next PMId
|
||||
Msg(@window, MsgUp) ;* take down the gauge
|
||||
PMHistoryArray = SRP_Array('Rotate',PMHistoryArray)
|
||||
PMHistoryArray = SRP_Array('SortRows', PMHistoryArray, 'D1', 'ARRAY', '', '')
|
||||
Set_Property(@Window : '.OLE_HIST_TABLE', "OLE.ARRAY", PMHistoryArray)
|
||||
|
||||
return
|
||||
|
||||
|
||||
ColorCode:
|
||||
|
||||
PMHistoryArray = Get_Property(@Window : '.OLE_HIST_TABLE', "OLE.ARRAY")
|
||||
PMHistoryArray = SRP_Array('Rotate',PMHistoryArray)
|
||||
|
||||
return
|
||||
|
||||
|
||||
SETUP_CONTROLS:
|
||||
|
||||
Set_Property(@Window : '.EDL_PM_SPEC', 'TEXT', PMSpecID)
|
||||
GoSub Setup_OLE_Controls
|
||||
|
||||
return
|
||||
|
||||
SETUP_CONTROLS:
|
||||
Set_Property(@Window : '.EDL_PM_SPEC', 'TEXT', PMSpecID)
|
||||
GoSub Setup_OLE_Controls
|
||||
return
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
EdtTableCtrl = @Window : '.OLE_HIST_TABLE'
|
||||
Set_Property(EdtTableCtrl, 'OLE.Redraw', False$)
|
||||
Set_Property(EdtTableCtrl, 'OLE.Redraw', False$)
|
||||
//Set up columns
|
||||
Set_Property(EdtTableCtrl, "OLE.Dimension", 6);*Define number of columns
|
||||
|
||||
@ -138,39 +197,32 @@ Setup_OLE_Controls:
|
||||
Set_Property(EdtTableCtrl, "OLE.TitleList", HeaderTitles); *Set the column titles
|
||||
|
||||
//Set the column Sizes
|
||||
ColSize = Get_Property(EdtTableCtrl, "OLE.DataColumn[1]")
|
||||
Set_Property(EdtTableCtrl, "OLE.HeaderColumn[1]", '':@FM:False$)
|
||||
ColSize = Get_Property(EdtTableCtrl, "OLE.DataColumn[1]")
|
||||
//Column 1
|
||||
ColSize<1> = 45
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$PMID:"]", ColSize)
|
||||
//Column 2
|
||||
ColSize<1> = 45
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$PMID:"]", ColSize)
|
||||
ColSize<1> = 200
|
||||
ColSize<4> = True$
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$DESC:"]", ColSize)
|
||||
ColSize<4> = False$
|
||||
//Column 3
|
||||
ColSize<1> = 160
|
||||
ColSize<1> = 120
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$DATECOMP:"]", ColSize)
|
||||
//Column 4
|
||||
ColSize<1> = 110
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$DATEDUE:"]", ColSize)
|
||||
//Column 5
|
||||
ColSize<1> = 110
|
||||
ColSize<1> = 50
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$LATE:"]", ColSize)
|
||||
//Column 6
|
||||
ColSize<1> = 110
|
||||
ColSize<1> = 160
|
||||
Set_Property(EdtTableCtrl, "OLE.DataColumn[":COL$USER:"]", ColSize)
|
||||
|
||||
Set_Property(EdtTableCtrl, 'OLE.Border', 'XP Flat')
|
||||
Set_Property(EdtTableCtrl, 'OLE.Font', 'Segoe UI' : @SVM : '15')
|
||||
Set_Property(EdtTableCtrl, "OLE.CellProtection[All; All]", 'RO')
|
||||
|
||||
// Set rows to resizeable and to expand when selected.
|
||||
//DataRow = Get_Property(EdtTableCtrl, "OLE.DataRow[1]")
|
||||
//DataRow<3> = True$
|
||||
//DataRow<4> = False$
|
||||
//DataRow<5> = 160
|
||||
|
||||
|
||||
//Set_Property(EdtTableCtrl, "OLE.DataRow[All]", DataRow)
|
||||
|
||||
Set_Property(EdtTableCtrl, 'OLE.Redraw', True$)
|
||||
|
||||
// Qualify OLE events that we want to intercept
|
||||
@ -179,6 +231,6 @@ Setup_OLE_Controls:
|
||||
Qualifier<4> = 0 ; * process synchronously (i.e. immediately)
|
||||
Send_Message(EdtTableCtrl, 'QUALIFY_EVENT', 'OLE.OnButtonClick', Qualifier)
|
||||
Send_Message(EdtTableCtrl, 'QUALIFY_EVENT', 'OLE.OnDblClick', Qualifier)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user