Exemplo n.º 1
0
        private BLL.Ledger LedgerDAL_BLL(DAL.Ledger ledgerFrom)
        {
            BLL.Ledger ledgerTo = new BLL.Ledger();
            try
            {
                ledgerTo = ledgerFrom.toCopy <BLL.Ledger>(new BLL.Ledger());

                ledgerTo.AccountGroup = AccountGroupDAL_BLL(ledgerFrom.AccountGroup);

                //ledgerTo.CreditLimitType = new BLL.CreditLimitType();
                //ledgerFrom.CreditLimitType.toCopy<BLL.CreditLimitType>(ledgerTo.CreditLimitType);
            }
            catch (Exception ex)
            {
            }
            return(ledgerTo);
        }
Exemplo n.º 2
0
 private BLL.Ledger LedgerDAL_BLL(DAL.Ledger ledgerFrom)
 {
     BLL.Ledger ledgerTo = new BLL.Ledger();
     try
     {
         ledgerTo = ledgerFrom.toCopy <BLL.Ledger>(new BLL.Ledger());
         ledgerTo.AccountGroup = AccountGroupDAL_BLL(ledgerFrom.AccountGroup);
         var bal = ledgerFrom.ACYearLedgerBalances.Where(x => x.ACYearMaster.ACYear == Caller.AccYear).FirstOrDefault();
         if (bal != null)
         {
             ledgerTo.OPDr = bal.DrAmt ?? 0;
             ledgerTo.OPCr = bal.CrAmt ?? 0;
         }
     }
     catch (Exception ex)
     {
     }
     return(ledgerTo);
 }