Hi,
Before updating to the latest runtime last week, the following code used to work - the main thing that used to happen is that when .Delete() was called on an item within a TypedList, it used to be removed from the TypedList container - but now this doesn't seem happen?
Both were under 2.6, I'm not sure of the previous runtime, but it would have been from around September last year.
Current Version:
LLBLGen 2.6 Designer (Oct 6, 2008 )
Runtime versions:
SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll : 2.6.9.313
SD.LLBLGen.Pro.DQE.SybaseAse.NET20.dll : 2.6.8.819
Basically I iterate through the returned typedlist and creating a counter list, then removing any "duplicates" using the .Delete().
I then go through the smaller list again, updating the writable LouthDayCount property, which gets displayed with the other info. in the grid.
Code below:
ScheduleResourceTypedList myScheduleResourcesList = dsSchedule.TypedList as ScheduleResourceTypedList;
Dictionary<string, int> myLouthKeyList = new Dictionary<string, int>();
for (int iIdx = myScheduleResourcesList.Count-1; iIdx >= 0; iIdx--) {
ScheduleResourceRow thisRow = myScheduleResourcesList[iIdx] as ScheduleResourceRow;
string sThisLouthId = String.Format(SummaryKeyFormat, thisRow.ScheduleDate, thisRow.LouthId);
if (myLouthKeyList.ContainsKey(sThisLouthId)) {
myLouthKeyList[sThisLouthId] += 1;
thisRow.Delete();
} else {
myLouthKeyList.Add(sThisLouthId, 1);
}
}
foreach (ScheduleResourceRow thisRow in myScheduleResourcesList) {
thisRow.LouthDayCount = myLouthKeyList[String.Format(SummaryKeyFormat, thisRow.ScheduleDate, thisRow.LouthId)];
}
Any ideas?