//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); } }
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
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; } }
/// <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; } }
/// <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; } }