Example #1
0
        public void TestAddDateFilterDateTimePicker_Composites()
        {
            //---------------Set up test pack-------------------
            IControlFactory      factory             = GetControlFactory();
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = factory.CreateFilterControl();
            DateTime             testDate1           = DateTime.Now;
            DateTime             testDate2           = testDate1.AddDays(1);

            filterControl.AddDateFilterDateTimePicker("test1:", "TestColumn1", testDate1, FilterClauseOperator.OpLessThan, false);
            filterControl.AddDateFilterDateTimePicker("test2:", "TestColumn2", testDate2, FilterClauseOperator.OpLessThan, false);

            //---------------Execute Test ----------------------
            string expectedFilterClause = filterControl.GetFilterClause().GetFilterClauseString();

            //---------------Test Result -----------------------
            IFilterClause clause1 =
                filterClauseFactory.CreateDateFilterClause("TestColumn1", FilterClauseOperator.OpLessThan, new DateTime(testDate1.Year, testDate1.Month, testDate1.Day));
            IFilterClause clause2 =
                filterClauseFactory.CreateDateFilterClause("TestColumn2", FilterClauseOperator.OpLessThan, new DateTime(testDate2.Year, testDate2.Month, testDate2.Day));
            IFilterClause compClause =
                filterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpAnd, clause2);

            Assert.AreEqual(compClause.GetFilterClauseString(), expectedFilterClause);

            //---------------Tear Down -------------------------
        }
Example #2
0
        public void TestWithColumnNameMoreThanOneWord()
        {
            IFilterClause filterClause =
                _filterClauseFactory.CreateIntegerFilterClause("Test Column", FilterClauseOperator.OpEquals, 12);

            Assert.AreEqual("[Test Column] = 12", filterClause.GetFilterClauseString());
        }
Example #3
0
        public void Test_Search_LikeWithString()
        {
            IFilterClause filterClause =
                _filterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpLike, "testvalue");

            Assert.AreEqual("TestColumn like '%testvalue%'", filterClause.GetFilterClauseString("%", ""));
        }
        public void TestAdd_DateRangeFilterComboBoxExclusive()
        {
            //---------------Set up test pack-------------------

            IFilterControl       filterControl       = GetControlFactory().CreateFilterControl();
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            DateTime             testDate            = new DateTime(2007, 1, 2, 3, 4, 5, 6);

            //---------------Execute Test ----------------------
            IDateRangeComboBox dr1 = filterControl.AddDateRangeFilterComboBox("test", "test", false, false);

            dr1.UseFixedNowDate = true;
            dr1.FixedNowDate    = testDate;
            dr1.SelectedItem    = "Today";
            IFilterClause clause1 =
                filterClauseFactory.CreateDateFilterClause("test", FilterClauseOperator.OpGreaterThan,
                                                           new DateTime(2007, 1, 2, 0, 0, 0));
            IFilterClause clause2 =
                filterClauseFactory.CreateDateFilterClause("test", FilterClauseOperator.OpLessThan,
                                                           new DateTime(2007, 1, 2, 23, 59, 59, 999));
            IFilterClause compClause =
                filterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpAnd, clause2);

            //---------------Test Result -----------------------

            Assert.AreEqual(compClause.GetFilterClauseString(), filterControl.GetFilterClause().GetFilterClauseString());
        }
Example #5
0
        public void TestEqualsWithInteger()
        {
            IFilterClause filterClause =
                _filterClauseFactory.CreateIntegerFilterClause("TestColumn", FilterClauseOperator.OpEquals, 12);

            Assert.AreEqual("TestColumn = 12", filterClause.GetFilterClauseString());
        }
        public void TestTwoStringTextBoxFilter()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory itsFilterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl          = GetControlFactory().CreateFilterControl();
            ITextBox             tb = filterControl.AddStringFilterTextBox("Test:", "TestColumn");

            tb.Text = "testvalue";
            ITextBox tb2 = filterControl.AddStringFilterTextBox("Test:", "TestColumn2");

            tb2.Text = "testvalue2";

            //---------------Execute Test ----------------------
            string filterClauseString = filterControl.GetFilterClause().GetFilterClauseString();

            //---------------Test Result -----------------------
            IFilterClause clause1 =
                itsFilterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpLike, "testvalue");
            IFilterClause clause2 =
                itsFilterClauseFactory.CreateStringFilterClause("TestColumn2", FilterClauseOperator.OpLike, "testvalue2");
            IFilterClause fullClause =
                itsFilterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpAnd, clause2);

            Assert.AreEqual(fullClause.GetFilterClauseString(), filterClauseString);

            //---------------Tear Down -------------------------
        }
