public override bool ValidateUser(string username, string password)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["CTS"].ConnectionString
                                      + "UID=" + username + ";PWD=" + password;

            var provider = new MsSqlDataProvider(connectionString);

            return(provider.TestConnection());
        }
예제 #2
0
        public bool Authenticate(Credentials credentials)
        {
            string connectionString = CreateConnectionString(credentials.Username, credentials.Password);

            var provider = new MsSqlDataProvider(connectionString);

            if (provider.TestConnection())
            {
                dataProvider = provider;
                User = provider.GetItem(new UserDataFilter { Login = credentials.Username });
                return true;
            }

            return false;
        }
예제 #3
0
        public bool Authenticate(Credentials credentials)
        {
            string connectionString = CreateConnectionString(credentials.Username, credentials.Password);

            var provider = new MsSqlDataProvider(connectionString);

            if (provider.TestConnection())
            {
                dataProvider = provider;
                User         = provider.GetItem(new UserDataFilter {
                    Login = credentials.Username
                });
                return(true);
            }

            return(false);
        }