Пример #1
0
        //销账
        private void toolPayAccount_Click(object sender, EventArgs e)
        {
            if (dgvCustomerList.CurrentCell == null)
            {
                return;
            }

            var _customer = db.Customer.FirstOrDefault(x => x.name == dgvCustomerList.CurrentRow.Cells[0].Value.ToString());
            var form      = new payAccountForm(db, _customer);

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            int r = dgvCustomerList.CurrentCell.RowIndex;
            int c = dgvCustomerList.CurrentCell.ColumnIndex;

            dgvCustomer_show();
            dgvCustomerList.CurrentCell = dgvCustomerList[c, r];

            dgvPays_show(_customer);
        }
        //销账
        private void toolPayAccount_Click(object sender, EventArgs e)
        {
            if (dgvCustomerList.CurrentCell == null)
                return;

            var _customer = db.Customer.FirstOrDefault(x => x.name == dgvCustomerList.CurrentRow.Cells[0].Value.ToString());
            var form = new payAccountForm(db, _customer);
            if (form.ShowDialog() != DialogResult.OK)
                return;

            int r = dgvCustomerList.CurrentCell.RowIndex;
            int c = dgvCustomerList.CurrentCell.ColumnIndex;
            dgvCustomer_show();
            dgvCustomerList.CurrentCell = dgvCustomerList[c, r];

            dgvPays_show(_customer);
        }