Example #7
0
        public void TestEqualsWithString()
        {
            IFilterClause filterClause =
                _filterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpEquals, "testvalue");

            Assert.AreEqual("TestColumn = 'testvalue'", filterClause.GetFilterClauseString());
        }
Example #8
0
        public void Test_ClearFilterClause_ShouldDoNothing()
        {
            //---------------Set up test pack-------------------
            string propertyName = TestUtil.GetRandomString();
            const FilterClauseOperator filterClauseOperator = FilterClauseOperator.OpGreaterThan;
            const string       filterValue = "constantValue";
            StringStaticFilter filter      = new StringStaticFilter(propertyName, filterClauseOperator, filterValue);
            //---------------Assert Precondition----------------
            IFilterClause filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());

            Assert.AreEqual(string.Format("{0} > '{1}'", propertyName, filterValue), filterClause.GetFilterClauseString());
            //---------------Execute Test ----------------------
            filter.Clear();
            //---------------Test Result -----------------------
            filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());
            Assert.AreEqual(string.Format("{0} > '{1}'", propertyName, filterValue), filterClause.GetFilterClauseString());
        }
Example #9
0
        public void Test_Search_EqualsWithInteger()
        {
            //---------------Execute Test ----------------------
            IFilterClause filterClause =
                _filterClauseFactory.CreateIntegerFilterClause("TestColumn", FilterClauseOperator.OpEquals, 12);

            //---------------Test Result -----------------------
            Assert.AreEqual("TestColumn = 12", filterClause.GetFilterClauseString("%", ""));
        }
Example #10
0
        /// <summary>
        /// Returns the filter clause as a string. The filter clause is a clause used for filtering
        /// a ADO.Net <see cref="DataView"/>
        /// </summary>
        /// <returns>Returns a string</returns>
        public string GetFilterClauseString(string stringLikeDelimiter, string dateTimeDelimiter)
        {
            string leftFilterClauseString  = _leftClause.GetFilterClauseString(stringLikeDelimiter, dateTimeDelimiter);
            string rightFilterClauseString = _rightClause.GetFilterClauseString(stringLikeDelimiter, dateTimeDelimiter);

            if (leftFilterClauseString.Length > 0 && rightFilterClauseString.Length > 0)
            {
                return(GetLeftClause(stringLikeDelimiter, dateTimeDelimiter) + GetOperatorClause() + GetRightClause(stringLikeDelimiter, dateTimeDelimiter));
            }
            if (leftFilterClauseString.Length > 0)
            {
                return(leftFilterClauseString);
            }
            if (rightFilterClauseString.Length > 0)
            {
                return(rightFilterClauseString);
            }
            return("");
        }
Example #11
0
        public void Test_Search_EqualsWithString()
        {
            //---------------Execute Test ----------------------
            IFilterClause filterClause =
                _filterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpEquals, "testvalue");

            //---------------Test Result -----------------------
            Assert.AreEqual("TestColumn = 'testvalue'", filterClause.GetFilterClauseString("%", ""));
            //---------------Tear Down -------------------------
        }
        public void TestCompositeWithNullClauses()
        {
            IFilterClause nullFilterClause = itsFilterClauseFactory.CreateNullFilterClause();
            IFilterClause intFilterClause  =
                itsFilterClauseFactory.CreateIntegerFilterClause("TestColumnInt", FilterClauseOperator.OpEquals, 12);
            IFilterClause compositeClause =
                itsFilterClauseFactory.CreateCompositeFilterClause(nullFilterClause, FilterClauseCompositeOperator.OpOr,
                                                                   intFilterClause);

            Assert.AreEqual("TestColumnInt = 12", compositeClause.GetFilterClauseString());
        }
Example #13
0
        public void Test_Search_DateEquals()
        {
            DateTime filterValue = DateTime.Now.AddDays(-2);
            //---------------Execute Test ----------------------
            IFilterClause filterClause =
                _filterClauseFactory.CreateDateFilterClause("TestColumn", FilterClauseOperator.OpEquals, filterValue);
            //---------------Test Result -----------------------
            string expectedFilterClause = string.Format("TestColumn = '{0}'", filterValue.ToString("dd MMM yyyy HH:mm:ss"));

            Assert.AreEqual(expectedFilterClause, filterClause.GetFilterClauseString("%", "'"));
        }
        public void TestCreateNullFilterClause()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory itsFilterClauseFactory = new DataViewFilterClauseFactory();
            //---------------Execute Test ----------------------
            IFilterClause filterClause =
                itsFilterClauseFactory.CreateNullFilterClause();

            //---------------Test Result -----------------------
            Assert.AreEqual("", filterClause.GetFilterClauseString());
        }
        public void TestCompositeEqualsWithOr()
        {
            IFilterClause clause1 =
                filterClauseFactory.CreateStringFilterClause("h a", FilterClauseOperator.OpEquals, "Peter");
            IFilterClause clause2 =
                filterClauseFactory.CreateStringFilterClause("h a", FilterClauseOperator.OpEquals, "Kelly");
            IFilterClause compositeClause =
                filterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpOr, clause2);

            dv.RowFilter = compositeClause.GetFilterClauseString();
            Assert.AreEqual(2, dv.Count);
        }
