public JsonNetResult Add(PersonResponsibilityTypeViewModel vm) { if (ModelState.IsValid) { // TODO unique constraint on name PersonResponsibilityType type = new PersonResponsibilityType(); type.PersonResponsibilityTypeName = vm.PersonRelationshipTypeName; type.Notes = vm.Notes; type = this.responsibilityTasks.SavePersonResponsibilityType(type); return(JsonNet(string.Empty)); } else { return(JsonNet(this.GetErrorsForJson())); } }
public ActionResult Add() { PersonResponsibilityTypeViewModel vm = new PersonResponsibilityTypeViewModel(); return(View(vm)); }