As you may have noted, lab #4 and assignment #4 are very similar. In fact, if you have completed the optional part of lab #4, you have essentially solved assignment #4.
Here is where the solution to assignment #4 may differ slightly from the lab. In the lab the patient information is loaded into the listboxes right upon loading the form. In your assignment you should have a load and a save menu option. The data can be loaded from the Web service or from the local file. This means you may provide two load menu options (load local and load remote) ... or you could write code that tries to always load the remote file via the Web service and when this is not possible tries the local file. The quick and dirty solution would be a a try-catch statement. Just let the remote attempt fail and load the local file in the catch part. The smarter solution is to determine with some code whether the device is connected .
In any case you will need to think about where the code that loads the data from the Web service has to go now, as this may be different from lab#4. There could be also some opportunity (not required) for refactoring!
A note regarding using XML. As it became apparent in the demo provided in the last class session, you may need to add the System.Xml reference to your project references. Go to MyProject, the Reference tab, and view the existing references. If it is not listed, click on Add Reference and select System.Xml from the list in the dialog box. Then add a Imports System.Xml.Serialization statement at the top of your code file.
MH
Technorati : BUS ADM 740, Web services, XML
Powered by Zoundry