예제 #1
0
        public static Contributor AuthenticateUser(string username, string password)
        {
            ContributorsTableAdapter contributorsAdpt = new ContributorsTableAdapter();

            try
            {
                if (!(bool)contributorsAdpt.AuthenticateUser(username, password))
                {
                    throw new Exception("The supplied credentials are invalid.");
                }

                return(new Contributor(username));
            }
            catch
            {
                throw;
            }
        }
예제 #2
0
 public Contributor(string username)
 {
     _adpt    = new ContributorsTableAdapter();
     _dataRow = _adpt.GetByEmail(username)[0];
 }