コード例 #1
0
 public int GetUserCount(Active group = Active.active)
 {
     try
     {
         return(UserRegionAccessor.RetrieveUserCount(group));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
 public bool EditUserData(int userID, int regionID)
 {
     try
     {
         if (UserRegionAccessor.UpdateUser(userID, regionID) == 1)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
        public User GetAndDisplayUserRecord(int userID)
        {
            User usr = null;



            try
            {
                usr = UserRegionAccessor.RetrieveUser(userID);
                return(usr);
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #4
0
        public List <User> GetUserList(Active group = Active.active)
        {
            try
            {
                var userList = UserRegionAccessor.RetrieveUserList(group);

                if (userList.Count > 0)
                {
                    return(userList);
                }
                else
                {
                    throw new ApplicationException("There were no records found.");
                }
            }

            catch (Exception)
            {
                // *** we should sort the possible exceptions and return friendly messages for each
                throw;
            }
        }