private void BtnAdd_Click(object sender, EventArgs e) { //调用窗体 frmKhEdit frm = new frmKhEdit(); frm.ShowDialog(); initDg(); }
private void btnDel_Click(object sender, EventArgs e) { //调用窗体 if (this.dataGridView1.SelectedRows.Count <= 0) { return; } frmKhEdit frm = new frmKhEdit(); frm.ID = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); frm.ShowDialog(); initDg(); }