public List <DataTable> AccountLedgerViewByAccountGroup(decimal decAccounGroupId) { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spAccountLedger.AccountLedgerViewByAccountGroup(decAccounGroupId); } catch (Exception ex) { MessageBox.Show("AL35:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill the accountledger combbox /// </summary> public void AccountLedgerComboFill() { try { AccountLedgerSP spAccountLedger = new AccountLedgerSP(); DataTable dtblAccountLedger = new DataTable(); dtblAccountLedger = spAccountLedger.AccountLedgerViewByAccountGroup(Convert.ToDecimal(cmbAccountGroup.SelectedValue.ToString())); DataRow dr = dtblAccountLedger.NewRow(); dr["ledgerName"] = "All"; dr["ledgerId"] = 0; dtblAccountLedger.Rows.InsertAt(dr, 0); cmbAccountLedger.DataSource = dtblAccountLedger; cmbAccountLedger.ValueMember = "ledgerId"; cmbAccountLedger.DisplayMember = "ledgerName"; } catch (Exception ex) { MessageBox.Show("ALREP3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill the accountledger combbox /// </summary> public void AccountLedgerComboFill() { try { AccountLedgerSP spAccountLedger = new AccountLedgerSP(); DataTable dtblAccountLedger = new DataTable(); dtblAccountLedger = spAccountLedger.AccountLedgerViewByAccountGroup(Convert.ToDecimal(cmbAccountGroup.SelectedValue.ToString())); DataRow dr = dtblAccountLedger.NewRow(); dr["ledgerName"] = "All"; dr["ledgerId"] = 0; dtblAccountLedger.Rows.InsertAt(dr, 0); cmbAccountLedger.DataSource = dtblAccountLedger; cmbAccountLedger.ValueMember = "ledgerId"; cmbAccountLedger.DisplayMember = "ledgerName"; } catch (Exception ex) { formMDI.infoError.ErrorString = "ALREP3:" + ex.Message; } }