Ejemplo n.º 1
0
        public ActionResult AddToRefundProgram(AuhorRefundProgramDTO token)
        {
            var model = new RefundSettingsModel();

            if (!token.Checked)
            {
                return(_RefundSettingsView(null));
            }

            string error;

            model.IsValid = _userAccountServices.AddAuthorToRefundProgram(CurrentUserId, out error);

            model.Error = error;

            model.ShowJoinedSuccess = model.IsValid;


            if (model.IsValid)
            {
                SaveUserEvent(CommonEnums.eUserEvents.MBG_JOIN);
            }

            return(_RefundSettingsView(model));
        }
Ejemplo n.º 2
0
        private ActionResult _RefundSettingsView(RefundSettingsModel model)
        {
            ViewBag.ShowJoinedSuccess  = model != null && model.ShowJoinedSuccess;
            ViewBag.ShowRemovedSuccess = model != null && model.ShowRemovedSuccess;
            ViewBag.IsValid            = model == null || model.IsValid;
            ViewBag.Error = model != null ? model.Error : string.Empty;

            var token = _userAccountServices.GetAuthorRefundProgramStatus(CurrentUserId);

            token.Checked = false;
            return(PartialView("Account/_RefundProgram", token));
        }