Hi Trent,I have Wizard which help the user to select different products. In the first page the user can select the main product and in the second page I have a ListView to show some sub products and user can select any product via a check box. In the 3rd page I need to show only the selected items from the 1st and 2nd page into another ListView which is basically a copy from the second page. For the 3rd page I created another instant as ProductsMGRItemsBO_Totals which is basically the same instant from the 2nd page named: ProductsMGRItemsBO1. At the end I need to save the Product_FK into the Items table.
In order to show all products that were selected in the 3rd page I did as follows:
Dim loTempBO
As New HFALib.ProductsMGRItemsBO
Dim RowIndex As Integer = 0
Dim ProductColumn As Integer = 1
For i = 0 To Me.lvSubProducts.CheckedItems.Count - 1 RowIndex = Me.lvSubProducts.CheckedItems.Item(i).Index
Dim RecordPK As Integer = Me.lvSubProducts.Items(RowIndex).Tag
loTempBO.FillByPrimaryKey(RecordPK)
If loTempBO.Count = 1 Then
Me.ProductsMGRItemsBO_Totals.CopyDataFrom(loTempBO,MicroFour.StrataFrame.Business.BusinessCloneDataType.AppendDataToTableFromCompleteTable)
End If
Next
loTempBO.Dispose()
I need you to tell me If by creating another temp BO like loTempBO so I can grab the selected record by its primary key from the second page, and then copy that into the ListView in the 3rd page is correct. Is there a better way using SF somewhere that I missed. Otherwise it works just fine, just looking for a more efficient way if any. Of couse there is more code into it but I tried to show you the specific code only.
Thanks,
Doron