示例#1
0
        ///// <summary>
        ///// Gets a count of AuthorizeNetLog.
        ///// </summary>
        //public static int GetCount()
        //{
        //    return DBAuthorizeNetLog.GetCount();
        //}

        private static List <AuthorizeNetLog> LoadListFromReader(IDataReader reader)
        {
            List <AuthorizeNetLog> authorizeNetLogList = new List <AuthorizeNetLog>();

            try
            {
                while (reader.Read())
                {
                    AuthorizeNetLog authorizeNetLog = new AuthorizeNetLog();
                    authorizeNetLog.rowGuid            = new Guid(reader["RowGuid"].ToString());
                    authorizeNetLog.createdUtc         = Convert.ToDateTime(reader["CreatedUtc"]);
                    authorizeNetLog.siteGuid           = new Guid(reader["SiteGuid"].ToString());
                    authorizeNetLog.userGuid           = new Guid(reader["UserGuid"].ToString());
                    authorizeNetLog.storeGuid          = new Guid(reader["StoreGuid"].ToString());
                    authorizeNetLog.cartGuid           = new Guid(reader["CartGuid"].ToString());
                    authorizeNetLog.rawResponse        = reader["RawResponse"].ToString();
                    authorizeNetLog.responseCode       = reader["ResponseCode"].ToString();
                    authorizeNetLog.responseReasonCode = reader["ResponseReasonCode"].ToString();
                    authorizeNetLog.reason             = reader["Reason"].ToString();
                    authorizeNetLog.avsCode            = reader["AvsCode"].ToString();
                    authorizeNetLog.ccvCode            = reader["CcvCode"].ToString();
                    authorizeNetLog.cavCode            = reader["CavCode"].ToString();
                    authorizeNetLog.transactionId      = reader["TransactionId"].ToString();
                    authorizeNetLog.transactionType    = reader["TransactionType"].ToString();
                    authorizeNetLog.method             = reader["Method"].ToString();
                    authorizeNetLog.authCode           = reader["AuthCode"].ToString();
                    authorizeNetLog.amount             = Convert.ToDecimal(reader["Amount"]);
                    authorizeNetLog.tax     = Convert.ToDecimal(reader["Tax"]);
                    authorizeNetLog.duty    = Convert.ToDecimal(reader["Duty"]);
                    authorizeNetLog.freight = Convert.ToDecimal(reader["Freight"]);
                    authorizeNetLogList.Add(authorizeNetLog);
                }
            }
            finally
            {
                reader.Close();
            }

            return(authorizeNetLogList);
        }
示例#2
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByAuthCode(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.AuthCode.CompareTo(authorizeNetLog2.AuthCode));
 }
示例#3
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByMethod(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.Method.CompareTo(authorizeNetLog2.Method));
 }
示例#4
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByTransactionType(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.TransactionType.CompareTo(authorizeNetLog2.TransactionType));
 }
示例#5
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByReason(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.Reason.CompareTo(authorizeNetLog2.Reason));
 }
示例#6
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByResponseReasonCode(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.ResponseReasonCode.CompareTo(authorizeNetLog2.ResponseReasonCode));
 }
示例#7
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByRawResponse(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return(authorizeNetLog1.RawResponse.CompareTo(authorizeNetLog2.RawResponse));
 }
示例#8
0
        ///// <summary>
        ///// Gets an IList with page of instances of AuthorizeNetLog.
        ///// </summary>
        ///// <param name="pageNumber">The page number.</param>
        ///// <param name="pageSize">Size of the page.</param>
        ///// <param name="totalPages">total pages</param>
        //public static List<AuthorizeNetLog> GetPage(int pageNumber, int pageSize, out int totalPages)
        //{
        //    totalPages = 1;
        //    IDataReader reader = DBAuthorizeNetLog.GetPage(pageNumber, pageSize, out totalPages);
        //    return LoadListFromReader(reader);
        //}



        #endregion

        #region Comparison Methods

        /// <summary>
        /// Compares 2 instances of AuthorizeNetLog.
        /// </summary>
        public static int CompareByCreatedUtc(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
        {
            return(authorizeNetLog1.CreatedUtc.CompareTo(authorizeNetLog2.CreatedUtc));
        }
示例#9
0
        ///// <summary>
        ///// Gets a count of AuthorizeNetLog. 
        ///// </summary>
        //public static int GetCount()
        //{
        //    return DBAuthorizeNetLog.GetCount();
        //}
        private static List<AuthorizeNetLog> LoadListFromReader(IDataReader reader)
        {
            List<AuthorizeNetLog> authorizeNetLogList = new List<AuthorizeNetLog>();
            try
            {
                while (reader.Read())
                {
                    AuthorizeNetLog authorizeNetLog = new AuthorizeNetLog();
                    authorizeNetLog.rowGuid = new Guid(reader["RowGuid"].ToString());
                    authorizeNetLog.createdUtc = Convert.ToDateTime(reader["CreatedUtc"]);
                    authorizeNetLog.siteGuid = new Guid(reader["SiteGuid"].ToString());
                    authorizeNetLog.userGuid = new Guid(reader["UserGuid"].ToString());
                    authorizeNetLog.storeGuid = new Guid(reader["StoreGuid"].ToString());
                    authorizeNetLog.cartGuid = new Guid(reader["CartGuid"].ToString());
                    authorizeNetLog.rawResponse = reader["RawResponse"].ToString();
                    authorizeNetLog.responseCode = reader["ResponseCode"].ToString();
                    authorizeNetLog.responseReasonCode = reader["ResponseReasonCode"].ToString();
                    authorizeNetLog.reason = reader["Reason"].ToString();
                    authorizeNetLog.avsCode = reader["AvsCode"].ToString();
                    authorizeNetLog.ccvCode = reader["CcvCode"].ToString();
                    authorizeNetLog.cavCode = reader["CavCode"].ToString();
                    authorizeNetLog.transactionId = reader["TransactionId"].ToString();
                    authorizeNetLog.transactionType = reader["TransactionType"].ToString();
                    authorizeNetLog.method = reader["Method"].ToString();
                    authorizeNetLog.authCode = reader["AuthCode"].ToString();
                    authorizeNetLog.amount = Convert.ToDecimal(reader["Amount"]);
                    authorizeNetLog.tax = Convert.ToDecimal(reader["Tax"]);
                    authorizeNetLog.duty = Convert.ToDecimal(reader["Duty"]);
                    authorizeNetLog.freight = Convert.ToDecimal(reader["Freight"]);
                    authorizeNetLogList.Add(authorizeNetLog);

                }
            }
            finally
            {
                reader.Close();
            }

            return authorizeNetLogList;
        }
示例#10
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByResponseReasonCode(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.ResponseReasonCode.CompareTo(authorizeNetLog2.ResponseReasonCode);
 }
示例#11
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByTransactionType(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.TransactionType.CompareTo(authorizeNetLog2.TransactionType);
 }
示例#12
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByReason(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.Reason.CompareTo(authorizeNetLog2.Reason);
 }
示例#13
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByRawResponse(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.RawResponse.CompareTo(authorizeNetLog2.RawResponse);
 }
示例#14
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByMethod(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.Method.CompareTo(authorizeNetLog2.Method);
 }
示例#15
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByCreatedUtc(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.CreatedUtc.CompareTo(authorizeNetLog2.CreatedUtc);
 }
示例#16
0
 /// <summary>
 /// Compares 2 instances of AuthorizeNetLog.
 /// </summary>
 public static int CompareByCcvCode(AuthorizeNetLog authorizeNetLog1, AuthorizeNetLog authorizeNetLog2)
 {
     return authorizeNetLog1.CcvCode.CompareTo(authorizeNetLog2.CcvCode);
 }