/// <summary>
        /// Apply business method. 
        /// </summary>
        /// <param name="Account">A Account value.</param>
        /// <returns>Returns a Account object.</returns>
        public Account Apply(Account Account)
        {
            Account.Status = AccountStatuses.Pending;
            Account.DateSubmitted = DateTime.Now;
            Account.IsCompleted = false;

            AccountStatusLog log = CreateLog(Account);

            // Data access component declarations.
            var AccountDAC = new AccountDAL();
            var AccountStatusLogDAC = new AccountStatusLogDAL();

            // Check for overlapping Accounts.
            if (AccountDAC.IsOverlap(Account))
            {
                throw new ApplicationException("Date range is overlapping with another Account.");
            }

            using (TransactionScope ts =
                new TransactionScope(TransactionScopeOption.Required))
            {
                // Step 1 - Calling Create on AccountDAC.
                AccountDAC.Create(Account);

                // Step 2 - Calling Create on AccountStatusLogDAC.
                log.AccountID = Account.AccountID;
                AccountStatusLogDAC.Create(log);

                ts.Complete();
            }

            return Account;
        }
        /// <summary>
        /// ListLogsByAccount business method. 
        /// </summary>
        /// <param name="AccountID">A AccountID value.</param>
        /// <returns>Returns a List<AccountStatusLog> object.</returns>
        public List<AccountStatusLog> ListLogsByAccount(long AccountID)
        {
            // Data access component declarations.
            AccountStatusLogDAL AccountStatusLogDAC = new AccountStatusLogDAL();

            // Step 1 - Calling SelectByAccount on AccountStatusLogDAC.
            List<AccountStatusLog> result = AccountStatusLogDAC.SelectByAccount(AccountID);
            return result;

        }
        private void UpdateStatus(Account Account)
        {
            AccountStatusLog log = CreateLog(Account);

            // Data access component declarations.
            var AccountDAC = new AccountDAL();
            var AccountStatusLogDAC = new AccountStatusLogDAL();

            using (TransactionScope ts =
                new TransactionScope(TransactionScopeOption.Required))
            {
                // Step 1 - Calling UpdateById on AccountDAC.
                AccountDAC.UpdateStatus(Account);

                // Step 2 - Calling Create on AccountStatusLogDAC.
                AccountStatusLogDAC.Create(log);

                ts.Complete();
            }
        }