public ClosestFacilityTO getNearestFacility(string zipcode)
{
ClosestFacilityTO result = new ClosestFacilityTO();
if (zipcode == "")
{
result.fault = new FaultTO("Missing zipcode");
}
if (result.fault != null)
{
return result;
}
try
{
SitesApi api = new SitesApi();
ClosestFacility fac = api.getNearestFacility(zipcode, mySession.MdwsConfiguration.SqlConnectionString);
result = new ClosestFacilityTO(fac);
}
catch (Exception e)
{
result.fault = new FaultTO(e.Message);
}
return result;
}