Esempio n. 1
0
        internal SBRTEConnector(ConnectionParams connectionParams)
        {
            var lp = new LoginPoint();
            var connectionString = "";

            if (string.IsNullOrWhiteSpace(connectionParams.Login))
            {
                connectionString = $"ServerName={connectionParams.Server};DBName={connectionParams.Database};IsOSAuth=true;AuthType=OS";
            }
            else
            {
                connectionString = $"ServerName={connectionParams.Server};DBName={connectionParams.Database};UserName={connectionParams.Login};Password={connectionParams.Password}";
            }
            connectionString = connectionString + ";KeepLoginPoint=True";
            Application      = lp.GetApplication(connectionString);
        }
Esempio n. 2
0
 public bool Connect(ConnectionParams cp)
 {
     return(Connect(cp.Server, cp.Database, cp.Login, cp.Password, String.IsNullOrWhiteSpace(cp.Password)));
 }