/// <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 ShipMethod object from the given database data reader. /// </summary> /// <param name="shipMethod">The ShipMethod object to load.</param> /// <param name="dr">The database data reader to read data from.</param> public static void LoadDataReader(ShipMethod shipMethod, IDataReader dr) { //SET FIELDS FROM ROW DATA shipMethod.ShipMethodId = dr.GetInt32(0); shipMethod.StoreId = dr.GetInt32(1); shipMethod.ShipMethodTypeId = dr.GetInt16(2); shipMethod.Name = dr.GetString(3); shipMethod.Surcharge = dr.GetDecimal(4); shipMethod.ShipGatewayId = NullableData.GetInt32(dr, 5); shipMethod.ServiceCode = NullableData.GetString(dr, 6); shipMethod.MinPurchase = dr.GetDecimal(7); shipMethod.SurchargeIsVisible = dr.GetBoolean(8); shipMethod.SurchargeIsPercent = NullableData.GetBoolean(dr, 9); shipMethod.TaxCodeId = NullableData.GetInt32(dr, 10); shipMethod.SurchargeTaxCodeId = NullableData.GetInt32(dr, 11); shipMethod.OrderBy = dr.GetInt16(12); shipMethod.IsDirty = false; }