Criteria in DynamicRootList Fetch

Criteria in DynamicRootList Fetch

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


esteban404 posted on Thursday, December 11, 2008

I'm looking for an example of using some criteria to fetch a OperationDefectList of OperationDefect items based on an order.

In my editable root list base I have:
public static DefectERL GetDefectList(string workOrder)
{ return DataPortal.Fetch(new Criteria(workOrder)); }

But I don't know how to pass that into the reader in the Fetch method:
private void DataPortal_Fetch()
{ RaiseListChangedEvents = false;
using (SafeDataReader dr = null)
{ while (dr.Read()) {
Add(WaveDefect.GetDefect(dr)); }
}
RaiseListChangedEvents = true;
}

Can anyone help on this? The list needs to limit contents to specific orders, but I haven't been able to do it and couldn't find an example.

Thanks,
_E

Copyright (c) Marimer LLC