private void RemoveMeasurementsButton_Click(object sender, RoutedEventArgs e)
        {
            int count = AllowedTab.IsSelected
                ? AllowedMeasurementsPager.SelectedMeasurements.Count
                : DeniedMeasurementsPager.SelectedMeasurements.Count;

            if (count > 1000)
            {
                string message =
                    $"You have selected {count} measurements. " +
                    $"It may take some time to complete this operation. " +
                    $"Would you like to continue?";

                if (!m_dataContext.Confirm(message, "Too many measurements"))
                {
                    return;
                }
            }

            if (AllowedTab.IsSelected)
            {
                m_dataContext.RemoveAllowedMeasurements(AllowedMeasurementsPager.SelectedMeasurements);
                AllowedMeasurementsPager.ReloadDataGrid();
                AllowedMeasurementsPager.ClearSelections();
            }
            else
            {
                m_dataContext.RemoveDeniedMeasurements(DeniedMeasurementsPager.SelectedMeasurements);
                DeniedMeasurementsPager.ReloadDataGrid();
                DeniedMeasurementsPager.ClearSelections();
            }
        }
 private void RemoveMeasurementsButton_Click(object sender, RoutedEventArgs e)
 {
     if (AllowedTab.IsSelected)
     {
         m_dataContext.RemoveAllowedMeasurements(AllowedMeasurementsPager.SelectedMeasurements);
         AllowedMeasurementsPager.ReloadDataGrid();
         AllowedMeasurementsPager.ClearSelections();
     }
     else
     {
         m_dataContext.RemoveDeniedMeasurements(DeniedMeasurementsPager.SelectedMeasurements);
         DeniedMeasurementsPager.ReloadDataGrid();
         DeniedMeasurementsPager.ClearSelections();
     }
 }