Example #1
0
        private bool GetSuspendReason(string title, out EnumValueInfo reason, out string additionalComments)
        {
            var protocolReasonComponent = new ProtocolReasonComponent();

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

            reason             = protocolReasonComponent.Reason;
            additionalComments = protocolReasonComponent.OtherReason;

            return(exitCode == ApplicationComponentExitCode.Accepted);
        }
        protected override bool Execute(ReportingWorklistItemSummary item)
        {
            ProtocolReasonComponent component = new ProtocolReasonComponent();

            if (this.Context.DesktopWindow.ShowDialogBox(component, "Reason") == DialogBoxAction.Ok)
            {
                try
                {
                    ExecuteHelper(item.ProcedureStepRef, component.Reason, component.OtherReason, null);
                }
                catch (FaultException <SupervisorValidationException> )
                {
                    ExecuteHelper(item.ProcedureStepRef, component.Reason, component.OtherReason, GetSupervisorRef());
                }

                this.Context.InvalidateFolders(typeof(Folders.Reporting.RejectedProtocolFolder));
            }
            return(true);
        }
Example #3
0
		protected override bool Execute(ReportingWorklistItemSummary item)
		{
			ProtocolReasonComponent component = new ProtocolReasonComponent();
			if (this.Context.DesktopWindow.ShowDialogBox(component, "Reason") == DialogBoxAction.Ok)
			{
				try
				{
					ExecuteHelper(item.ProcedureStepRef, component.Reason, component.OtherReason, null);
				}
				catch (FaultException<SupervisorValidationException>)
				{
					ExecuteHelper(item.ProcedureStepRef, component.Reason, component.OtherReason, GetSupervisorRef());
				}

				this.Context.InvalidateFolders(typeof (Folders.Reporting.RejectedProtocolFolder));
			}
			return true;
		}