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