Interacting with Documents via Visual Basic 2010 Code

Imagine you want to provide your users the ability of filtering orders by the ship Country name. The users can type the filter criteria in the TextBox, and then a LINQ query will be executed when they click the Go Filter button. Basically the LINQ query filters a list of orders, so you first need a class for handling each order. The class can be easily implemented as follows:

image

Then you need to write code that performs the query and then returns all the orders that match the specified criteria. Code in Listing 52.3 shows how to accomplish this and must be written in the Sheet1.vb code file.

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.