/// <summary> /// GenerateICPacketReport callback method /// </summary> /// <param name="result">IC Packet file byte stream</param> private void GenerateICPacketReportCallbackMethod(Byte[] result) { string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name); Logging.LogBeginMethod(logger, methodNamespace); try { if (result != null) { Logging.LogMethodParameter(logger, methodNamespace, result, 1); DownloadStream.Write(result, 0, result.Length); DownloadStream.Close(); DownloadStream = null; } else { Prompt.ShowDialog("An Error ocurred while downloading the preview report from server."); Logging.LogMethodParameterNull(logger, methodNamespace, 1); } } catch (Exception ex) { Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK); Logging.LogException(logger, ex); } finally { Logging.LogEndMethod(logger, methodNamespace); BusyIndicatorNotification(); } }
/// <summary> /// /// </summary> /// <param name="result"></param> private void CreatePresentationCallBackMethod(PresentationFile result) { string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name); Logging.LogBeginMethod(logger, methodNamespace); try { if (result != null && result.PresentationId > 0) { Logging.LogMethodParameter(logger, methodNamespace, result, 1); /* eventAggregator.GetEvent<ToolboxUpdateEvent>().Publish(DashboardCategoryType.INVESTMENT_COMMITTEE_PRESENTATIONS); * ICNavigation.Update(ICNavigationInfo.MeetingInfo, iCPresentationOverviewInfo); * regionManager.RequestNavigate(RegionNames.MAIN_REGION, "ViewDashboardICPresentation", UriKind.Relative);*/ iCPresentationOverviewInfo.PresentationID = result.PresentationId; DownloadStream.Write(result.FileStream, 0, result.FileStream.Length); DownloadStream.Close(); DownloadStream = null; ICNavigation.Update(ICNavigationInfo.PresentationOverviewInfo, iCPresentationOverviewInfo); eventAggregator.GetEvent <ToolboxUpdateEvent>().Publish(DashboardCategoryType.INVESTMENT_COMMITTEE_IC_PRESENTATION); regionManager.RequestNavigate(RegionNames.MAIN_REGION, new Uri("ViewDashboardICPresentation", UriKind.Relative)); } else { Logging.LogMethodParameterNull(logger, methodNamespace, 1); } } catch (Exception ex) { Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK); Logging.LogException(logger, ex); } finally { Logging.LogEndMethod(logger, methodNamespace); BusyIndicatorNotification(); } }