Exemplo n.º 1
0
 //get all users with matching username and password
 public UserDS.TabUserDataTable GetUserByUserNamePassword(string username, string password)
 {
     try
     {
         tabUserTableAdapter.FillByUserNamePassword(userDataSet.TabUser, username, password);
         return(userDataSet.TabUser);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 public UserDataSet.TabUserDataTable GetLogin(String inputUsername, String inputPassword)
 {
     try
     {
         _tabUserTableAdapter.FillByUserNamePassword(_userDataSet.TabUser, inputUsername, inputPassword);
         return(_userDataSet.TabUser);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }//end GetLogin
Exemplo n.º 3
0
 public UserDS.TabUserDataTable GetUserByUserNamePassword(string userName, string password)
 {
     try
     {
         //use adapter to fill the TabUser table in the userDataSet using the FillByUserNamePassword method
         tabUserAdapter.FillByUserNamePassword(userDataSet.TabUser, userName, password);
         return(userDataSet.TabUser);//return the table full of data
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Get data from TabUser
        /// </summary>
        /// <param name="username">string username</param>
        /// <param name="password">string password</param>
        /// <returns>Return the data selected to the dataset</returns>
        /// <exception cref="Exception"></exception>
        public DataSet1.TabUserDataTable GetUserNamePassword(string username, string password)
        {
            try
            {
                _tableUserTableAdapter.FillByUserNamePassword(_userDataSet.TabUser, username, password);

                return(_userDataSet.TabUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Return register from User table based on login details.
 /// </summary>
 /// <param name="userName">string userName</param>
 /// <param name="password">string password</param>
 /// <returns>UserDS.TabUserDataTable</returns>
 /// <exception cref="ex">Exception</exception>
 public UserDS.TabUserDataTable GetLogin(string userName, string password)
 {
     try
     {
         _userDataSet = new UserDS();
         _tabUserTableAdapter.FillByUserNamePassword(_userDataSet.TabUser, userName, password);
         return(_userDataSet.TabUser);
     }
     catch (Exception ex)
     {
         //Error log simulate
         Console.WriteLine(ex.ToString());
         Console.WriteLine(ex.GetBaseException().ToString());
         throw;
     }
 }