Using the WhereStatement


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Good afternoon!

I have the following code working within a browse dialog.



private void WorkOrderBrowseDialog_Searching(object sender, MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogSearchingEventArgs e)

{

ArrayList mPartArray = new ArrayList();

using (PartsBO mPartsBO = new PartsBO())

{

mPartsBO.FillForComboBox(); // fills list for one division

foreach (PartsBO mBO in mPartsBO.GetEnumerable())

mPartArray.Add(mBO.partindex);

}

WhereStatement mWhere = new WhereStatement(new String[] { "partindex" }, mPartArray, WhereStatementTypeOptions.In);

e.RawWhereStatementsCollection.Add(mWhere);

}




The problem is, like always, speed. There are 1250 parts in the mPartsBO--more in the other division. The delay seems to be building that array. Is there any easier, faster, more economical way to reference the partindex field in the BO collection?



Thanks!

Bill
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 15 Years Ago
Bill Cunnien - 15 Years Ago
Bill Cunnien - 15 Years Ago
Greg McGuffey - 15 Years Ago
Charles R Hankey - 15 Years Ago
Bill Cunnien - 15 Years Ago
Bill Cunnien - 15 Years Ago
Trent L. Taylor - 15 Years Ago
                         Cool! Thanks for the tip.

Good to see you back on the...
Bill Cunnien - 15 Years Ago
                             Sorry for the absence! Had a lot going on lately. The good news is...
Trent L. Taylor - 15 Years Ago
                                 No worries on the absence...you need no excuse. We are all glad to...
Bill Cunnien - 15 Years Ago
                                     The search item is invisible, so I removed the checkmark on "Ignore...
Bill Cunnien - 15 Years Ago
                                         Good job...glad you got it going! :)
Trent L. Taylor - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search