/// <summary>
        /// Imports the data file click execute.
        /// </summary>
        /// <param name="arg">The argument.</param>
        private void ImportDataFileClickExecute(object arg)
        {
            SelectedDataSet = null;
            if (arg == null || SelectedDataType.DataTypeName.EqualsIgnoreCase("Medicare Provider Charge Data"))
            {
                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportWizard, UriKind.Relative));
            }
            else
            {
                var selectEntry = arg as DataTypeDetailsViewModel;
                if (selectEntry != null)
                {
                    SelectedDataSet = new DatasetMetadataViewModel()
                    {
                        Dataset = selectEntry.Entry
                    };
                }

                var attachedWebsites = Service.GetWebsitesForDataset(SelectedDataSet.Dataset.Id);
                if (attachedWebsites.Any())
                {
                    string websiteNames   = string.Join(",", attachedWebsites);
                    var    warningMessage = string.Format("This dataset \"{0}\" is already used in a website and re-importing the data may change the reports in the website. You must republish your website to include the updated data in your website. Do you want to proceed?", SelectedDataSet.Dataset.Name);
                    warningMessage += string.Format("{0}{0}Associate Website(s): {1}", Environment.NewLine, websiteNames);

                    if (MessageBox.Show(warningMessage, "Dataset ReImport Warning", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
                    {
                        return;
                    }
                }

                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportWizard, UriKind.Relative));
            }
        }
Пример #2
0
        private void OnSettings()
        {
            var    activeView = RegionMgr.Regions[Const.RegionMainView].ActiveViews.FirstOrDefault();
            string viewName   = activeView is DefaultView?nameof(SettingsView) : nameof(DefaultView);

            RegionMgr.RequestNavigate(Const.RegionMainView, viewName);
        }
Пример #3
0
        /// <summary>
        /// Cancels this instance.
        /// </summary>
        void Cancel()
        {
            var isCancelled = false;

            GuardBusinessObject(() => isCancelled = BusinessObject.Cancel());
            if (isCancelled)
            {
                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.MainDataSetView, UriKind.Relative));
            }
        }
Пример #4
0
 public GeoWizardViewModel()
 {
     _stepManager = new StepManager <WizardBusinessObject>();
     RegionMgr    = ServiceLocator.Current.GetInstance <IRegionManager>();
     Events       = ServiceLocator.Current.GetInstance <IEventAggregator>();
     Events.GetEvent <WizardNavigateSelectStatesEvent>().Subscribe(uri =>
     {
         RegionMgr.RequestNavigate(RegionNames.HospitalsMainRegion, new Uri(ViewNames.GeoContextWizard, UriKind.Relative));
         _stepManager.Navigate(_stepManager.Steps.First());
     });
 }
Пример #5
0
 private void NavigateOut()
 {
     if (HospitalRegion.Default.DefaultStates.Count == 0)
     {
         Events.GetEvent <NavigateToMeasureDataEvent>().Publish(EventArgs.Empty);
     }
     else
     {
         RegionMgr.RequestNavigate(RegionNames.HospitalsMainRegion, new Uri(ViewNames.HospitalsDataTabView, UriKind.Relative));
     }
 }
Пример #6
0
        /// <summary>
        /// Cancels the click execute.
        /// </summary>
        private void CancelClickExecute()
        {
            // TODO: Ask for a yes / no confirmation
            var dialog = ServiceLocator.Current.GetInstance <IPopupDialogService>();

            dialog.Closed += (o, e) =>
            {
                if (dialog.ClickedButton == PopupDialogButtons.Yes)
                {
                    RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.MainDataSetView, UriKind.Relative));
                }
            };
            dialog.ShowMessage(@"Are you sure you wish to cancel the data import process?", "Cancel Data Import", PopupDialogButtons.Yes | PopupDialogButtons.No);
        }
Пример #7
0
 /// <summary>
 /// Imports the complete step.
 /// </summary>
 void ImportCompleteStep()
 {
     // Load the Load Data view
     RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.MainDataSetView, UriKind.Relative));
 }
Пример #8
0
 /// <summary>
 /// Datas the import value map click execute.
 /// </summary>
 public void DataImportValueMapClickExecute()
 {
     RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri("DataImportValueMapView", UriKind.Relative));
 }
Пример #9
0
 /// <summary>
 /// Nexts the step click execute.
 /// </summary>
 /// <param name="arg">The argument.</param>
 private void NextStepClickExecute(object arg)
 {
     RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportComplete, UriKind.Relative));
 }
Пример #10
0
 /// <summary>
 /// Backs the click execute.
 /// </summary>
 /// <param name="arg">The argument.</param>
 private void BackClickExecute(object arg)
 {
     RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportColMapOpt, UriKind.Relative));
 }