Exemplo n.º 1
0
 private static bool CheckConnection()
 {
     try
     {
         using (var userService = new ServiceManager.ServiceSystemCompaniesClient())
         {
             userService.Open();
             var user = new ServiceManager.Users();
             user.Method = "CheckConnection";
             user        = userService.ManageUsers(user);
             if (user.isBool)
             {
                 return(true);
             }
             MessageUtils.LogUtils.SystemEventLogsInformation(ERRORMESSAGE);
             MessageUtils.LogUtils.WriteToLog(ERRORMESSAGE);
             ErrorMessageBox(ERRORMESSAGE);
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }