Example #1
0
 private void DoSlicerMeasureClickProcess(object parm)
 {
     if (SelectedMeasure != null)
     {
         // Check for the existence of this item in the current report
         // and add it to the current report
         if (!CheckForExistance(SelectedMeasure) && !SlicerItems.Any(i => i is Measure))
         {
             SlicerItems.Add(SelectedMeasure);
             addToReport(AxisType.Slicer, SelectedMeasure);
             canColShowMeasureBtn    = false;
             canRowShowMeasureBtn    = false;
             canSlicerShowMeasureBtn = true;
             ColMeasureClick.CanExecute(null);
             RowMeasureClick.CanExecute(null);
             SlicerMeasureClick.CanExecute(null);
             GridDataManager.NotifyElementModified();
         }
         else
         {
             MessageBox.Show("This element is already exist in the current report or more than one measure could not be sliced.", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     else
     {
         MessageBox.Show("Select a Measure to Add", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }
Example #2
0
 private void DoRemoveClickProcess(object parm)
 {
     if (parm.ToString().Equals("btnColRemove"))
     {
         if (SelectedColumnItem != null)
         {
             RemoveItem(GridDataManager.CurrentReport.CategoricalElements, SelectedColumnItem);
             ColumnItems.Remove(SelectedColumnItem);
             canColRemoveBtn = false;
             ColRemoveClick.CanExecute(null);
             GridDataManager.NotifyElementModified();
             EnableAll();
         }
         else
         {
             MessageBox.Show("Select an Item to Remove", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     else if (parm.ToString().Equals("btnRowRemove"))
     {
         if (SelectedRowItem != null)
         {
             RemoveItem(GridDataManager.CurrentReport.SeriesElements, SelectedRowItem);
             RowItems.Remove(SelectedRowItem);
             canRowRemoveBtn = false;
             RowRemoveClick.CanExecute(null);
             GridDataManager.NotifyElementModified();
             EnableAll();
         }
         else
         {
             MessageBox.Show("Select an Item to Remove", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     else if (parm.ToString().Equals("btnSliceRemove"))
     {
         if (SelectedSlicerItem != null)
         {
             RemoveItem(GridDataManager.CurrentReport.SlicerElements, SelectedSlicerItem);
             SlicerItems.Remove(SelectedSlicerItem);
             canSlicerRemoveBtn = false;
             SlicerRemoveClick.CanExecute(null);
             GridDataManager.NotifyElementModified();
             EnableAll();
         }
         else
         {
             MessageBox.Show("Select an Item to Remove", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
 }
Example #3
0
 private void DoDimensionClickProcess(object parm)
 {
     if (SelectedDimension != null)
     {
         // Check the existence of the selected dimension in the current report
         // and add it to the current report
         if (!CheckForExistance(SelectedDimension))
         {
             if (parm.ToString().Equals("btnColDimension"))
             {
                 ColumnItems.Add(SelectedDimension);
                 addToReport(AxisType.Categorical, SelectedDimension);
             }
             else if (parm.ToString().Equals("btnRowDimension"))
             {
                 RowItems.Add(SelectedDimension);
                 addToReport(AxisType.Series, SelectedDimension);
             }
             else if (parm.ToString().Equals("btnSliceDimension"))
             {
                 SlicerItems.Add(SelectedDimension);
                 addToReport(AxisType.Slicer, SelectedDimension);
             }
             SelectedDimension = null;
             canShowDimButton  = false;
             DimensionClick.CanExecute(null);
             GridDataManager.NotifyElementModified();
         }
         else
         {
             MessageBox.Show("This element is already exist in the current report", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     else
     {
         MessageBox.Show("Select a Dimension to Add", "Cube Browser", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }