コード例 #1
0
        public ActionResult Update(AddAssertionFormModel formModel)
        {
            if (this.ModelState.IsValid)
            {
                var identity = this.identityService.GetCurrentIdentity();

                this.userTasks.AddAssertion(identity.Name, formModel.CategoryId, formModel.TagName);
            }

            return(this.RedirectToAction(c => c.Update()));
        }
コード例 #2
0
        public ActionResult Update(AddAssertionFormModel addAssertion)
        {
            var identity = this.identityTasks.GetCurrentIdentity();

            var addAssertionDetails = this.addAssertionDetailsMapper.MapFrom(
                addAssertion,
                identity);

            try
            {
                this.userTasks.AddAssertion(addAssertionDetails);
            }
            catch (RulesException ex)
            {
                ex.AddModelStateErrors(
                    this.ModelState,
                    "addAssertion");
            }

            return this.RedirectToAction(x => x.Update());
        }
コード例 #3
0
        public ActionResult Update(AddAssertionFormModel formModel)
        {
            if (this.ModelState.IsValid)
            {
                var identity = this.identityService.GetCurrentIdentity();

                this.userTasks.AddAssertion(identity.Name, formModel.CategoryId, formModel.TagName);
            }

            return this.RedirectToAction(c => c.Update());
        }
コード例 #4
0
        public ActionResult Update(AddAssertionFormModel formModel)
        {
            var identity = this.identityTasks.GetCurrentIdentity();

            try
            {
                this.userTasks.AddAssertion(identity.UserName, formModel.CategoryId, formModel.TagName);
            }
            catch (RulesException ex)
            {
                ex.AddModelStateErrors(
                    this.ModelState,
                    "addAssertion");
            }

            return this.RedirectToAction(x => x.Update());
        }