/// <summary> /// /// </summary> /// <returns></returns> public List <DataTable> AccountGroupViewAllComboFillForAccountLedger() { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spAccountGroup.AccountGroupViewAllComboFillForAccountLedger(); } catch (Exception ex) { MessageBox.Show("AG13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill the accountgroup combo box /// </summary> public void AccountGroupComboFill() { try { AccountGroupSP spAccountGroup = new AccountGroupSP(); DataTable dtblAccountGroup = new DataTable(); dtblAccountGroup = spAccountGroup.AccountGroupViewAllComboFillForAccountLedger(); DataRow dr = dtblAccountGroup.NewRow(); dr["accountGroupName"] = "All"; dr["accountGroupId"] = -1; dtblAccountGroup.Rows.InsertAt(dr, 0); cmbAccountGroup.DataSource = dtblAccountGroup; cmbAccountGroup.ValueMember = "accountGroupId"; cmbAccountGroup.DisplayMember = "accountGroupName"; } catch (Exception ex) { MessageBox.Show("ALREP2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }