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

@ -27,6 +27,7 @@ Function NDW_RDS_Supplement_Events(CtrlEntId, Event, @PARAMS)
History : (Date, Initials, Notes)
05/23/18 djs Created initial commuter module.
06/13/24 djm Modify for new stage-specific supplement system.
***********************************************************************************************************************/
@ -37,24 +38,27 @@ $insert APP_INSERTS
$insert EVENT_SETUP
$insert WO_MAT_EQUATES
$insert MSG_EQUATES
$Insert SUPPLEMENTS_EQUATES
Declare subroutine SRP_EditTable_Manager, SRP_Show_Window, Rds_Services
Declare function SRP_EditTable_Manager, Database_Services, Material_Services, Rds_Services, RGB
Declare subroutine SRP_EditTable_Manager, SRP_Show_Window, Rds_Services, Supplement_Services, RList, SRP_Stopwatch
Declare function SRP_EditTable_Manager, Database_Services, Material_Services, Rds_Services, RGB, Supplement_Services
CRLF = \0D0A\
SubclassInfo = Form_Services('FindSubclassControl')
Subclass = SubclassInfo<1>
// 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
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
@ -67,150 +71,164 @@ Return EventFlow else EVENT_CONTINUE$
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Event WINDOW.CREATE(CreateParam)
ThisWorkOrderNo = CreateParam
RDSList = RDS_Services('GetRDSList', ThisWorkOrderNo)
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
GoSub Setup_OLE_Controls
// Turn off AutoPopulate for performance reasons
Set_Property(@Window, RDSRptCtrl, 'OLE.AutoPopulate', False$)
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
// Turn AutoPopulate back on
Set_Property(@Window, RDSRptCtrl, 'OLE.AutoPopulate', True$)
RDSColumns = ''
ThisWorkOrderNo = CreateParam
RDSColumns<0, 1> = 'ABBREV_OR_CO_NAME'
RDSColumns<0, 2> = 'WO'
RDSColumns<0, 3> = 'WO_STEP'
RDSColumns<0, 4> = 'RUN_ORDER_NUM'
RDSColumns<0, 5> = 'SEQ'
RDSColumns<0, 6> = 'REACTOR'
RDSColumns<0, 7> = 'REACT_IDLE_TIME'
RDSColumns<0, 8> = 'HGCV_TEST'
RDSColumns<0, 9> = 'DATE_IN'
RDSColumns<0, 10> = 'TIME_IN'
RDSColumns<0, 11> = 'DATE_OUT'
RDSColumns<0, 12> = 'TIME_OUT'
RDSColumns<0, 13> = 'PART_NUM'
RDSColumns<0, 14> = 'LOT_NUM'
RDSColumns<0, 15> = 'SUPPL_INST'
RDSList = RDS_Services('GetRDSData', ThisWorkOrderNo, RDSColumns, True$, '')
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
// Turn off AutoPopulate for performance reasons
Set_Property(@Window, RDSRptCtrl, 'OLE.AutoPopulate', False$)
Set_Property(@Window:RDSRptCtrl, "OLE.PreviewMode", 1)
GoSub Setup_OLE_Controls
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
// Turn AutoPopulate back on
Set_Property(@Window, RDSRptCtrl, 'OLE.AutoPopulate', True$)
end event
Event WINDOW.CLOSE(CancelFlag)
Result = ''
// Perhaps add a savewarn prompt if list has been edited.
End_Dialog(@Window, Result)
end event
Event PUB_OK.CLICK()
Result = ''
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
OrigList = Get_Property(@Window, '@OrigList')
If RDSList EQ OrigList then
End_Dialog(@Window, Result)
end event
end
// Save supplement info to RDS table.
SupplList = ''
NumRows = DCount(RDSList, @FM)
For Index = 1 to NumRows
SupplList<Index,1> = RDSList<Index,5>
SupplList<Index,2> = RDSList<Index,20>
Next Index
Rds_Services('SetSupplement', SupplList, Username)
End_Dialog(@Window, Result)
end event
Event PUB_CANCEL.CLICK()
Result = ''
// Perhaps add a savewarn prompt if list has been edited.
End_Dialog(@Window, Result)
Event PUB_CLOSE.CLICK()
End_Dialog(@Window, '')
end event
Event PUB_ADD.CLICK()
SelList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
CurrSuppl = ''
// Grab first supplement in selected list to pass into Add Supplement form.
For each Row in SelList using @FM
If Row<1,20> NE '' then
CurrSuppl = Row<1,20>
end
until CurrSuppl NE ''
Next Row
// Prompt user for supplement information
Response = Dialog_Box('NDW_ADD_SUPPLEMENT', @WINDOW, CurrSuppl)
Save = Response<1>
Instructions = Response<2>
If Save EQ True$ then
// Insert Instructions into selected rows' Supplement cell
For each Row in SelList using @FM
Locate Row in RDSList Using @FM Setting Pos then
RDSList<Pos,20> = Instructions
end
Next Row
end
GoSub RefreshRowColors
OrigSelPos = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos')
SelList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
If SelList NE '' then
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
OrigList = RDSList
CurrSuppl = ''
// Prompt user for supplement information
Response = Dialog_Box('NDW_ADD_SUPPLEMENT', @WINDOW, SelList)
Save = Response<1>
Instructions = Response<2>
If Save EQ True$ then
Stage = Field(Instructions, ':', 1)
Text = Field(Instructions, ':', 2)
// Insert Instructions into selected rows' Supplement cell
For each Row in SelList using @FM
Locate Row in RDSList Using @FM Setting Pos then
DupeCheck = False$
CurrSupps = RDSList<Pos, 15>
Swap CRLF with @FM in CurrSupps
For each Supp in CurrSupps using @FM
CurrSuppStage = Field(Supp, ': ', 1)
DupeCheck = (CurrSuppStage EQ Stage)
Until DupeCheck
Next Supp
If DupeCheck EQ False$ then
If RDSList<Pos,15> = '' then
RDSList<Pos,15> = Instructions
end else
RDSList<Pos,15> = RDSList<Pos,15> : CRLF : Instructions
end
end
end
Next Row
If RDSList NE OrigList then
Gosub SaveSupps
Gosub GetExistingSupps
end
end
GoSub RefreshRowColors
End
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', OrigSelPos)
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'FOCUS', True$)
Gosub EnableButtons
end event
Event PUB_REMOVE.CLICK()
SelList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
// Insert empty string into selected rows' Supplement cell to clear it
For each Row in SelList using @FM
Locate Row in RDSList Using @FM Setting Pos then
RDSList<Pos,20> = ''
end
Next Row
GoSub RefreshRowColors
OrigSelPos = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos')
SelList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
If SelList NE '' then
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
// Prompt user for supplement information
Response = Dialog_Box('NDW_REMOVE_SUPPLEMENTS', @WINDOW, SelList)
Save = Response
Gosub GetExistingSupps
GoSub RefreshRowColors
End
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', OrigSelPos)
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'FOCUS', True$)
Gosub EnableButtons
end event
Event PUB_SELECT_ALL.CLICK()
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
NumRows = DCount(RDSList, @FM)
SelPos = ''
For Index = 1 to NumRows
If Index LT NumRows then
SelPos := Index:@FM
end else
SelPos := Index
end
Next Index
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.Focus', True$)
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
NumRows = DCount(RDSList, @FM)
SelPos = ''
For Index = 1 to NumRows
If Index LT NumRows then
SelPos := Index:@FM
end else
SelPos := Index
end
Next Index
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.Focus', True$)
GoSub EnableButtons
end event
Event PUB_CLEAR.CLICK()
// Clear any selected rows
SelPos = ''
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
// Clear any selected rows
SelPos = ''
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
GoSub EnableButtons
end event
Event OLE_SUBCLASS.OnComboClick(CtrlId, Sel, Value)
Send_Event(CtrlId, 'LOSTFOCUS')
SelPos = ''
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
end event
Send_Event(CtrlId, 'LOSTFOCUS')
Event OLE_RPT_RDS_LIST.OnSelChange(CtrlId, Sel, Value)
GoSub EnableButtons
end event
@ -219,92 +237,171 @@ end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Setup_OLE_Controls:
Qualify = ''
Qualify<1> = 1
Qualify<4> = 0
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
RDSPicCtrl = @Window : '.OLE_PIC_RDS_LIST_DIV'
ColumnList = ''
ColumnList<1> = 'Customer' : @VM : 'TEXT' : @VM : 150 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<2> = 'WO No' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : '#######' : @VM : @VM : 'Segoe UI,9'
ColumnList<3> = 'Step' : @VM : 'NUMBER' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 30 : @VM : 'Center' : @VM : @VM : '##': @VM : @VM : 'Segoe UI,9'
ColumnList<4> = 'Run' : @VM : 'NUMBER' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 30 : @VM : 'Center' : @VM : @VM : '###' : @VM : @VM : 'Segoe UI,9'
ColumnList<5> = 'RDS' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : '#######' : @VM : @VM : 'Segoe UI,9'
ColumnList<6> = 'Rx' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 25 : @VM : 'Center' : @VM : @VM :'##': @VM : @VM : 'Segoe UI,9'
ColumnList<7> = 'Idle Hrs' : @VM : 'TIME' : @VM : 75 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : 'hh:mm' : @VM : @VM : 'Segoe UI,9'
ColumnList<8> = 'HgCv' : @VM : 'BOOL' : @VM : 55 : @VM : @VM : @VM : @VM : @VM : @VM : 40 : @VM : 'Center' : @VM : @VM : 'Yes' : @VM : @VM : 'Segoe UI,9'
ColumnList<9> = 'Date In' : @VM : 'DATE' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'MM/DD/YY' : @VM : @VM : 'Segoe UI,9'
ColumnList<10> = 'Time In' : @VM : 'TIME' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'hh:mmAA' : @VM : @VM : 'Segoe UI,9'
ColumnList<11> = 'Date Out' : @VM : 'DATE' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'MM/DD/YY': @VM : @VM : 'Segoe UI,9'
ColumnList<12> = 'Time Out' : @VM : 'TIME' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'hh:mmAA': @VM : @VM : 'Segoe UI,9'
ColumnList<13> = 'Elapsed' : @VM : 'TIME' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : 'hh:mm' : @VM : @VM : 'Segoe UI,9'
ColumnList<14> = 'PO No' : @VM : 'TEXT' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<15> = 'Cust Part No' : @VM : 'TEXT' : @VM : 75 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<16> = 'Lot No' : @VM : 'TEXT' : @VM : 100 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<17> = 'Combined Status' : @VM : 'TEXT' : @VM : 125 : @VM : @VM : @VM : @VM : @VM : @VM : 125 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<18> = 'NCR Summary' : @VM : 'TEXT' : @VM : 125 : @VM : @VM : @VM : @VM : @VM : @VM : 30 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<19> = 'Hold ' : @VM : 'TEXT' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 40 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<20> = 'Supplement' : @VM : 'TEXT' : @VM : 300 : @VM : @VM : @VM : @VM : @VM : @VM : 150 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
Set_Property(RDSRptCtrl, 'OLE.ColumnList', ColumnList)
Set_Property(RDSRptCtrl, 'OLE.MultiSelect', 2) ; // 2 = Multiselect Toggle Mode
// Get the design time form size. This will be adjusted based on the number of RDS records.
FormSize = Get_Property(@Window, 'SIZE')
RDSRptCtrlSize = Get_Property(RDSRptCtrl, 'SIZE')
NumRDS = DCount(RDSList, @FM)
// Adjust the form and ReportTable control size based on the number of RDS records in the work order.
AdditionalRowsAdj = 0
AdditionalRowsAdj += (NumRDS - 1) * 20
// Ensure window and controls are sized within client machine's max resolution.
ProposedNewHeight = FormSize<4> + AdditionalRowsAdj
SystemWindowSize = Get_Property('SYSTEM', 'SIZE')
MaxClientHeight = SystemWindowSize<4>
If ProposedNewHeight > MaxClientHeight then
FormSize<4> = Oconv(MaxClientHeight * '0.9', 'MD0')
end else
FormSize<4> = FormSize<4> + AdditionalRowsAdj
end
MaxClientWidth = SystemWindowSize<3>
If FormSize<3> > MaxClientWidth then
FormSize<3> = Oconv(MaxClientWidth * '0.9', 'MD0')
end
Set_Property(@Window, '@ORIGSIZE', FormSize)
// Pull then save original list after formatting for savewarn purposes
Set_Property(RDSRptCtrl, 'OLE.List', RDSList)
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
Set_Property(@Window, '@OrigList', RDSList)
GoSub RefreshRowColors
Qualify = ''
Qualify<1> = 1
Qualify<4> = 0
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
RDSPicCtrl = @Window : '.OLE_PIC_RDS_LIST_DIV'
Send_Message(RDSRptCtrl, 'QUALIFY_EVENT', 'OLE.OnSelChange', Qualify)
ColumnList = ''
ColumnList<1> = 'Customer' : @VM : 'TEXT' : @VM : 150 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<2> = 'WO No' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : '#######' : @VM : @VM : 'Segoe UI,9'
ColumnList<3> = 'Step' : @VM : 'NUMBER' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 30 : @VM : 'Center' : @VM : @VM : '##': @VM : @VM : 'Segoe UI,9'
ColumnList<4> = 'Run' : @VM : 'NUMBER' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 30 : @VM : 'Center' : @VM : @VM : '###' : @VM : @VM : 'Segoe UI,9'
ColumnList<5> = 'RDS' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : '#######' : @VM : @VM : 'Segoe UI,9'
ColumnList<6> = 'Rx' : @VM : 'NUMBER' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 25 : @VM : 'Center' : @VM : @VM :'##': @VM : @VM : 'Segoe UI,9'
ColumnList<7> = 'Idle Hrs' : @VM : 'TIME' : @VM : 75 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : 'hh:mm' : @VM : @VM : 'Segoe UI,9'
ColumnList<8> = 'HgCv' : @VM : 'BOOL' : @VM : 55 : @VM : @VM : @VM : @VM : @VM : @VM : 40 : @VM : 'Center' : @VM : @VM : 'Yes' : @VM : @VM : 'Segoe UI,9'
ColumnList<9> = 'Date In' : @VM : 'DATE' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'MM/DD/YY' : @VM : @VM : 'Segoe UI,9'
ColumnList<10> = 'Time In' : @VM : 'TIME' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'hh:mmAA' : @VM : @VM : 'Segoe UI,9'
ColumnList<11> = 'Date Out' : @VM : 'DATE' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'MM/DD/YY': @VM : @VM : 'Segoe UI,9'
ColumnList<12> = 'Time Out' : @VM : 'TIME' : @VM : 60 : @VM : @VM : @VM : @VM : @VM : @VM : 60 : @VM : 'Center' : @VM : @VM : 'hh:mmAA': @VM : @VM : 'Segoe UI,9'
ColumnList<13> = 'Part No' : @VM : 'TEXT' : @VM : 50 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<14> = 'Lot No' : @VM : 'TEXT' : @VM : 100 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
ColumnList<15> = 'Supplement' : @VM : 'P' : @VM : 300 : @VM : @VM : @VM : @VM : @VM : @VM : 150 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
Set_Property(RDSRptCtrl, 'OLE.ColumnList', ColumnList)
Set_Property(RDSRptCtrl, 'OLE.MultiSelect', 2) ; // 2 = Multiselect Toggle Mode
// Get the design time form size. This will be adjusted based on the number of RDS records.
FormSize = Get_Property(@Window, 'SIZE')
RDSRptCtrlSize = Get_Property(RDSRptCtrl, 'SIZE')
NumRDS = DCount(RDSList, @FM)
// Adjust the form and ReportTable control size based on the number of RDS records in the work order.
AdditionalRowsAdj = 0
AdditionalRowsAdj += (NumRDS - 1) * 20
// Ensure window and controls are sized within client machine's max resolution.
ProposedNewHeight = FormSize<4> + AdditionalRowsAdj
SystemWindowSize = Get_Property('SYSTEM', 'SIZE')
MaxClientHeight = SystemWindowSize<4>
If ProposedNewHeight > MaxClientHeight then
FormSize<4> = Oconv(MaxClientHeight * '0.9', 'MD0')
end else
FormSize<4> = FormSize<4> + AdditionalRowsAdj
end
MaxClientWidth = SystemWindowSize<3>
If FormSize<3> > MaxClientWidth then
FormSize<3> = Oconv(MaxClientWidth * '0.9', 'MD0')
end
Set_Property(@Window, '@ORIGSIZE', FormSize)
// Pull then save original list after formatting for savewarn purposes
Gosub GetExistingSupps
Set_Property(RDSRptCtrl, 'OLE.List', RDSList)
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
Set_Property(@Window, '@OrigList', RDSList)
GoSub RefreshRowColors
return
GetExistingSupps:
NumRDS = DCount(RDSList, @FM)
SuppsWithLots = Supplement_Services('GetLotsWithSupplements', 'RDS')
For I = 1 to NumRDS
RDSSupps = ''
ThisRDS = RDSList<I, 5>
If Count(SuppsWithLots, ThisRDS) NE 0 then
SuppCheck = Supplement_Services('GetSupplementsForLot', 'RDS', ThisRDS)
If SuppCheck NE '' AND SuppCheck NE False$ then
SuppCount = DCount(SuppCheck, @FM)
For J = 1 to SuppCount
CurrSuppStage = Xlate('SUPPLEMENTS', SuppCheck<J>, SUPPLEMENTS_STAGE$, 'X', '')
CurrSuppText = Xlate('SUPPLEMENTS', SuppCheck<J>, SUPPLEMENTS_SUPPL_TEXT$, 'X', '')
If RDSSupps EQ '' then
RDSSupps = CurrSuppStage: ': ' : CurrSuppText
End else
RDSSupps := CRLF : CurrSuppStage: ': ' : CurrSuppText
end
Next J
end
If RDSSupps NE '' then RDSList<I,15> = RDSSupps
end else
RDSList<I,15> = ''
end
Next I
return
RefreshRowColors:
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
NumRDS = DCount(RDSList, @FM)
// Fill report table with RDS data
Set_Property(RDSRptCtrl, 'OLE.List', RDSList)
// Color every other cell to increase row distinguishability
Colors = ''
If NumRDS GT 1 then
For RowNo = 1 To NumRDS
If Mod(RowNo, 2) EQ 1 then Colors<RowNo> = RGB(231, 243, 254) else Null ; // light blue
Next RowNo
Set_Property(RDSRptCtrl, 'OLE.RecordColors', Colors)
end
// Clear any selected rows
SelPos = ''
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
RDSRptCtrl = @Window : '.OLE_RPT_RDS_LIST'
NumRDS = DCount(RDSList, @FM)
// Fill report table with RDS data
Set_Property(RDSRptCtrl, 'OLE.List', RDSList)
// Color every other cell to increase row distinguishability
Colors = ''
If NumRDS GT 1 then
For RowNo = 1 To NumRDS
Begin Case
Case RDSList<RowNo, 15> NE ''
Colors<RowNo> = RGB(255, 255, 255)
Case Mod(RowNo, 2) EQ 1
Colors<RowNo> = RGB(231, 243, 254)
Case Mod(RowNo, 2) EQ 0
Colors<RowNo> = RGB(196, 222, 247)
End Case
Next RowNo
Set_Property(RDSRptCtrl, 'OLE.RecordColors', Colors)
end
// Clear any selected rows
SelPos = ''
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos', SelPos)
return
SaveSupps:
ChangeCount = Dcount(OrigSelPos, @FM)
For I =1 to ChangeCount
CurrRowNum = OrigSelPos<I>
CurrRow = RDSList<CurrRowNum>
LotSupps = CurrRow<1,15>
Swap CRLF with @FM in LotSupps
SuppCount = Dcount(LotSupps, @FM)
For J = 1 to SuppCount
ThisLot = CurrRow<1,5>
ThisStage = Field(LotSupps<J>, ':', 1)
ThisSupp = Field(LotSupps<J>, ': ', 2)
ThisSupp = TrimF(ThisSupp)
ret = Supplement_Services('CreateSupplement', 'RDS', ThisLot, ThisStage, ThisSupp, @USER4)
Next J
Next I
return
EnableButtons:
RDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.List')
SelPos = Get_Property(@Window:".OLE_RPT_RDS_LIST", "OLE.SelPos")
If SelPos NE '' then
Set_Property(@Window : '.PUB_ADD', 'ENABLED', True$)
LastSel = SelPos<1>
If RDSList<LastSel, 15> NE '' then
Set_Property(@Window : '.PUB_REMOVE', 'ENABLED', True$)
end else
Set_Property(@Window : '.PUB_REMOVE', 'ENABLED', False$)
end
End else
Set_Property(@Window : '.PUB_ADD', 'ENABLED', False$)
Set_Property(@Window : '.PUB_REMOVE', 'ENABLED', False$)
end
return