protected override bool EditItems(IList <PatientNoteDetail> items, out IList <PatientNoteDetail> editedItems) { editedItems = new List <PatientNoteDetail>(); var note = CollectionUtils.FirstElement(items); var editor = new PatientNoteEditorComponent(note, _noteCategoryChoices); if (ApplicationComponentExitCode.Accepted == LaunchAsDialog(this.Host.DesktopWindow, editor, SR.TitleNoteText)) { editedItems.Add(note); return(true); } return(false); }
public void ShowNoteDetail(PatientNoteDetail notedetail) { try { var caegotryChoices = new List <PatientNoteCategorySummary> { notedetail.Category }; var editor = new PatientNoteEditorComponent(notedetail, caegotryChoices, true); LaunchAsDialog(this.Host.DesktopWindow, editor, SR.TitleNoteText); } catch (Exception e) { // failed to launch editor ExceptionHandler.Report(e, this.Host.DesktopWindow); } }
protected override bool AddItems(out IList <PatientNoteDetail> addedItems) { addedItems = new List <PatientNoteDetail>(); var newNote = new PatientNoteDetail(); var editor = new PatientNoteEditorComponent(newNote, _noteCategoryChoices); if (ApplicationComponentExitCode.Accepted == LaunchAsDialog(this.Host.DesktopWindow, editor, SR.TitleNoteText)) { addedItems.Add(newNote); _notes.Add(newNote); return(true); } return(false); }