Exemplo n.º 1
0
 /// <summary>
 /// Retrieves all active users from the database
 /// </summary>
 /// <returns></returns>
 public userSearchResultTO[] GetActiveUsers()
 {
     userSearchResultTO[] result;
     using (SearchClient client = new SearchClient())
     {
         ConfigureClient(client);
         try
         {
             client.Open();
             result = client.GetActiveUsers();
             client.Close();
         }
         catch (Exception ex)
         {
             client.Abort();
             throw ex;
         }
     }
     return(result);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true of the web service client is able to successfully connect to the target web service.
        /// </summary>
        /// <returns></returns>
        public bool CheckConnection()
        {
            bool result = false;

            using (SearchClient client = new SearchClient())
            {
                ConfigureClient(client);
                try
                {
                    client.Open();
                    result = client.CheckConnection();
                    client.Close();
                }
                catch (Exception ex)
                {
                    client.Abort();
                    throw ex;
                }
            }
            return(result);
        }