Example #16
0
        public void Test_GetFilterClause_WhenOpIs_ShouldNotSetValueDelimiters()
        {
            //---------------Set up test pack-------------------
            string propertyName = TestUtil.GetRandomString();
            const FilterClauseOperator filterClauseOperator = FilterClauseOperator.Is;
            const string       filterValue = "NULL";
            StringStaticFilter filter      = new StringStaticFilter(propertyName, filterClauseOperator, filterValue);
            //---------------Execute Test ----------------------
            IFilterClause filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());

            //---------------Test Result -----------------------
            Assert.AreEqual(string.Format("{0} Is {1}", propertyName, filterValue), filterClause.GetFilterClauseString());
        }
        public void TestCompositeWithOr()
        {
            IFilterClause stringFilterClause =
                itsFilterClauseFactory.CreateStringFilterClause("TestColumnString", FilterClauseOperator.OpEquals,
                                                                "testvalue");
            IFilterClause intFilterClause =
                itsFilterClauseFactory.CreateIntegerFilterClause("TestColumnInt", FilterClauseOperator.OpEquals, 12);
            IFilterClause compositeClause =
                itsFilterClauseFactory.CreateCompositeFilterClause(stringFilterClause,
                                                                   FilterClauseCompositeOperator.OpOr, intFilterClause);

            Assert.AreEqual("(TestColumnString = 'testvalue') or (TestColumnInt = 12)",
                            compositeClause.GetFilterClauseString());
        }
Example #18
0
        public void Test_FilterClause_WithEnum()
        {
            //---------------Set up test pack-------------------

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            IFilterClause filterClause =
                _filterClauseFactory.CreateEnumFilterClause("TestColumn", FilterClauseOperator.OpEquals, PurchaseOrderStatus.Processed);

            //---------------Test Result -----------------------
            string expectedFilterClause = string.Format("TestColumn = '{0}'", PurchaseOrderStatus.Processed);

            Assert.AreEqual(expectedFilterClause, filterClause.GetFilterClauseString("%", "'"));
        }
        public void TestGetComboBoxFilterClauseNoSelection()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = GetControlFactory().CreateFilterControl();
            IComboBox            comboBox            = TestFilterControlManager.GetFilterComboBox_2Items(filterControl);

            //---------------Execute Test ----------------------
            comboBox.SelectedIndex = -1;
            string filterClauseString = filterControl.GetFilterClause().GetFilterClauseString();
            //---------------Test Result -----------------------
            IFilterClause clause = filterClauseFactory.CreateNullFilterClause();

            Assert.AreEqual(clause.GetFilterClauseString(), filterClauseString);
            //---------------Tear Down -------------------------
        }
        public void TestAddStringFilterCheckBox()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = GetControlFactory().CreateFilterControl();

            //---------------Execute Test ----------------------
            filterControl.AddBooleanFilterCheckBox("Test?", "TestColumn", true);
            //---------------Test Result -----------------------
            IFilterClause clause =
                filterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpEquals, "true");

            Assert.AreEqual(clause.GetFilterClauseString(), filterControl.GetFilterClause().GetFilterClauseString());

            //---------------Tear Down -------------------------
        }
        public void Test_Filter_CompositeEqualsWithAnd()
        {
            //---------------Set up test pack-------------------

            IFilterClause clause1 =
                filterClauseFactory.CreateStringFilterClause("h a", FilterClauseOperator.OpLike, "Peter");
            IFilterClause clause2 =
                filterClauseFactory.CreateStringFilterClause("h a", FilterClauseOperator.OpLike, "Kelly");
            IFilterClause compositeClause =
                filterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpAnd, clause2);

            //---------------Execute Test ----------------------

            string expectedFilterString = compositeClause.GetFilterClauseString();

            //---------------Test Result -----------------------
            Assert.AreEqual("([h a] like '*Peter*') and ([h a] like '*Kelly*')", expectedFilterString);
        }
