/// <summary> /// Function to fill Cash/Bank combobox /// </summary> public void LedgerComboFill() { try { DataTable dtbl = new DataTable(); TransactionsGeneralFill obj = new TransactionsGeneralFill(); dtbl = obj.BankOrCashComboFill(false); DataRow dr = dtbl.NewRow(); dr[0] = "All"; dr[1] = 0; dtbl.Rows.InsertAt(dr, 0); cmbAccountLedger.DataSource = dtbl; cmbAccountLedger.DisplayMember = "ledgerName"; cmbAccountLedger.ValueMember = "ledgerId"; } catch (Exception ex) { formMDI.infoError.ErrorString = "PREG2:" + ex.Message; } }
/// <summary> /// Function to fill Cash Or Bank combobox /// </summary> public void CashOrBankComboFill() { try { DataTable dtbl = new DataTable(); TransactionsGeneralFill Obj = new TransactionsGeneralFill(); dtbl = Obj.BankOrCashComboFill(false); DataRow dr = dtbl.NewRow(); dr[1] = 0; dr[0] = "All"; dtbl.Rows.InsertAt(dr, 0); cmbCashOrBank.DataSource = dtbl; cmbCashOrBank.ValueMember = "ledgerId"; cmbCashOrBank.DisplayMember = "ledgerName"; cmbCashOrBank.SelectedIndex = 0; } catch (Exception ex) { formMDI.infoError.ErrorString = "RRP2:" + ex.Message; } }