/// <summary> /// Function to fill Bank/Cash combobox /// </summary> public void BankOrCashComboFill() { try { List<DataTable> listObj = new List<DataTable>(); TransactionsGeneralFillBll Obj = new TransactionsGeneralFillBll(); listObj = Obj.BankOrCashComboFill(false); DataRow dr = listObj[0].NewRow(); dr[1] = 0; dr[0] = "All"; listObj[0].Rows.InsertAt(dr, 0); cmbBankOrCash.DataSource = listObj[0]; cmbBankOrCash.ValueMember = "ledgerId"; cmbBankOrCash.DisplayMember = "ledgerName"; cmbBankOrCash.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("CR:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Cash or bank combofill /// </summary> public void CashOrBankComboFill() { try { List<DataTable> listObj = new List<DataTable>(); TransactionsGeneralFillBll ObjTransactionsGeneralFillBll = new TransactionsGeneralFillBll(); listObj = ObjTransactionsGeneralFillBll.BankOrCashComboFill(false); cmbBankorCash.DataSource = listObj[0]; cmbBankorCash.ValueMember = "ledgerId"; cmbBankorCash.DisplayMember = "ledgerName"; cmbBankorCash.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show("PV30:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }