Exemplo n.º 1
0
 /// <summary>
 /// Cash or bank combofill
 /// </summary>
 public void CashOrBankComboFill()
 {
     try
     {
         DataTable      dtbl = new DataTable();
         FillComboBoxes obj  = new FillComboBoxes();
         dtbl = obj.BankOrCashComboFill(false);
         cmbBankorCash.DataSource    = dtbl;
         cmbBankorCash.ValueMember   = "ledgerId";
         cmbBankorCash.DisplayMember = "ledgerName";
         cmbBankorCash.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Account ledger combofill
 /// </summary>
 public void AccountLedgerComboFill()
 {
     try
     {
         DataTable      dtbl = new DataTable();
         FillComboBoxes obj  = new FillComboBoxes();
         dtbl = obj.AccountLedgerComboFill();
         DataRow dr = dtbl.NewRow();
         dr["ledgerId"]   = "0";
         dr["ledgerName"] = string.Empty;
         dtbl.Rows.InsertAt(dr, 0);
         dgvcmbledger.DataSource    = dtbl;
         dgvcmbledger.ValueMember   = "ledgerId";
         dgvcmbledger.DisplayMember = "ledgerName";
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }