예제 #1
0
        private void AddItemBtn_Click(object sender, EventArgs e)
        {
            EditItemForm form = new EditItemForm(order);

            form.FormClosed += (S, E) => OrderDetailBS.DataSource = order.GetDetails();
            form.ShowDialog();
        }
예제 #2
0
        private void UpdateItemBtn_Click(object sender, EventArgs e)
        {
            List <OrderDetail> details = GetSelectedDetails();

            if (details.Count == 0)
            {
                MessageBox.Show("未选择任何商品", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            EditItemForm form = new EditItemForm(order, details[0]);

            form.FormClosed += (S, E) => OrderDetailBS.DataSource = order.GetDetails();
            form.ShowDialog();
        }