コード例 #1
0
 /// <summary>
 /// Function to fill the accountledger combbox 
 /// </summary>
 public void AccountLedgerComboFill()
 {
     try
     {
         AccountLedgerBll bllAccountLedger = new AccountLedgerBll();
         List<DataTable> ListObj = new List<DataTable>();
         ListObj = bllAccountLedger.AccountLedgerViewByAccountGroup(Convert.ToDecimal(cmbAccountGroup.SelectedValue.ToString()));
         DataRow dr = ListObj[0].NewRow();
         dr["ledgerName"] = "All";
         dr["ledgerId"] = 0;
         ListObj[0].Rows.InsertAt(dr, 0);
         cmbAccountLedger.DataSource = ListObj[0];
         cmbAccountLedger.ValueMember = "ledgerId";
         cmbAccountLedger.DisplayMember = "ledgerName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("ALREP3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }