Example #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);
        }
Example #2
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByReason(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.Reason.CompareTo(PlugNPayLog2.Reason));
 }
Example #3
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByResponseReasonCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.ResponseReasonCode.CompareTo(PlugNPayLog2.ResponseReasonCode));
 }
Example #4
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByRawResponse(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.RawResponse.CompareTo(PlugNPayLog2.RawResponse));
 }
Example #5
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));
        }
Example #6
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByCcvCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.CcvCode.CompareTo(PlugNPayLog2.CcvCode);
 }
Example #7
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByTransactionId(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.TransactionId.CompareTo(PlugNPayLog2.TransactionId);
 }
Example #8
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByMethod(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.Method.CompareTo(PlugNPayLog2.Method));
 }
Example #9
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByReason(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.Reason.CompareTo(PlugNPayLog2.Reason);
 }
Example #10
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByResponseReasonCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.ResponseReasonCode.CompareTo(PlugNPayLog2.ResponseReasonCode);
 }
Example #11
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByRawResponse(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.RawResponse.CompareTo(PlugNPayLog2.RawResponse);
 }
Example #12
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByMethod(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.Method.CompareTo(PlugNPayLog2.Method);
 }
Example #13
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByCreatedUtc(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.CreatedUtc.CompareTo(PlugNPayLog2.CreatedUtc);
 }
Example #14
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByCavCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.CavCode.CompareTo(PlugNPayLog2.CavCode));
 }
Example #15
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByTransactionType(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.TransactionType.CompareTo(PlugNPayLog2.TransactionType);
 }
Example #16
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByTransactionType(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.TransactionType.CompareTo(PlugNPayLog2.TransactionType));
 }
Example #17
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;
        }
Example #18
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByAuthCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return(PlugNPayLog1.AuthCode.CompareTo(PlugNPayLog2.AuthCode));
 }
Example #19
0
 /// <summary>
 /// Compares 2 instances of PlugNPayLog.
 /// </summary>
 public static int CompareByAuthCode(PlugNPayLog PlugNPayLog1, PlugNPayLog PlugNPayLog2)
 {
     return PlugNPayLog1.AuthCode.CompareTo(PlugNPayLog2.AuthCode);
 }