示例#1
0
        public GeographicLocationArray getGeographicLocations(string zipcode)
        {
            GeographicLocationArray result = new GeographicLocationArray();

            if (zipcode.Length != 5 || !StringUtils.isNumeric(zipcode))
            {
                result.fault = new FaultTO("Invalid zipcode: must be 5 numeric chars");
                return(result);
            }

            try
            {
                gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao dao =
                    new gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao(mySession.MdwsConfiguration.SqlConnectionString);
                GeographicLocation[] locations = dao.getGeographicLocations(zipcode);
                result = new GeographicLocationArray(locations);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return(result);
        }
示例#2
0
文件: SitesLib.cs 项目: OSEHRA/mdws
        public GeographicLocationArray getGeographicLocations(string zipcode)
        {
            GeographicLocationArray result = new GeographicLocationArray();
            if (zipcode.Length != 5 || !StringUtils.isNumeric(zipcode))
            {
                result.fault = new FaultTO("Invalid zipcode: must be 5 numeric chars");
                return result;
            }

            try
            {
                gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao dao =
                    new gov.va.medora.mdo.dao.sql.zipcodeDB.ZipcodeDao(mySession.MdwsConfiguration.SqlConnectionString);
                GeographicLocation[] locations = dao.getGeographicLocations(zipcode);
                result = new GeographicLocationArray(locations);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }