/// <summary> /// Function to fill the service account combo box /// </summary> public void ServiceAcoountComboFill() { try { List<DataTable> ListObj = new List<DataTable>(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); ListObj = bllAccountLedger.AccountLedgerSearchForServiceAccountUnderIncome(); cmbServiceAC.DataSource = ListObj[0]; cmbServiceAC.DisplayMember = "ledgerName"; cmbServiceAC.ValueMember = "ledgerId"; cmbServiceAC.SelectedText = "Service Account"; } catch (Exception ex) { MessageBox.Show("SV 07 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }