private void dgLeaveTypeList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgLeaveTypeList.Rows.Count != 0) { frmLeaveTypeEdit pForm = new frmLeaveTypeEdit(); pForm.FormLeaveTypeList = this; pForm.LeaveTypeCode = dgLeaveTypeList.Rows[e.RowIndex].Cells[0].Value.ToString(); pForm.ShowDialog(); } }
private void tbtnModify_Click(object sender, EventArgs e) { if (dgLeaveTypeList.Rows.Count != 0) { frmLeaveTypeEdit pForm = new frmLeaveTypeEdit(); pForm.FormLeaveTypeList = this; pForm.LeaveTypeCode = dgLeaveTypeList.SelectedRows[0].Cells[0].Value.ToString(); pForm.ShowDialog(); } }