/// <summary> /// Loads the given OrderShipment object from the given database data reader. /// </summary> /// <param name="orderShipment">The OrderShipment object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(OrderShipment orderShipment, IDataReader dr) { //SET FIELDS FROM ROW DATA orderShipment.OrderShipmentId = dr.GetInt32(0); orderShipment.OrderId = dr.GetInt32(1); orderShipment.WarehouseId = NullableData.GetInt32(dr, 2); orderShipment.ShipToFirstName = NullableData.GetString(dr, 3); orderShipment.ShipToLastName = NullableData.GetString(dr, 4); orderShipment.ShipToCompany = NullableData.GetString(dr, 5); orderShipment.ShipToAddress1 = NullableData.GetString(dr, 6); orderShipment.ShipToAddress2 = NullableData.GetString(dr, 7); orderShipment.ShipToCity = NullableData.GetString(dr, 8); orderShipment.ShipToProvince = NullableData.GetString(dr, 9); orderShipment.ShipToPostalCode = NullableData.GetString(dr, 10); orderShipment.ShipToCountryCode = NullableData.GetString(dr, 11); orderShipment.ShipToPhone = NullableData.GetString(dr, 12); orderShipment.ShipToFax = NullableData.GetString(dr, 13); orderShipment.ShipToEmail = NullableData.GetString(dr, 14); orderShipment.ShipToResidence = NullableData.GetBoolean(dr, 15); orderShipment.ShipMethodId = NullableData.GetInt32(dr, 16); orderShipment.ShipMethodName = NullableData.GetString(dr, 17); orderShipment.ShipMessage = NullableData.GetString(dr, 18); orderShipment.ShipDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 19)); orderShipment.IsDirty = false; }
/// <summary> /// Loads the given Profile object from the given database data reader. /// </summary> /// <param name="profile">The Profile object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(Profile profile, IDataReader dr) { //SET FIELDS FROM ROW DATA profile.UserId = dr.GetInt32(0); profile.PropertyNames = dr.GetString(1); profile.PropertyValuesString = dr.GetString(2); profile.PropertyValuesBinary = NullableData.GetBytes(dr, 3); profile.LastUpdatedDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 4)); profile.IsDirty = false; }
/// <summary> /// Loads the given Special object from the given database data reader. /// </summary> /// <param name="special">The Special object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(Special special, IDataReader dr) { //SET FIELDS FROM ROW DATA special.SpecialId = dr.GetInt32(0); special.ProductId = dr.GetInt32(1); special.Price = dr.GetDecimal(2); special.StartDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 3)); special.EndDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 4)); special.IsDirty = false; }
/// <summary> /// Loads the given Subscription object from the given database data reader. /// </summary> /// <param name="subscription">The Subscription object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(Subscription subscription, IDataReader dr) { //SET FIELDS FROM ROW DATA subscription.SubscriptionId = dr.GetInt32(0); subscription.ProductId = dr.GetInt32(1); subscription.UserId = dr.GetInt32(2); subscription.OrderItemId = NullableData.GetInt32(dr, 3); subscription.TransactionId = NullableData.GetInt32(dr, 4); subscription.IsActive = dr.GetBoolean(5); subscription.ExpirationDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 6)); subscription.GroupId = NullableData.GetInt32(dr, 7); subscription.IsDirty = false; }
/// <summary> /// Loads the given EmailList object from the given database data reader. /// </summary> /// <param name="emailList">The EmailList object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(EmailList emailList, IDataReader dr) { //SET FIELDS FROM ROW DATA emailList.EmailListId = dr.GetInt32(0); emailList.StoreId = dr.GetInt32(1); emailList.Name = dr.GetString(2); emailList.Description = NullableData.GetString(dr, 3); emailList.IsPublic = dr.GetBoolean(4); emailList.SignupRuleId = dr.GetInt16(5); emailList.SignupEmailTemplateId = NullableData.GetInt32(dr, 6); emailList.LastSendDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 7)); emailList.IsDirty = false; }
/// <summary> /// Loads the given Redirect object from the given database data reader. /// </summary> /// <param name="redirect">The Redirect object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(Redirect redirect, IDataReader dr) { //SET FIELDS FROM ROW DATA redirect.RedirectId = dr.GetInt32(0); redirect.StoreId = dr.GetInt32(1); redirect.SourceUrl = dr.GetString(2); redirect.TargetUrl = dr.GetString(3); redirect.UseRegEx = dr.GetBoolean(4); redirect.CreatedDate = LocaleHelper.ToLocalTime(dr.GetDateTime(5)); redirect.LastVisitedDate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 6)); redirect.VisitCount = NullableData.GetInt32(dr, 7); redirect.OrderBy = dr.GetInt16(8); redirect.IsDirty = false; }
/// <summary> /// Loads the given Currency object from the given database data reader. /// </summary> /// <param name="currency">The Currency object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(Currency currency, IDataReader dr) { //SET FIELDS FROM ROW DATA currency.CurrencyId = dr.GetInt32(0); currency.StoreId = dr.GetInt32(1); currency.Name = dr.GetString(2); currency.CurrencySymbol = NullableData.GetString(dr, 3); currency.DecimalDigits = dr.GetInt32(4); currency.DecimalSeparator = NullableData.GetString(dr, 5); currency.GroupSeparator = NullableData.GetString(dr, 6); currency.GroupSizes = NullableData.GetString(dr, 7); currency.NegativePattern = dr.GetByte(8); currency.NegativeSign = NullableData.GetString(dr, 9); currency.PositivePattern = dr.GetByte(10); currency.ISOCode = dr.GetString(11); currency.ISOCodePattern = NullableData.GetByte(dr, 12); currency.ExchangeRate = dr.GetDecimal(13); currency.AutoUpdate = dr.GetBoolean(14); currency.LastUpdate = LocaleHelper.ToLocalTime(NullableData.GetDateTime(dr, 15)); currency.IsDirty = false; }