Exemple #1
0
        private void FilterButton_Click(object sender, EventArgs e)
        {
            RibbonMode = RibbonMode.Listing;

            var filter = new ComponentFilter
            {
                ComponentTypeID = (FilterComponentTypeDropDown.SelectedValue.AsByte() == 0) ? null : FilterComponentTypeDropDown.SelectedValue.AsByte(),
                Name            = FilterNameTextBox.Text,
                ProductID       = (FilterProductDropDown.SelectedValue.AsInt() == 0) ? null : FilterProductDropDown.SelectedValue.AsInt()
            };

            using (var repository = new SupplyRepository())
            {
                ComponentGrid.DataSource = repository.GetComponentsForPopup(supplyID, filter);
            }
        }