/// <summary> /// Logon to Innovator. /// </summary> /// <param name="userName">string</param> /// <param name="userPassword">string</param> /// <param name="locale">string</param> /// <param name="timeZone">string</param> private void _Login(string userName, string userPassword, string locale, string timeZone) { string url = string.Format(CultureInfo.InvariantCulture, "{0}/server/innovatorserver.aspx", System.Configuration.ConfigurationSettings.AppSettings["url"]); string db = System.Configuration.ConfigurationSettings.AppSettings["db"]; HttpServerConnection conn = IomFactory.CreateHttpServerConnection(url, db, userName, Innovator.ScalcMD5(userPassword)); SetLocale(conn, locale, timeZone); Item logResult = conn.Login(); if (logResult.isError()) { throw new LogOnException("Failed to logon to Innovator"); } inn = new Innovator(conn); }
private void GetConnection(string l_serverurl, string l_db, string l_username, string l_password) { mc_conn = IomFactory.CreateHttpServerConnection(l_serverurl.Trim(), l_db.Trim(), l_username.Trim(), Innovator.ScalcMD5(l_password.Trim())); }
public string LoginToInnovator(string innovatorUrl, string database, string userName, string password) { HttpServerConnection serverConnection = null; using (new WaitingCursor()) { try { serverConnection = IomFactory.CreateHttpServerConnection(innovatorUrl, database, userName, Innovator.ScalcMD5(password)); var result = serverConnection.Login(); if (result.isError()) { serverConnection = null; return(result.getErrorString()); } } catch (Exception ex) { serverConnection = null; return(ex.Message); } } innovatorInstance = new Innovator(serverConnection); IsLoggedIn = true; return(string.Empty); }
private static HttpServerConnection _Login(string usr, string pwd, string url, string db) { HttpServerConnection conn = IomFactory.CreateHttpServerConnection(url, db, usr, Innovator.ScalcMD5(pwd)); Item logResult = conn.Login(); if (logResult.isError()) { throw new Exception("Failed to login to Innovator"); } return(conn); }