Example #1
0
        /// <summary>
        /// UpdatePresentationAttachedFileStreamData Callback Method
        /// </summary>
        /// <param name="result">True if successful else false</param>
        private void UpdatePresentationAttachedFileStreamDataCallbackMethod(Boolean?result)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (result == true)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, result, 1);
                    ICNavigation.Update(ICNavigationInfo.PresentationOverviewInfo, selectedPresentationOverviewInfo);
                    Initialize();
                    // BusyIndicatorNotification();
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                    BusyIndicatorNotification();
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
                BusyIndicatorNotification();
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <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();
            }
        }