Пример #1
0
        public ActionResult Index(WeddingViewModel model)
        {
            bool isSuccess = false;

            ExceptionEngine.AppExceptionManager.Process(() =>
            {
                isSuccess = EmpBusinessInstance.UpdateUserProfile(model.userProfile);
                //Update User session so that values can be updated.
                Session[PageConstants.SESSION_PROFILE_KEY] = EmpBusinessInstance.DisplayUserProfile(model.userProfile.UserID);

                if (isSuccess)
                {
                    ViewBag.Message = "User successfully updated.";
                }
                else
                {
                    ViewBag.ErrMessage = "OOPS something went wrong. Please try again later!";
                }
                ViewBag.isSuccess = isSuccess;
                ViewBag.ShowPopup = true;
            }, AspectEnums.ExceptionPolicyName.ServiceExceptionPolicy.ToString());
            return(View(model));
        }