/// <summary> /// function to fill particular combo in datagridview /// </summary> public void AccountLedgerComboFill() { try { List<DataTable> ListObj = new List<DataTable>(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); ListObj = bllAccountLedger.AccountLedgerViewAllForComboBox(); dgvcmbParticular.DataSource = ListObj[0]; dgvcmbParticular.ValueMember = "ledgerId"; dgvcmbParticular.DisplayMember = "ledgerName"; } catch (Exception ex) { MessageBox.Show("BU2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// function to fill type combo /// </summary> public void AccountLedgerSearchFill() { try { List<DataTable> ListObj = new List<DataTable>(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); ListObj = bllAccountLedger.AccountLedgerViewAllForComboBox(); DataRow dr = ListObj[0].NewRow(); dr[1] = "All"; ListObj[0].Rows.InsertAt(dr, 0); cmbTypeSearch.DataSource = ListObj[0]; cmbTypeSearch.ValueMember = "ledgerId"; cmbTypeSearch.DisplayMember = "ledgerName"; } catch (Exception ex) { MessageBox.Show("BU4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }