private void tbtnModify_Click(object sender, EventArgs e) { if (dgEmployeeTypeList.SelectedRows.Count > 0) { frmEmployeeTypeEdit pForm = new frmEmployeeTypeEdit(); pForm.FormEmployeeTypeList = this; pForm.EmployeeTypeCode = dgEmployeeTypeList.SelectedRows[0].Cells[0].Value.ToString(); pForm.ShowDialog(); } }
private void dgEmployeeTypeList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgEmployeeTypeList.SelectedRows.Count > 0) { frmEmployeeTypeEdit pForm = new frmEmployeeTypeEdit(); pForm.FormEmployeeTypeList = this; pForm.EmployeeTypeCode = dgEmployeeTypeList.Rows[e.RowIndex].Cells[0].Value.ToString(); pForm.ShowDialog(); } }