Example #1
0
 public bool UpdateUser(UserProfile profile)
 {
     try
     {
         if (UserProfileAccessor.InsertUpdateUser(profile, false) >= 1)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
        public bool InsertNewUser(string firstName, string lastName, string middleName, string userName, string emailID, string phone, string address, string postalcode, string city,
                                  string state, string roleName, bool isActive, string password)
        {
            try
            {
                try
                {
                    var userProfile = new UserProfile()
                    {
                        FirstName    = firstName,
                        LastName     = lastName,
                        MiddleName   = middleName,
                        UserName     = userName,
                        EmailAddress = emailID,
                        Phone        = phone,
                        IsActive     = isActive,
                        Address      = address,
                        Zip          = postalcode,
                        City         = city,
                        State        = state,
                        RoleName     = roleName,
                        Password     = password
                    };
                    if (UserProfileAccessor.InsertUpdateUser(userProfile, true) >= 1)
                    {
                        return(true);
                    }
                }
                catch (Exception)
                {
                    throw;
                }

                return(false);
            }
            catch (Exception)
            {
                throw new ApplicationException("No Records were inserted");
            }
        }