private void btn_new_Click(object sender, EventArgs e) { p_PayrollRegisterEntry frm = new p_PayrollRegisterEntry(this, "", true); frm.ShowDialog(); disp_list(); }
private void btn_upd_Click(object sender, EventArgs e) { int r = 0; String code; if (dgv_list.Rows.Count > 1) { r = dgv_list.CurrentRow.Index; code = dgv_list["dgvl_payrollreg_code", r].Value.ToString(); p_PayrollRegisterEntry frm = new p_PayrollRegisterEntry(this, code, false); frm.ShowDialog(); disp_list(); } else { MessageBox.Show("No records to be selected."); } }