/// <summary> /// Function to fill AccountGroup combobox /// </summary> public void AccountGroupComboFill() { 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); cmbAccountGroup.DataSource = ListObj[0]; cmbAccountGroup.ValueMember = "accountGroupId"; cmbAccountGroup.DisplayMember = "accountGroupName"; } catch (Exception ex) { MessageBox.Show("LP3:" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <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); } }