Exemple #1
0
 public DataFilter (string NewPropertyName, BinaryOperator NewBinaryOperator, Object NewConstant, string NewNameOfFilterTextBox, string NewNameOfFilterComboBox)
 {
     PropertyName = NewPropertyName;
     CurrentBinaryOperator = NewBinaryOperator;
     Constant = NewConstant;
     NameOfFilterTextBox = NewNameOfFilterTextBox;
     NameOfFilterComboBox = NewNameOfFilterComboBox;
 }
Exemple #2
0
 private void FilterComboBoxSelectionChanged(object sender, EventArgs e)
 {
     string CurrentComboBoxName = (sender as ComboBox).Name;
     if ((sender as ComboBox).SelectedItem.ToString() != MyResourses.Texts.NoFilter)
     {
         BinaryOperator SelectedOperator = new BinaryOperator((sender as ComboBox).SelectedItem.ToString());
         AllFilters.Where(res => res.NameOfFilterComboBox == CurrentComboBoxName).First().CurrentBinaryOperator = SelectedOperator;
     }
     else
     {
         AllFilters.Where(res => res.NameOfFilterComboBox == CurrentComboBoxName).First().CurrentBinaryOperator = null;
     }
 }