private void tbtnEdit_Click(object sender, EventArgs e) { if (dgUndertimeList.SelectedRows.Count > 0) { frmUndertimeEdit pForm = new frmUndertimeEdit(); pForm.UndertimeCode = dgUndertimeList.SelectedRows[0].Cells[0].Value.ToString(); pForm.FormUndertimeList = this; pForm.ShowDialog(); } }
private void dgUndertimeList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgUndertimeList.SelectedRows.Count > 0) { frmUndertimeEdit pForm = new frmUndertimeEdit(); pForm.UndertimeCode = dgUndertimeList.Rows[e.RowIndex].Cells[0].Value.ToString(); pForm.FormUndertimeList = this; pForm.ShowDialog(); } } catch { } }