Ejemplo n.º 1
0
        public bool DepositAmount(Guid Identifier, IMoney Deposit)
        {
            IAccountInterface oA = m_oAccounts.Single(a => a.Identifier.Equals(Identifier));

            try
            {
                oA.AddTransaction(
                    ImperaturGlobal.Kernel.Get <ITransactionInterface>(
                        new Ninject.Parameters.ConstructorArgument("_DebitAmount", Deposit),
                        new Ninject.Parameters.ConstructorArgument("_CreditAmount", Deposit),
                        new Ninject.Parameters.ConstructorArgument("_DebitAccount", oA.GetBankAccountsFromCache().First()),
                        new Ninject.Parameters.ConstructorArgument("_CreditAccount", oA.Identifier),
                        new Ninject.Parameters.ConstructorArgument("_TransactionType", TransactionType.Transfer),
                        new Ninject.Parameters.ConstructorArgument("_SecurtiesTrade", (object)null)
                        )
                    );
            }
            catch (Exception ex)
            {
                LastErrorMessage = ex.Message;
                return(false);
            }
            return(true);
        }