Example #22
0
        public void TestAddDateFilterDateTimePicker_DefaultDateCorrect()
        {
            //---------------Set up test pack-------------------
            IControlFactory      factory             = GetControlFactory();
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = factory.CreateFilterControl();
            DateTime             testDate            = DateTime.Today.AddDays(-2);

            //---------------Execute Test ----------------------
            filterControl.AddDateFilterDateTimePicker("test:", "TestColumn", testDate, FilterClauseOperator.OpGreaterThan, false);
            string expectedFilterClause = filterControl.GetFilterClause().GetFilterClauseString();
            //---------------Test Result -----------------------
            IFilterClause clause =
                filterClauseFactory.CreateDateFilterClause("TestColumn", FilterClauseOperator.OpGreaterThan, new DateTime(testDate.Year, testDate.Month, testDate.Day));

            Assert.AreEqual(clause.GetFilterClauseString(), expectedFilterClause);
            //---------------Tear Down -------------------------
        }
        public void TestGetTextBoxFilterClause_Equals()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory itsFilterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl          = GetControlFactory().CreateFilterControl();
            ITextBox             tb = filterControl.AddStringFilterTextBox("Test:", "TestColumn", FilterClauseOperator.OpEquals);

            //---------------Execute Test ----------------------
            tb.Text = "testvalue";
            string filterClauseString = filterControl.GetFilterClause().GetFilterClauseString();

            //---------------Test Result -----------------------
            IFilterClause clause =
                itsFilterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpEquals, "testvalue");

            Assert.AreEqual(clause.GetFilterClauseString(), filterClauseString);

            //---------------Tear Down -------------------------
        }
        public void Test_AddStaticFilterClause()
        {
            //---------------Set up test pack-------------------
            IFilterControl filterControl = GetControlFactory().CreateFilterControl();
            //---------------Execute Test ----------------------
            const string propertyName = "TestColumn2";
            const string filtervalue  = "FilterValue";

            filterControl.AddStaticStringFilterClause(propertyName, FilterClauseOperator.OpGreaterThan, filtervalue);
            //---------------Test Result -----------------------
            Assert.AreEqual(1, filterControl.FilterControls.Count);
            ICustomFilter control = filterControl.FilterControls[0];

            Assert.AreEqual(propertyName, control.PropertyName);
            Assert.AreEqual(FilterClauseOperator.OpGreaterThan, control.FilterClauseOperator);
            IFilterClause filterClause = control.GetFilterClause(new DataViewFilterClauseFactory());

            Assert.AreEqual(string.Format("{0} > '{1}'", propertyName, filtervalue), filterClause.GetFilterClauseString());
        }
        public void TestGetComboBoxFilterClause()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = GetControlFactory().CreateFilterControl();
            IComboBox            comboBox            = GetFilterComboBox_2Items(filterControl);

            //---------------Execute Test ----------------------
            comboBox.SelectedIndex = 1;
            string filterClauseString = filterControl.GetFilterClause().GetFilterClauseString();

            //---------------Test Result -----------------------
            IFilterClause clause =
                filterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpEquals, "1");

            Assert.AreEqual(clause.GetFilterClauseString(), filterClauseString);

            //---------------Tear Down -------------------------
        }
Example #26
0
        public void TestFilterClause()
        {
            //---------------Set up test pack-------------------
            string propertyName = TestUtil.GetRandomString();
            const FilterClauseOperator filterClauseOperator = FilterClauseOperator.OpGreaterThan;
            StringTextBoxFilter        filter = new StringTextBoxFilter(GetControlFactory(), propertyName, filterClauseOperator);
            ITextBox textBox = (ITextBox)filter.Control;
            string   text    = TestUtil.GetRandomString();

            textBox.Text = text;

            //---------------Execute Test ----------------------

            IFilterClause filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());

            //---------------Test Result -----------------------

            Assert.AreEqual(string.Format("{0} > '{1}'", propertyName, text), filterClause.GetFilterClauseString());
            //---------------Tear Down -------------------------
        }
        public void TestGetMulitplePropTextBoxFilterClause()
        {
            //---------------Set up test pack-------------------
            IFilterClauseFactory itsFilterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl          = GetControlFactory().CreateFilterControl();
            ITextBox             tb = filterControl.AddMultiplePropStringTextBox("Test:", new List <string> {
                "TestColumn"
            });

            //---------------Execute Test ----------------------
            tb.Text = "testvalue";
            string filterClauseString = filterControl.GetFilterClause().GetFilterClauseString();

            //---------------Test Result -----------------------
            IFilterClause clause =
                itsFilterClauseFactory.CreateStringFilterClause("TestColumn", FilterClauseOperator.OpLike, "testvalue");

            Assert.AreEqual(clause.GetFilterClauseString(), filterClauseString);

            //---------------Tear Down -------------------------
        }
        public void Test_Filter_CompositeEqualsWithAnd_Date()
        {
            //---------------Set up test pack-------------------

            IFilterClause clause1 =
                filterClauseFactory.CreateDateFilterClause("h a", FilterClauseOperator.OpEquals, DateTime.Now);
            IFilterClause clause2 =
                filterClauseFactory.CreateDateFilterClause("h a", FilterClauseOperator.OpEquals, DateTime.Now);
            IFilterClause compositeClause =
                filterClauseFactory.CreateCompositeFilterClause(clause1, FilterClauseCompositeOperator.OpAnd, clause2);

            string expectedDateString       = DateTime.Now.ToString("dd MMM yyyy HH:mm:ss");
            string expectedDateFilterClause = string.Format("([h a] = #{0}#) and ([h a] = #{0}#)", expectedDateString);
            //---------------Execute Test ----------------------

            string filterString = compositeClause.GetFilterClauseString();

            //---------------Test Result -----------------------

            Assert.AreEqual(expectedDateFilterClause, filterString);
        }
