Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            EditDgv editDgv = new EditDgv();

            editDgv.Insert = true;
            editDgv.ShowDialog();
            LoadAllData();
        }
Пример #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            DataGridViewRow _Row = dataGridView1.CurrentRow;

            if (_Row == null)
            {
                MessageBox.Show("没有数据行,当前操作无效!");
                return;
            }
            EditDgv editDgv = new EditDgv();

            editDgv.CurrentRow = _Row;
            editDgv.Insert     = false;
            editDgv.ShowDialog();
            LoadAllData();
        }