Beispiel #1
0
 /// <summary>
 /// Removes a Deposit Bank Account to the list of Deposit Bank Accounts
 /// in this Financial Institution
 /// </summary>
 /// <param name="creditLine">Credit Line to be removed</param>
 public virtual void RemoveDepositBankAccount(DepositBankAccount depositBankAccount)
 {
     DepositBankAccounts.Remove (depositBankAccount);
 }
        /// <summary>
        /// Updates a deposit bank account in the system.
        /// </summary>
        /// <param name="depBankAccountToUpdate">depBankAccountToUpdate</param>
        public void UpdateDepositBankAccount(DepositBankAccount depBankAccountToUpdate)
        {
            try
            {
                /* No checks, just update */
                IDepositBankAccountDAO depositBankAccountDAO = _daoFactory.GetDepositBankAccountDAO ();
                depositBankAccountDAO.MakePersistent (depBankAccountToUpdate);
            }
            /* If the exception was thrown here, just pass it up */
            catch (ZiblerBusinessComponentsException ex)
            {
                throw;
            }
            /* Catch any Data Layer or other exception and throw an unkown exception */
            catch (Exception ex)
            {
                ZiblerBusinessComponentsUnknownException exc
                = new ZiblerBusinessComponentsUnknownException (ex);

                /* Throw the new exception */
                throw exc;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Adds a new Deposit Bank Account to the list of Deposit Bank Accounts
 /// in this Financial Institution
 /// </summary>
 /// <param name="creditLine">Credit Line to be added</param>
 public virtual void AddDepositBankAccount(DepositBankAccount depositBankAccount)
 {
     depositBankAccount.FinancialInstitution = this;
     DepositBankAccounts.Add (depositBankAccount);
 }
        /// <summary>
        /// Creates a new Deposit Bank Account in the system.
        /// </summary>
        /// <param name="financialInstitutionName">Financial Institution</param>
        /// <param name="userName">userName</param>
        /// <param name="depositAccount">depositAccount to create</param>
        public void CreateNewDepositBankAccount(string financialInstitutionName,
            string userName,
            DepositBankAccount depositAccount)
        {
            try
            {
                IFinancialInstitutionDAO financialInstitutionDAO = _daoFactory.GetFinancialInstitutionDAO ();

                //Get the financial institution, and add the new interest to it.
                FinancialInstitution financialInstitution = financialInstitutionDAO.GetFinancialInstitutionByName (
                    financialInstitutionName);
                financialInstitution.AddDepositBankAccount (depositAccount);
            }
            /* If the exception was thrown here, just pass it up */
            catch (ZiblerBusinessComponentsException ex)
            {
                throw;
            }
            /* Catch any Data Layer or other exception and throw an unkown exception */
            catch (Exception ex)
            {
                ZiblerBusinessComponentsUnknownException exc
                = new ZiblerBusinessComponentsUnknownException (ex);

                /* Throw the new exception */
                throw exc;
            }
        }