Example #29
0
        public void TestAddDateFilterDateTimePicker_OpLessThanOrEqualToOperator()
        {
            //---------------Set up test pack-------------------
            IControlFactory      factory             = GetControlFactory();
            IFilterClauseFactory filterClauseFactory = new DataViewFilterClauseFactory();
            IFilterControl       filterControl       = factory.CreateFilterControl();
            DateTime             testDate            = DateTime.Today.AddDays(-2);
            IDateTimePicker      dtePicker           = filterControl.AddDateFilterDateTimePicker("test:", "TestColumn", testDate, FilterClauseOperator.OpLessThanOrEqualTo, false);
            //---------------Execute Test ----------------------
            DateTime newDateTime = DateTime.Today.AddDays(+4);

            dtePicker.Value = newDateTime;
            string expectedFilterClause = filterControl.GetFilterClause().GetFilterClauseString();
            //---------------Test Result -----------------------
            IFilterClause clause =
                filterClauseFactory.CreateDateFilterClause("TestColumn", FilterClauseOperator.OpLessThanOrEqualTo, new DateTime(newDateTime.Year, newDateTime.Month, newDateTime.Day));

            Assert.AreEqual(clause.GetFilterClauseString(), expectedFilterClause);

            //---------------Tear Down -------------------------
        }
Example #30
0
        public void TestFilterClause_1Prop()
        {
            //---------------Set up test pack-------------------
            const FilterClauseOperator filterClauseOperator = FilterClauseOperator.OpGreaterThan;
            List <string> props = new List <string> {
                "prop1"
            };
            MultiplePropStringTextBoxFilter filter = new MultiplePropStringTextBoxFilter(GetControlFactory(), props, filterClauseOperator);
            ITextBox textBox = (ITextBox)filter.Control;
            string   text    = TestUtil.GetRandomString();

            textBox.Text = text;

            //---------------Execute Test ----------------------

            IFilterClause filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());

            //---------------Test Result -----------------------

            Assert.AreEqual(string.Format("{0} > '{1}'", props[0], text), filterClause.GetFilterClauseString());
            //---------------Tear Down -------------------------
        }
        /// <summary>
        /// See <see cref="IGridBase.ApplyFilter"/>
        /// </summary>
        public void ApplyFilter(IFilterClause filterClause)
        {
            var bindingList = _gridBase.DataSource as IBindingListView;
            if (bindingList == null)
            {
                throw new GridBaseInitialiseException
                    ("You cannot apply filters as the grid DataSource has not been set with a IBindingListView");
            }
            var filterClauseString = filterClause != null ? filterClause.GetFilterClauseString("%", "#") : null;

            try
            {
                bindingList.Filter = filterClauseString;
            }
            catch (Exception e)
            {
                throw new HabaneroApplicationException(
                    e.Message + Environment.NewLine +
                    "An Error Occured while trying to Filter the grid with filterClause '" +
                    filterClauseString + "'", e);
            }
        }
 /// <summary>
 /// Applies a search clause to the underlying collection and reloads the grid.
 /// The search allows you to determine which objects to display using
 /// some criteria.  This is typically generated by the an <see cref="IFilterControl"/>.
 /// </summary>
 /// <param name="searchClause">The search clause</param>
 /// <param name="orderBy"></param>
 public void ApplySearch(IFilterClause searchClause, string orderBy)
 {
     string filterClauseString = searchClause.GetFilterClauseString("%", "'");
     ApplySearch(filterClauseString, orderBy);
 }