/// <summary> /// Called to handle the "add" action. /// </summary> /// <param name="addedItems"></param> /// <returns>True if items were added, false otherwise.</returns> protected override bool AddItems(out IList <ProcedureTypeGroupSummary> addedItems) { addedItems = new List <ProcedureTypeGroupSummary>(); ProcedureTypeGroupEditorComponent editor = new ProcedureTypeGroupEditorComponent(); ApplicationComponentExitCode exitCode = LaunchAsDialog( this.Host.DesktopWindow, editor, SR.TitleAddProcedureTypeGroup); if (exitCode == ApplicationComponentExitCode.Accepted) { addedItems.Add(editor.ProcedureTypeGroupSummary); return(true); } return(false); }
/// <summary> /// Called to handle the "edit" action. /// </summary> /// <param name="items">A list of items to edit.</param> /// <param name="editedItems">The list of items that were edited.</param> /// <returns>True if items were edited, false otherwise.</returns> protected override bool EditItems(IList <ProcedureTypeGroupSummary> items, out IList <ProcedureTypeGroupSummary> editedItems) { editedItems = new List <ProcedureTypeGroupSummary>(); ProcedureTypeGroupSummary item = CollectionUtils.FirstElement(items); ProcedureTypeGroupEditorComponent editor = new ProcedureTypeGroupEditorComponent(item.ProcedureTypeGroupRef); ApplicationComponentExitCode exitCode = LaunchAsDialog( this.Host.DesktopWindow, editor, SR.TitleUpdateProcedureTypeGroup + " - " + item.Name + "(" + item.Category + ")"); if (exitCode == ApplicationComponentExitCode.Accepted) { editedItems.Add(editor.ProcedureTypeGroupSummary); return(true); } return(false); }