Esempio n. 1
0
        /*------------------------------------------------END OF Getting List of Users------------------------------------------------*/
        //Returning a boolean value to AdminController received from DataAccessLayer based on successful edit of user reward points
        public bool EditUser(UserDetailsForAdmin userDetails)
        {
            bool result = adminUpgrades.EditUser(userDetails);

            if (result)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public HttpResponseMessage EditUser(UserDetailsForAdmin userDetails)
        {
            bool result = adminManager.EditUser(userDetails);

            if (result)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.Accepted, "User Details Editted Successfully"));
            }
            else
            {
                throw new ArgumentNullException("Error in deleting a User");
            }
        }
Esempio n. 3
0
        /*------------------------------------------------END OF Getting List of Users------------------------------------------------*/
        //Updating the edited reward points received from the controller
        public bool EditUser(UserDetailsForAdmin userDetails)
        {
            UserDetails fullUserDetails = dbContext.userDetails.Find(userDetails.userID);

            if (fullUserDetails != null)
            {
                fullUserDetails.rewardPoints           = userDetails.rewardPoints;
                dbContext.Entry(fullUserDetails).State = EntityState.Modified;
                dbContext.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }