Exemple #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormUpdae form2 = new FormUpdae(new Order());

            if (form2.ShowDialog() == DialogResult.OK)
            {
                orderService.AddOrder(form2.CurrentOrder);
                QueryAll();
            }
        }
Exemple #2
0
        private void EditOrder()
        {
            Order order = orderBindingSource.Current as Order;

            if (order == null)
            {
                MessageBox.Show("请选择一个订单进行修改");
                return;
            }
            FormUpdae form2 = new FormUpdae(order, true);

            if (form2.ShowDialog() == DialogResult.OK)
            {
                orderService.UpdateOrder(form2.CurrentOrder);
                QueryAll();
            }
        }