/// <summary> /// Function to fill account group combo /// </summary> public void GroupUnderComboFill() { try { AccountGroupBll bllAccountGroup = new AccountGroupBll(); List <DataTable> ListObj = new List <DataTable>(); ListObj = bllAccountGroup.AccountGroupViewAllComboFill(); cmbGroupUnder.DataSource = ListObj[0]; cmbGroupUnder.ValueMember = "accountGroupId"; cmbGroupUnder.DisplayMember = "accountGroupName"; } catch (Exception ex) { MessageBox.Show("AG2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill account group combo for Search /// </summary> public void GroupUnderSearchComboFill() { try { AccountGroupBll bllAccountGroup = new AccountGroupBll(); List <DataTable> ListObj = new List <DataTable>(); ListObj = bllAccountGroup.AccountGroupViewAllComboFill(); DataRow dr = ListObj[0].NewRow(); dr[1] = "All"; ListObj[0].Rows.InsertAt(dr, 0); cmbGroupUnderSearch.DataSource = ListObj[0]; cmbGroupUnderSearch.ValueMember = "accountGroupId"; cmbGroupUnderSearch.DisplayMember = "accountGroupName"; } catch (Exception ex) { MessageBox.Show("AG3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }