Example #1
0
        private bool GetRejectReason(string title, out EnumValueInfo reason, out string additionalComments)
        {
            var rejectReasonComponent = new TranscriptionRejectReasonComponent();

            var exitCode = LaunchAsDialog(this.Host.DesktopWindow, rejectReasonComponent, title);

            reason             = rejectReasonComponent.Reason;
            additionalComments = rejectReasonComponent.OtherReason;

            return(exitCode == ApplicationComponentExitCode.Accepted);
        }
		protected override bool Execute(ReportingWorklistItemSummary item)
		{
			TranscriptionRejectReasonComponent component = new TranscriptionRejectReasonComponent();
			if (this.Context.DesktopWindow.ShowDialogBox(component, SR.TitleReason) == DialogBoxAction.Ok)
			{
				Platform.GetService<ITranscriptionWorkflowService>(
					delegate(ITranscriptionWorkflowService service)
					{
						service.RejectTranscription(new RejectTranscriptionRequest(
							item.ProcedureStepRef, 
							component.Reason,
							CreateAdditionalCommentsNote(component.OtherReason)));
					});

				this.Context.InvalidateFolders(typeof (Folders.Transcription.CompletedFolder));
			}
			return true;
		}
        protected override bool Execute(ReportingWorklistItemSummary item)
        {
            TranscriptionRejectReasonComponent component = new TranscriptionRejectReasonComponent();

            if (this.Context.DesktopWindow.ShowDialogBox(component, "Reason") == DialogBoxAction.Ok)
            {
                Platform.GetService <ITranscriptionWorkflowService>(
                    delegate(ITranscriptionWorkflowService service)
                {
                    service.RejectTranscription(new RejectTranscriptionRequest(
                                                    item.ProcedureStepRef,
                                                    component.Reason,
                                                    CreateAdditionalCommentsNote(component.OtherReason)));
                });

                this.Context.InvalidateFolders(typeof(Folders.Transcription.CompletedFolder));
            }
            return(true);
        }