Beispiel #1
0
 private static AbandonedCart GetOrderConfirmationFromReader(SqlDataReader reader)
 {
     return(new AbandonedCart
     {
         CustomerId = SQLDataHelper.GetGuid(reader, "CustomerId"),
         OrderConfirmationData =
             JsonConvert.DeserializeObject <OrderConfirmationData>(SQLDataHelper.GetString(reader, "OrderConfirmationData")),
         LastUpdate = SQLDataHelper.GetDateTime(reader, "LastUpdate", DateTime.MinValue),
         SendingCount = SQLDataHelper.GetInt(reader, "SendingCount"),
         SendingDate = SQLDataHelper.GetNullableDateTime(reader, "SendingDate")
     });
 }
Beispiel #2
0
 private static Coupon GetFromReader(SqlDataReader reader)
 {
     return(new Coupon
     {
         CouponID = SQLDataHelper.GetInt(reader, "CouponID"),
         Code = SQLDataHelper.GetString(reader, "Code"),
         Type = (CouponType)SQLDataHelper.GetInt(reader, "Type"),
         Value = SQLDataHelper.GetFloat(reader, "Value"),
         AddingDate = SQLDataHelper.GetDateTime(reader, "AddingDate"),
         ExpirationDate = SQLDataHelper.GetNullableDateTime(reader, "ExpirationDate"),
         PossibleUses = SQLDataHelper.GetInt(reader, "PossibleUses"),
         ActualUses = SQLDataHelper.GetInt(reader, "ActualUses"),
         Enabled = SQLDataHelper.GetBoolean(reader, "Enabled"),
         MinimalOrderPrice = SQLDataHelper.GetFloat(reader, "MinimalOrderPrice")
     });
 }