public TextTO getZipcodeForCity(string city, string stateAbbr)
{
TextTO result = new TextTO();
if (city == "")
{
result.fault = new FaultTO("Missing city");
}
else if (stateAbbr == "")
{
result.fault = new FaultTO("Missing stateAbbr");
}
if (result.fault != null)
{
return result;
}
try
{
gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao dao =
new gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao(mySession.MdwsConfiguration.SqlConnectionString);
string zip = dao.getZipcode(city, stateAbbr);
result = new TextTO(zip);
}
catch (Exception e)
{
result.fault = new FaultTO(e.Message);
}
return result;
}