Esempio n. 1
0
        private static List <PlugNPayLog> LoadListFromReader(IDataReader reader)
        {
            List <PlugNPayLog> PlugNPayLogList = new List <PlugNPayLog>();

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

            return(PlugNPayLogList);
        }
Esempio n. 2
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByAuthCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.AuthCode.CompareTo(PlugNPayLog2.AuthCode));
 }
Esempio n. 3
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByMethod(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.Method.CompareTo(PlugNPayLog2.Method));
 }
Esempio n. 4
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByTransactionType(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.TransactionType.CompareTo(PlugNPayLog2.TransactionType));
 }
Esempio n. 5
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByCavCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.CavCode.CompareTo(PlugNPayLog2.CavCode));
 }
Esempio n. 6
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByReason(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.Reason.CompareTo(PlugNPayLog2.Reason));
 }
Esempio n. 7
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByResponseReasonCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.ResponseReasonCode.CompareTo(PlugNPayLog2.ResponseReasonCode));
 }
Esempio n. 8
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByRawResponse(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.RawResponse.CompareTo(PlugNPayLog2.RawResponse));
 }
Esempio n. 9
0
        ///// <summary>
        ///// Gets an IList with page of instances of PlugNPayLog.
        ///// </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<PlugNPayLog> GetPage(int pageNumber, int pageSize, out int totalPages)
        //{
        //    totalPages = 1;
        //    IDataReader reader = DBPlugNPayLog.GetPage(pageNumber, pageSize, out totalPages);
        //    return LoadListFromReader(reader);
        //}



        #endregion

        #region Comparison Methods

        /// <summary>
        /// Compares 2 instances of PlugNPayLog.
        /// </summary>
        public static int CompareByCreatedUtc(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
        {
            return(PlugNPayLog1.CreatedUtc.CompareTo(PlugNPayLog2.CreatedUtc));
        }