예제 #1
0
        //删除订单
        private void button4_Click(object sender, EventArgs e)
        {
            Orders orders = new Orders();
            string str1   = label2.Text;
            string str2   = label3.Text;

            for (int i = 0; i < service.mOrders.Count; i++)
            {
                if (service.mOrders[i].orderNumber == str1 && service.mOrders[i].theCustomer == str2)
                {
                    orders = service.mOrders[i];
                    break;
                }
            }
            service.DeleteOrder2(orders);
            BindingSource bs = new BindingSource();

            bs.DataSource             = service;
            bindingSerives.DataSource = bs;
        }