예제 #1
0
 public string AuthenticationEM(IOrganizationService service)
 {
     try
     {
         string       AuthenticationServiceKey = string.Empty;
         Auth         auth       = new Auth();
         EmAuthResult authResult = auth.Login(Globals.EuroMessageUserNameLive, Globals.EuroMessagePasswordLive);
         if (authResult.Code == "00")
         {
             AuthenticationServiceKey = authResult.ServiceTicket;
             return(AuthenticationServiceKey);
         }
         else
         {
             throw new InvalidPluginExecutionException("authentication exception CODE" + authResult.Code + "authResult.Message =" + authResult.Message);
         }
     }
     catch (Exception ex)
     {
         throw new InvalidPluginExecutionException(ex.ToString());
     }
 }
예제 #2
0
        public string AuthenticationEM()
        {
            try
            {
                string AuthenticationServiceKey = string.Empty;

                Auth         auth       = new Auth();
                EmAuthResult authResult = auth.Login(Globals.EuroMessageUserNameLive, Globals.EuroMessagePasswordLive);
                if (authResult.Code == "00")
                {
                    AuthenticationServiceKey = authResult.ServiceTicket;
                    return(AuthenticationServiceKey);
                }
                else
                {
                    return(string.Empty);
                }
            }
            catch (Exception)
            {
                return(string.Empty);
            }
        }