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())); }
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()); }
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()); }
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()); }