Parent - Child Help

Parent - Child Help

Old forum URL: forums.lhotka.net/forums/t/4326.aspx


jfreeman posted on Monday, February 11, 2008

I have 2 entities that I am building BOs for:
- KPI
- KpiCode

I want to retrieve all KPIs and then when I select one KPI, show the info about it and all the KpiCodes that are associated to it.  I have already built the ReadOnlyList object to handle the initial list.  I need help with the objects that are needed after a user selects a record.  I was looking at the Project Tracker sample but I cannot find an example like this.  The Project - ProjectResource is similar but it also deals with Assignments.  Can someone help me get my brain around what entities need to be build and the methods that should be in them? 

Thanks,
Jonathan

Inquistive_Mind replied on Tuesday, February 12, 2008

Hi Jonathan,

                      One way to do is to create another ReadOnlyList(I am assuming you just need to show the codes) say KPICodeInfoList and KPICodeInfo.

KPICodeInfoList will have a static GetMethod to which pass the primary key value of the selected KPI say KPI.SomeID.The KPICodeInfo class will just have the constructor and properties that makes up the KPIcode.

KPICodeInfoList list = KPICodeInfoList.Get(KPI.SomeID);

Iterate through the list to show all the info classes in that list.

HTH,

Vikas

Copyright (c) Marimer LLC