/// <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));
            }
        }
        /// <summary>
        /// Called when [edit dataset metadata].
        /// </summary>
        /// <param name="obj">The object.</param>
        private void OnEditDatasetMetadata(object obj)
        {
            var datasetTypeDetail = obj as DataTypeDetailsViewModel;

            if (datasetTypeDetail == null || datasetTypeDetail.Entry == null)
            {
                return;
            }

            ShowDatasetMetadataPopUp = true;

            datasetTypeDetail.Entry = Service.Refresh(datasetTypeDetail.Entry);

            SelectedDataSet = new DatasetMetadataViewModel
            {
                Dataset         = datasetTypeDetail.Entry,
                DatasetTypeName = datasetTypeDetail.Entry.ContentType.Name,
                DatasetTitle    = datasetTypeDetail.Entry.Name,
                SelectedYear    = datasetTypeDetail.Entry.ReportingYear,
                SelectedQuarter = datasetTypeDetail.Entry.ReportingQuarter,
                YearItems       = BaseDataService.ReportingYears,
                StatesItems     = BaseDataService.States(null).Select(s => new SelectListItem {
                    Text = s.Text, Value = s.Data != null ? s.Data.Abbreviation : null
                }).ToObservableCollection(),
                QuartersItems = BaseDataService.ReportingQuarters.Select(q => new SelectListItem {
                    Text = q.Text, Value = q.Data != null ? q.Data.Name : null
                }).ToObservableCollection()
            };

            if (SelectedDataSet.Dataset.ContentType.Name.EqualsIgnoreCase("PHYSICIAN DATA"))
            {
                SelectedDataSet.StatesItems.RemoveAt(0);
                SelectedDataSet.StatesItems.Where(s => s.Value != null).ToList().ForEach(s =>
                {
                    s.IsSelected = SelectedDataSet.Dataset.ProviderStates.ContainsIgnoreCase(s.Value != null ? s.Value.ToString() : null);
                });

                SelectedDataSet.SelectedManagement = SelectedDataSet.Dataset.UseRealtimeData
                                                        ? DatasetMetadataViewModel.REAL_TIME_MANAGEMENT
                                                        : DatasetMetadataViewModel.MANAGE_IN_MONAHRQ;
            }
        }