ODataOLAP
-------------------------------------------------------------------------------------
Demonstrates how to use OData data sources in C1Olap applications.

This sample uses the NorthWind OData service available at http://services.odata.org/Northwind/Northwind.svc/. 

The application uses a C1OlapPage to show the NorthWind invoices, a query with about 2,000 records.

To use OData sources, you should start by adding a service reference to your project, then
specifying the URL of the OData provider. In our case, the URL is the one mentioned above, and the
service was added directly to the Silverlight client.

Once the service reference has been added to the project, you can obtain the data by instantiating
a data context, creating one DataServiceCollection for each entity collection you need in your application,
and finally calling the DataServiceCollection.LoadAsync method.

For example, this is the code that loads the invoices in this sample:

<code>
	// create context
    _context = new NorthwindEntities(new Uri("http://services.odata.org/Northwind/Northwind.svc/"));

	// load invoices
	var invoices = new DataServiceCollection<Invoice>();
	invoices.LoadCompleted += (s, ee) =>
	{
		if (invoices.Continuation == null)
		{
			// done loading
			_lblStatus.Text = string.Format("Ready. {0:n0} invoices loaded.", invoices.Count);
		}
		else
		{
			// continue loading...
			_lblStatus.Text = string.Format("Loading, {0:n0} invoices so far...", invoices.Count);
			invoices.LoadNextPartialSetAsync();
		}
	};
	invoices.LoadAsync(_context.Invoices);

	// bind olap page to invoices
	_c1OlapPage.DataSource = invoices;
</code>

The LoadAsync method is asynchronous, so the C1OlapPage will show the list of fields immediately
and users can start building their views while the invoice data is loaded.

As new invoices arrive, the C1OlapPage will automatically update to show the new data as it comes in.