For simplicity of this sample application , we created a Folder called Patients inside Views

clip_image001[7]

 

And put all the View Models class inside there

clip_image002[7]

Let's take a quick look at one of those ViewModels.

 

The ViewModel for Patients

clip_image003[7]

 

 

We use a class for the Async Load of the data, that takes 3 parameters

  1. The Ria Services Domain Context to be used to load the data
  2. The Query where we tell what Patients to load.. This is critical, this is why we don't include the related tables on the ria services class, instead we tell ria to go look for specific data without having to load ALL DATA and make all that data to travel on the web.
  3. The results of the operation .. Did it succeed getting the data of did it failed

clip_image004[5]

The collection of Patients to which we will be binding the XAML view

The Current Patient, to which we will be also binding our xaml

Last edited Jul 9, 2011 at 4:42 AM by BusinessApp, version 2

Comments

No comments yet.