/// <summary> /// Loads the given CategoryParent object from the given database data reader. /// </summary> /// <param name="categoryParent">The CategoryParent object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(CategoryParent categoryParent, IDataReader dr) { //SET FIELDS FROM ROW DATA categoryParent.CategoryId = dr.GetInt32(0); categoryParent.ParentId = dr.GetInt32(1); categoryParent.ParentLevel = NullableData.GetByte(dr, 2); categoryParent.ParentNumber = NullableData.GetByte(dr, 3); categoryParent.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; }