public PartialViewResult DeleteRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey) { var relationshipType = relationshipTypePrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(relationshipType.RelationshipTypeID); return(ViewDeleteRelationshipType(relationshipType, viewModel)); }
public PartialViewResult EditRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey) { var relationshipType = relationshipTypePrimaryKey.EntityObject; var viewModel = new EditRelationshipTypeViewModel(relationshipType); return(ViewEditRelationshipType(viewModel)); }
public ActionResult DeleteRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey, ConfirmDialogFormViewModel viewModel) { var relationshipType = relationshipTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteRelationshipType(relationshipType, viewModel)); } relationshipType.DeleteFull(HttpRequestStorage.DatabaseEntities); return(new ModalDialogFormJsonResult()); }
public ActionResult EditRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey, EditRelationshipTypeViewModel viewModel) { var relationshipType = relationshipTypePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditRelationshipType(viewModel)); } HttpRequestStorage.DatabaseEntities.OrganizationTypeRelationshipTypes.Load(); var organizationTypeRelationshipTypes = HttpRequestStorage.DatabaseEntities.OrganizationTypeRelationshipTypes.Local; viewModel.UpdateModel(relationshipType, organizationTypeRelationshipTypes); return(new ModalDialogFormJsonResult()); }