private void btn_add_Click(object sender, EventArgs e) { AddModelForm frm = new AddModelForm(); if (frm.ShowDialog() == DialogResult.OK) { searchdata(ref dgv_model, true); } }
private void btn_edit_Click(object sender, EventArgs e) { AddModelForm frm = new AddModelForm(); Class.valiballecommon va = Class.valiballecommon.GetStorage(); va.value1 = dgv_model.Rows[dgv_model.SelectedCells[0].RowIndex].Cells[1].Value.ToString(); va.value2 = dgv_model.Rows[dgv_model.SelectedCells[0].RowIndex].Cells[2].Value.ToString(); if (frm.ShowDialog() == DialogResult.OK) { searchdata(ref dgv_model, true); } }