public virtual ActionResult AddContact(InstitutionalAgreementContactForm model) { if (model != null) { if (ModelState.IsValid) { model.Person.DisplayName = model.Person.EntityId.HasValue ? _queryProcessor.Execute(new GetPersonByGuidQuery(model.Person.EntityId.Value)).DisplayName : _queryProcessor.Execute( new GenerateDisplayNameQuery { FirstName = model.Person.FirstName, LastName = model.Person.LastName, MiddleName = model.Person.MiddleName, Salutation = model.Person.Salutation, Suffix = model.Person.Suffix, }); return PartialView(MVC.InstitutionalAgreements.ManagementForms.Views.add_contact, model); } throw new NotSupportedException("Is client-side validation enabled?"); } return HttpNotFound(); }
public virtual ActionResult AddContact(int? agreementId) { var model = new InstitutionalAgreementContactForm(); return PartialView(GetEditorTemplateViewName(Area, Name, Views.EditorTemplates.InstitutionalAgreementContactForm), model); }