public PartialViewResult EditAgreementPerson(AgreementPersonPrimaryKey agreementPersonPrimaryKey) { var agreementPerson = agreementPersonPrimaryKey.EntityObject; var viewModel = new EditAgreementPersonViewModel(agreementPerson); return(ViewEditAgreementPerson(viewModel)); }
public ActionResult EditAgreementPerson(AgreementPersonPrimaryKey agreementPersonPrimaryKey, EditAgreementPersonViewModel viewModel) { var agreementPerson = agreementPersonPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditAgreementPerson(viewModel)); } viewModel.UpdateModel(agreementPerson); return(new ModalDialogFormJsonResult()); }
public ActionResult DeleteAgreementPerson(AgreementPersonPrimaryKey agreementPersonPrimaryKey, ConfirmDialogFormViewModel viewModel) { var agreementPerson = agreementPersonPrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteAgreementPerson(agreementPerson, viewModel)); } var message = $"{FieldDefinition.Agreement.GetFieldDefinitionLabel()} Contact '{agreementPerson.Person.FullNameFirstLastAndOrg}' successfully removed from this {FieldDefinition.Agreement.GetFieldDefinitionLabel()}."; agreementPerson.DeleteFull(HttpRequestStorage.DatabaseEntities); SetMessageForDisplay(message); return(new ModalDialogFormJsonResult()); }
public PartialViewResult DeleteAgreementPerson(AgreementPersonPrimaryKey agreementPersonPrimaryKey) { var viewModel = new ConfirmDialogFormViewModel(agreementPersonPrimaryKey.PrimaryKeyValue); return(ViewDeleteAgreementPerson(agreementPersonPrimaryKey.EntityObject, viewModel)); }