/// <summary> /// Opens the respective forms on Datagridview cell double click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgvCurrency_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (frmExchangeRateObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmExchangeRateObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmCompanyCreationObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmCompanyCreationObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmContraVoucherObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmContraVoucherObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmJournalVoucherObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmJournalVoucherObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmPaymentVoucherObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmPaymentVoucherObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmReceiptVoucherObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmReceiptVoucherObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmDebitNoteObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmDebitNoteObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } if (frmCreditNoteObj != null) { if (dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Selected == true) { frmCreditNoteObj.CallFromCurrenCyDetails(this, Convert.ToDecimal(dgvCurrency.CurrentRow.Cells["dgvtxtCurrencyId"].Value.ToString())); } } } catch (Exception ex) { MessageBox.Show("CDP16:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }