/// <summary>
 /// Loads the given ProductVariant object from the given database data reader.
 /// </summary>
 /// <param name="productVariant">The ProductVariant object to load.</param>
 /// <param name="dr">The database data reader to read data from.</param>
 public static void LoadDataReader(ProductVariant productVariant, IDataReader dr)
 {
     //SET FIELDS FROM ROW DATA
     productVariant.ProductVariantId = dr.GetInt32(0);
     productVariant.ProductId        = dr.GetInt32(1);
     productVariant.Option1          = dr.GetInt32(2);
     productVariant.Option2          = dr.GetInt32(3);
     productVariant.Option3          = dr.GetInt32(4);
     productVariant.Option4          = dr.GetInt32(5);
     productVariant.Option5          = dr.GetInt32(6);
     productVariant.Option6          = dr.GetInt32(7);
     productVariant.Option7          = dr.GetInt32(8);
     productVariant.Option8          = dr.GetInt32(9);
     productVariant.VariantName      = NullableData.GetString(dr, 10);
     productVariant.Sku                 = NullableData.GetString(dr, 11);
     productVariant.Price               = NullableData.GetDecimal(dr, 12);
     productVariant.PriceModeId         = dr.GetByte(13);
     productVariant.Weight              = NullableData.GetDecimal(dr, 14);
     productVariant.WeightModeId        = dr.GetByte(15);
     productVariant.CostOfGoods         = NullableData.GetDecimal(dr, 16);
     productVariant.InStock             = dr.GetInt32(17);
     productVariant.InStockWarningLevel = dr.GetInt32(18);
     productVariant.Available           = dr.GetBoolean(19);
     productVariant.IsDirty             = false;
 }
示例#2
0
 /// <summary>
 /// Loads the given ShipRateMatrix object from the given database data reader.
 /// </summary>
 /// <param name="shipRateMatrix">The ShipRateMatrix object to load.</param>
 /// <param name="dr">The database data reader to read data from.</param>
 public static void LoadDataReader(ShipRateMatrix shipRateMatrix, IDataReader dr)
 {
     //SET FIELDS FROM ROW DATA
     shipRateMatrix.ShipRateMatrixId = dr.GetInt32(0);
     shipRateMatrix.ShipMethodId     = dr.GetInt32(1);
     shipRateMatrix.RangeStart       = NullableData.GetDecimal(dr, 2);
     shipRateMatrix.RangeEnd         = NullableData.GetDecimal(dr, 3);
     shipRateMatrix.Rate             = dr.GetDecimal(4);
     shipRateMatrix.IsPercent        = dr.GetBoolean(5);
     shipRateMatrix.IsDirty          = false;
 }
示例#3
0
 /// <summary>
 /// Loads the given UpsOrigin object from the given database data reader.
 /// </summary>
 /// <param name="upsOrigin">The UpsOrigin object to load.</param>
 /// <param name="dr">The database data reader to read data from.</param>
 public static void LoadDataReader(UpsOrigin upsOrigin, IDataReader dr)
 {
     //SET FIELDS FROM ROW DATA
     upsOrigin.CountryCode     = dr.GetString(0);
     upsOrigin.CountryName     = NullableData.GetString(dr, 1);
     upsOrigin.CurrencyName    = NullableData.GetString(dr, 2);
     upsOrigin.CurrencyCode    = NullableData.GetString(dr, 3);
     upsOrigin.EuroAllowed     = NullableData.GetInt16(dr, 4);
     upsOrigin.MIVDollar       = NullableData.GetDecimal(dr, 5);
     upsOrigin.MIVEuro         = NullableData.GetDecimal(dr, 6);
     upsOrigin.UOM             = NullableData.GetInt16(dr, 7);
     upsOrigin.MaxWeight       = NullableData.GetDecimal(dr, 8);
     upsOrigin.MaxMetricWeight = NullableData.GetDecimal(dr, 9);
     upsOrigin.EUMember        = NullableData.GetInt16(dr, 10);
     upsOrigin.IsDirty         = false;
 }
示例#4
0
 /// <summary>
 /// Loads the given WishlistItem object from the given database data reader.
 /// </summary>
 /// <param name="wishlistItem">The WishlistItem object to load.</param>
 /// <param name="dr">The database data reader to read data from.</param>
 public static void LoadDataReader(WishlistItem wishlistItem, IDataReader dr)
 {
     //SET FIELDS FROM ROW DATA
     wishlistItem.WishlistItemId   = dr.GetInt32(0);
     wishlistItem.WishlistId       = dr.GetInt32(1);
     wishlistItem.ProductId        = dr.GetInt32(2);
     wishlistItem.OptionList       = NullableData.GetString(dr, 3);
     wishlistItem.KitList          = NullableData.GetString(dr, 4);
     wishlistItem.Price            = NullableData.GetDecimal(dr, 5);
     wishlistItem.LineMessage      = NullableData.GetString(dr, 6);
     wishlistItem.CreatedDate      = LocaleHelper.ToLocalTime(dr.GetDateTime(7));
     wishlistItem.LastModifiedDate = LocaleHelper.ToLocalTime(dr.GetDateTime(8));
     wishlistItem.Desired          = dr.GetInt16(9);
     wishlistItem.Received         = dr.GetInt16(10);
     wishlistItem.Priority         = dr.GetByte(11);
     wishlistItem.Comment          = NullableData.GetString(dr, 12);
     wishlistItem.IsDirty          = false;
 }