public ActionResult RemoveProfileFeedBack()
        {
            BusinessLayerResult <EveryNoteUser> res = everynoteuser_mngr.GetUserById(CurrentSession.User.Id);

            if (res.Errors.Count > 0)
            {
                ErrorViewModel error_notifyobj = new ErrorViewModel()
                {
                    Items          = res.Errors,
                    title          = "Your profile did not delete!",
                    text           = "Please contact the management!",
                    RedirectingUrl = "/Home/EditProfile"
                };

                return(View("Error", error_notifyobj));
            }

            DeletionFeedBackViewModel dfb_vm = new DeletionFeedBackViewModel()
            {
                username             = CurrentSession.User.Username,
                ProfileImageFileName = CurrentSession.User.ProfileImageFileName,
                SelectedReasonId     = 0,
                SL_DeletionReasons   = new SelectList(UserDeletionReason.GetUserDeletionReasons(), "ReasonId", "Reason"),
            };

            return(View(dfb_vm));
        }
        public ActionResult RemoveProfileFeedBack(DeletionFeedBackViewModel model)
        {
            BusinessLayerResult <EveryNoteUser> res = everynoteuser_mngr.ProfileDeletionControl(CurrentSession.User.Id, model.username_validation, model.password_validation);

            if (res.Errors.Count > 0)
            {
                DeletionFeedBackViewModel mdl = new DeletionFeedBackViewModel()
                {
                    ProfileImageFileName = CurrentSession.User.ProfileImageFileName,
                    username             = CurrentSession.User.Username,
                    message_validation   = model.message_validation,
                    password_validation  = model.password_validation,
                    username_validation  = model.username_validation,
                    SelectedReasonId     = model.SelectedReasonId,
                    SL_DeletionReasons   = new SelectList(UserDeletionReason.GetUserDeletionReasons(), "ReasonId", "Reason")
                };
                res.Errors.ForEach(x => ModelState.AddModelError("", x.Message));

                return(View(mdl));
            }

            return(RedirectToAction("RemoveProfile"));
        }