Beispiel #1
0
        private void QueryOrder()
        {
            switch (comboBox1.SelectedIndex)
            {
            case 0:
                orderBindingSource.DataSource =
                    orderService.QueryById(textBox1.Text);
                break;

            case 1:
                orderBindingSource.DataSource =
                    orderService.QueryByCustomer(textBox1.Text);
                break;

            case 2:
                orderBindingSource.DataSource =
                    orderService.QueryByGoods(textBox1.Text);
                break;

            default:
                orderBindingSource.DataSource = orderService.GetAllOrders();
                break;
            }
            orderBindingSource.ResetBindings(false);
            detailBindingSource.ResetBindings(false);
        }