Exemplo n.º 1
0
 public Contractor GetContractorWithEmail(string email)
 {
     using (LocatorClient client = new LocatorClient())
     {
         Contractor result = new Contractor(LocatorBusinessTypes.None);
         try
         {
             result = client.GetContractorWithEmail(email);
         }
         catch (Exception ex)
         {
             log.Error("Error finding contractor for email: " + email, ex);
         }
         return(result);
     }
 }
Exemplo n.º 2
0
 public Contractor GetContractorWithForeignId(int foreignId)
 {
     using (LocatorClient client = new LocatorClient())
     {
         Contractor result = new Contractor(LocatorBusinessTypes.None);
         try
         {
             result = client.GetContractorWithForeignId(foreignId.ToString());
         }
         catch (Exception ex)
         {
             log.Error("Error finding contractor for id: " + foreignId, ex);
         }
         return(result);
     }
 }
Exemplo n.º 3
0
 public List <ILocatorResult> GetLocatorResults(LocatorSearchOptions searchOptions)
 {
     using (LocatorClient client = new LocatorClient())
     {
         List <ILocatorResult> results = new List <ILocatorResult>();
         try
         {
             results =
                 client.GetLocatorResults(searchOptions)
                 .ToList().ConvertAll(lr => lr as ILocatorResult);
         }
         catch (Exception ex)
         {
             log.Error("Error getting locator results for search: " + searchOptions.ToString(), ex);
         }
         return(results);
     }
 }