private void btnDetails_Click(object sender, EventArgs e) { CptyAgreement agreement = null; DataRow dr = null; try { if (gridViewAgreements.IsValidRowHandle(gridViewAgreements.FocusedRowHandle)) { dr = gridViewAgreements.GetDataRow(gridViewAgreements.FocusedRowHandle); agreement = CollectionHelper.CreateObjectFromDataRow <CptyAgreement>(dr); frmAgreementDetail agreementDetails = new frmAgreementDetail(cptyInfo, agreement); agreementDetails.ShowDialog(); } else { XtraMessageBox.Show("Please select a valid Agreement."); } } catch (Exception ex) { XtraMessageBox.Show("An error occurred while getting the active document filename." + Environment.NewLine + "Error CNF-221 in " + FORM_NAME + ".btnDetails_Click(): " + ex.Message, FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnDetails_Click(object sender, EventArgs e) { CptyAgreement agreement = null; DataRow dr = null; try { if (gridViewAgreements.IsValidRowHandle(gridViewAgreements.FocusedRowHandle)) { dr = gridViewAgreements.GetDataRow(gridViewAgreements.FocusedRowHandle); agreement = CollectionHelper.CreateObjectFromDataRow<CptyAgreement>(dr); frmAgreementDetail agreementDetails = new frmAgreementDetail(cptyInfo, agreement); agreementDetails.ShowDialog(); } else { XtraMessageBox.Show("Please select a valid Agreement."); } } catch (Exception ex) { XtraMessageBox.Show("An error occurred while getting the active document filename." + Environment.NewLine + "Error CNF-221 in " + FORM_NAME + ".btnDetails_Click(): " + ex.Message, FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } }