コード例 #1
0
        public List <User_Bank_Account> LoadAllUserBankAccount()
        {
            List <string> messages    = new List <string>();
            var           userBankLst = new List <User_Bank_Account>();

            try
            {
                userBankLst = new UserBankAccountQueryBuilder(new WalletEntities()).GetAllUserBankAccount().ToList();
            }
            catch (Exception ex)
            {
                var logWallet = new LogWallet();
                Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), "", ex, ""));
            }
            return(userBankLst);
        }
コード例 #2
0
        public User_Bank_Account UserBankAccountByID(string id)
        {
            List <string> messages = new List <string>();
            var           userBank = new User_Bank_Account();

            try
            {
                userBank = new UserBankAccountQueryBuilder(new WalletEntities()).UserBankAccount_ByID(id).FirstOrDefault();
            }
            catch (Exception ex)
            {
                var logWallet = new LogWallet();
                Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), "", ex, ""));
            }
            return(userBank);
        }
コード例 #3
0
 public bool DeleteUserBankAcc(string IDBankAcc)
 {
     try
     {
         using (var eWalletTransactionUnitOfWork = new WalletTransactionUow(new WalletEntities()))
         {
             eWalletTransactionUnitOfWork.BeginTransaction();
             var UserBankAcc = new UserBankAccountQueryBuilder(new WalletEntities()).HasID(IDBankAcc).FirstOrDefault();
             eWalletTransactionUnitOfWork.DoDelete(UserBankAcc);
             eWalletTransactionUnitOfWork.EndTransaction();
         }
         return(true);
     }
     catch (Exception ex)
     {
         var logWallet = new LogWallet();
         Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), IDBankAcc, ex, ""));
         return(false);
     }
 }
コード例 #4
0
        /// <summary>
        /// Get AspNetUser by aspNetUserId
        /// </summary>
        /// <param name="aspNetUserId"></param>
        /// <returns></returns>
        public List <User_Bank_Account> GetBankAccwithoutPending()
        {
            var user_bank = new List <User_Bank_Account>();

            try
            {
                var transactionOptions = new System.Transactions.TransactionOptions();
                transactionOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
                using (var transactionScope = new System.Transactions.TransactionScope(System.Transactions.TransactionScopeOption.Required, transactionOptions))
                {
                    user_bank = new UserBankAccountQueryBuilder(new WalletEntities()).GetBankAccwithoutPending().ToList();
                }
                return(user_bank);
            }
            catch (Exception ex)
            {
                var logWallet = new LogWallet();
                Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), "", ex, ""));
                return(user_bank);
            }
        }
コード例 #5
0
        public List <User_Bank_Account> LoadVerificationStatus(string userID, string currency)
        {
            List <string> messages = new List <string>();
            var           userBank = new List <User_Bank_Account>();

            try
            {
                var transactionOptions = new System.Transactions.TransactionOptions();
                transactionOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
                using (var transactionScope = new System.Transactions.TransactionScope(System.Transactions.TransactionScopeOption.Required, transactionOptions))
                {
                    userBank = new UserBankAccountQueryBuilder(new WalletEntities()).GetInfoUserBankAccount(userID, currency).ToList();
                }
            }
            catch (Exception ex)
            {
                var logWallet = new LogWallet();
                Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), "", ex, ""));
            }
            return(userBank);
        }