Exemple #1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            ODForm modifydataframe = new ODForm((Order)orderBindingSource.Current, true);

            //os1.orderList[dataGridView1.SelectedCells[0]]
            modifydataframe.ShowDialog();
            orderBindingSource.DataSource = os1.QueryAll();
            orderBindingSource.ResetBindings(false);
        }
Exemple #2
0
        private void addBtn_Click(object sender, EventArgs e)
        {
            ODForm modifydataframe = new ODForm((Order)orderBindingSource.Current, false);

            modifydataframe.ShowDialog();
            if (modifydataframe.o != null)
            {
                os1.AddOrder(modifydataframe.o);
            }
            //Order od = new Order(3, c2);
            //od.AddDetails(new OrderDetail(new Goods(2, "hi2", 25), 22));
            //os1.AddOrder(od);
            orderBindingSource.DataSource = os1.QueryAll();
            orderBindingSource.ResetBindings(false);
        }