private void btnAdd_Click(object sender, EventArgs e) { frmTMItem f = new frmTMItem(); if(f.ShowDialog () == DialogResult .OK ) { Fill (); } }
private void btnEdit_Click(object sender, EventArgs e) { if (this.dataGridView1.CurrentRow != null) { Debug.Assert(GetSelectedTM() != null); frmTMItem f = new frmTMItem(); f.TblTM = GetSelectedTM(); if (f.ShowDialog() == DialogResult.OK) { Fill(); } } }