Exemple #1
0
        private void 修改该订单ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int currentOrderNumber = odrDataGridView.CurrentRow.Index;
            int orderNumber        = Convert.ToInt32(odrDataGridView.Rows[currentOrderNumber].Cells[0].Value);

            ModifyWin modifyWin = new ModifyWin(this.orderService, orderNumber);

            modifyWin.Show();
            orderBindingSource.DataSource = orderService.QueryAll();
            orderDBindingSource.ResetBindings(isPartial);
            isPartial = false;
        }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            orderService        = new OrderService();
            orderDBindingSource = new BindingSource();

            odrDataGridView.AutoGenerateColumns    = false;
            odrDetailsGridView.AutoGenerateColumns = false;

            selectBy.Items.Add("Time");
            selectBy.Items.Add("Number");
            selectBy.Items.Add("Client");
            selectBy.Items.Add("Address");
            selectBy.Items.Add("Amount");
            selectBy.SelectedItem = selectBy.Items[1];

            modifyWindows = new ModifyWin(this);
            showSelect.Items.Add("当前选中");

            orderBindingSource.DataSource  = orderService.QueryAll();
            orderDBindingSource.DataSource = null;

            odrDataGridView.DataSource    = orderBindingSource;
            odrDetailsGridView.DataSource = orderDBindingSource;
        }