Esempio n. 1
0
		private static void Handle(LoadSopsException e, IExceptionHandlingContext exceptionHandlingContext)
		{
			string message;
			if (e is InUseLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedInUse;
			}
			else if (e is NearlineLoadStudyException)
			{
				message = ((NearlineLoadStudyException) e).IsStudyBeingRestored
                            ? SR.MessageLoadStudyFailedNearline
                            : String.Format("{0}  {1}", SR.MessageLoadStudyFailedNearlineNoRestore, SR.MessageContactPacsAdmin);
			}
			else if (e is OfflineLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedOffline;
			}
			else if (e is NotFoundLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedNotFound;
			}
			else
			{
				if (e.PartiallyLoaded)
					message = String.Format(SR.MessageFormatLoadStudyIncomplete, e.Successful, e.Total);
				else
					message = SR.MessageLoadStudyCompleteFailure;

				message = String.Format("{0} {1}", message, SR.MessageContactPacsAdmin);
			}

			exceptionHandlingContext.ShowMessageBox(message);
		}
Esempio n. 2
0
		private static void Handle(LoadSopsException e, IExceptionHandlingContext exceptionHandlingContext)
		{
			string message;
			if (e is InUseLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedInUse;
			}
			else if (e is NearlineLoadStudyException)
			{
				message = ((NearlineLoadStudyException) e).IsStudyBeingRestored
                            ? SR.MessageLoadStudyFailedNearline
                            : String.Format("{0}  {1}", SR.MessageLoadStudyFailedNearlineNoRestore, SR.MessageContactPacsAdmin);
			}
			else if (e is OfflineLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedOffline;
			}
			else if (e is NotFoundLoadStudyException)
			{
                message = SR.MessageLoadStudyFailedNotFound;
			}
			else
			{
				if (e.PartiallyLoaded)
					message = String.Format(SR.MessageFormatLoadStudyIncomplete, e.Successful, e.Total);
				else
					message = SR.MessageLoadStudyCompleteFailure;

				message = String.Format("{0} {1}", message, SR.MessageContactPacsAdmin);
			}

			exceptionHandlingContext.ShowMessageBox(message);
		}