returnArrayListFromSQLQuery_containing_FirstRow() public static method

public static returnArrayListFromSQLQuery_containing_FirstRow ( string sqlQuery ) : ArrayList
sqlQuery string
return System.Collections.ArrayList
        private static string recalculateAccountBalance(string AccountID)
        {
            string debitValueSQLQuery = "SELECT SUM(transaction_amount) " +
                                        "FROM dbo.fsb_transactions " +
                                        "WHERE (account_no = " + AccountID + ") " +
                                        " AND (transaction_mode = 'DB')";
            string creditValueSQLQuery = "SELECT SUM(transaction_amount) " +
                                         "FROM dbo.fsb_transactions " +
                                         "WHERE (account_no = " + AccountID + ") " +
                                         " AND (transaction_mode = 'CR')";
            string debitValue = (string)SqlServerEngine.returnArrayListFromSQLQuery_containing_FirstRow(debitValueSQLQuery)[0].ToString();

            if ("" == debitValue)
            {
                debitValue = "0";
            }
            string creditValue = (string)SqlServerEngine.returnArrayListFromSQLQuery_containing_FirstRow(creditValueSQLQuery)[0].ToString();

            if ("" == creditValue)
            {
                creditValue = "0";
            }
            decimal accountBalance = decimal.Parse(creditValue) - decimal.Parse(debitValue);
            string  updateAcccountBalanceSQLQuery = "Update fsb_accounts set balance_amount = " + accountBalance.ToString() + " where account_no = " + AccountID + "";

            SqlServerEngine.executeSQLCommand(updateAcccountBalanceSQLQuery).ToString();
            return(updateAcccountBalanceSQLQuery);
        }
        public static ArrayList GetAccountTransactionDetails_using_TransactionID(string transactionID)
        {
            string sqlQuery = "select * from  fsb_transactions  where transaction_id = '" + transactionID + "'";

            return(SqlServerEngine.returnArrayListFromSQLQuery_containing_FirstRow(sqlQuery));
        }
        public static ArrayList GetAccountDetails_using_AccountID(string accountID)
        {
            string sqlQuery = "select * from  fsb_accounts  where account_no = '" + accountID + "'";

            return(SqlServerEngine.returnArrayListFromSQLQuery_containing_FirstRow(sqlQuery));
        }
        public static ArrayList GetUserDetail(string fieldToUse, string valueToSearch)
        {
            string sqlQuery = "select * from  fsb_users where " + fieldToUse + " = '" + valueToSearch + "'";

            return(SqlServerEngine.returnArrayListFromSQLQuery_containing_FirstRow(sqlQuery));
        }