コード例 #1
0
 /// <summary>
 /// To fill combo with all ledgers to whome interest enabled is true
 /// </summary>
 public void FillInterestEnabledLedgersCombo()
 {
     try
     {
         PartyBalanceBll BllPartyBalance = new PartyBalanceBll();
         List<DataTable> listCashOrParty = BllPartyBalance.AccountLedgerGetByDebtorAndCreditorWithBalance();
         DataRow dr1 = listCashOrParty[0].NewRow();
         dr1["ledgerName"] = "All";
         dr1["ledgerId"] = 0;
         listCashOrParty[0].Rows.InsertAt(dr1, 0);
         cmbLedger.DataSource = listCashOrParty[0];
         cmbLedger.DisplayMember = "ledgerName";
         cmbLedger.ValueMember = "ledgerId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("AR2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }