/// <summary> /// Against references button click for party balance calculations /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAgainstRef_Click(object sender, EventArgs e) { try { AccountLedgerSP spaccountledger = new AccountLedgerSP(); if (spaccountledger.AccountGroupIdCheck(cmbAccountLedger.Text)) { frmPartyBalance frmpartybalance = new frmPartyBalance(); frmpartybalance.MdiParent = formMDI.MDIObj; if (!isAutomatic) { if (txtvoucherNo.Text == string.Empty) { MessageBox.Show("Voucher Number Empty", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); txtvoucherNo.Focus(); } else { frmpartybalance.CallThisFormFromPDCPayable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCpayableVoucherTypeId, txtvoucherNo.Text, DateTime.Parse(txtVoucherDate.Text)); } } else { frmpartybalance.CallThisFormFromPDCPayable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCpayableVoucherTypeId, strVoucherNo, DateTime.Parse(txtVoucherDate.Text)); } } } catch (Exception ex) { MessageBox.Show("PP43:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }