Exemplo n.º 1
0
        // Datatable TabUser only with UserName check
        public DataSet1.TabUserDataTable GetUserName(string username)
        {
            try
            {
                _tableUserTableAdapter.FillByUserName(_userDataSet.TabUser, username);

                return(_userDataSet.TabUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Search Users by UserName.
 /// </summary>
 /// <param name="userName">string userName</param>
 /// <returns>UserDS.TabUserDataTable</returns>
 /// <exception cref="ex">Exception</exception>
 public UserDS.TabUserDataTable GetUsersByUserName(string userName)
 {
     try
     {
         userName     = "******" + userName + "%";
         _userDataSet = new UserDS();
         _tabUserTableAdapter.FillByUserName(_userDataSet.TabUser, userName);
         return(_userDataSet.TabUser);
     }
     catch (Exception ex)
     {
         //Error log simulate
         Console.WriteLine(ex.ToString());
         Console.WriteLine(ex.GetBaseException().ToString());
         throw;
     }
 }