Exemplo n.º 1
0
        //Event Triggered by Base Category ComboBox on "SelectionChange"
        //Search the Library by Base Category
        //and display the results in the DataGrid
        private void SearchBase(object sender, SelectionChangedEventArgs e)
        {
            //Fill the Inner Category Control
            //By Selected Base Category
            FillInner();

            //If we are in Regular Search mode and user
            //chooses one of the Base Category options
            if (!IsMultiSearch && cmbBaseCategory.SelectedItem != null)
            {
                //Search the Library by Base Category
                //and display the results in the DataGrid
                dataLib.ItemsSource =
                    mainLibrary.FindByBaseCategory((eBaseCategory)cmbBaseCategory.SelectedItem);
            }
            else if (IsMultiSearch)
            {
                //Make Multiply Search by numerous parameters
                //including search by Base Category
                MultipleSearch();
            }
        }