private void cmbPaymentAccount_SelectedIndexChanged(object sender, EventArgs e) { if (!cmbPaymentAccount.Text.ISNullOrWhiteSpace()) { string ledgerid = ((KeyValuePair <string, string>)cmbPaymentAccount.SelectedItem).Key.ToString(); float balance = AccountHeadTools.GetCurrentBalance(ledgerid); } }
private void cmbPaymentAccount_SelectedIndexChanged(object sender, EventArgs e) { if (!cmbPaymentAccount.Text.ISNullOrWhiteSpace()) { string ledgerid = ((KeyValuePair <string, string>)cmbPaymentAccount.SelectedItem).Key.ToString(); float balance = AccountHeadTools.GetCurrentBalance(ledgerid); lblBalance.Text = balance.ToString("0.00"); if (cmbPaymentAccount.Text == TransectionTools._CRAccountTemplateName) { lblBalance.Text = (balance + mTotalPreviousPayment).ToString("0.00"); } } }