public static ProductPrice PopulateProductPriceFromIDataReader(IDataReader dr) { ProductPrice productPrice = new ProductPrice(); productPrice.PriceID = DataRecordHelper.GetInt32(dr, "PriceID"); productPrice.ProductID = DataRecordHelper.GetInt32(dr, "ProductID"); productPrice.ModelID = DataRecordHelper.GetInt32(dr, "ModelID"); productPrice.DeliverySpan = DataRecordHelper.GetString(dr, "DeliverySpan"); productPrice.WarrantySpan = DataRecordHelper.GetString(dr, "WarrantySpan"); productPrice.IncludeFreight = (PriceIncludeType)DataRecordHelper.GetInt32(dr, "IncludeFreight"); productPrice.IncludeTax = (PriceIncludeType)DataRecordHelper.GetInt32(dr, "IncludeTax"); productPrice.ApplyTaxRate = DataRecordHelper.GetDecimal(dr, "ApplyTaxRate"); productPrice.QuoteMOQ = DataRecordHelper.GetInt32(dr, "QuoteMOQ"); productPrice.PriceMarket = DataRecordHelper.GetNullableDecimal(dr, "PriceMarket"); productPrice.PricePromotion = DataRecordHelper.GetNullableDecimal(dr, "PricePromotion"); productPrice.PriceFloor = DataRecordHelper.GetNullableDecimal(dr, "PriceFloor"); productPrice.PricePurchase = DataRecordHelper.GetNullableDecimal(dr, "PricePurchase"); productPrice.PriceGradeA = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeA"); productPrice.PriceGradeB = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeB"); productPrice.PriceGradeC = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeC"); productPrice.PriceGradeD = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeD"); productPrice.PriceGradeE = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeE"); productPrice.SupplyRegion = DataRecordHelper.GetInt32(dr, "SupplyRegion"); productPrice.QuoteFrom = DataRecordHelper.GetDateTime(dr, "QuoteFrom"); productPrice.QuoteEnd = DataRecordHelper.GetDateTime(dr, "QuoteEnd"); productPrice.QuoteRenewal = DataRecordHelper.GetInt32(dr, "QuoteRenewal"); productPrice.SupplyStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "SupplyStatus"); productPrice.CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"); productPrice.CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"); productPrice.UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime"); productPrice.UpdateUser = DataRecordHelper.GetInt32(dr, "UpdateUser"); productPrice.SetSerializerData(CommonDataProvider.PopulateSerializerDataIDataRecord(dr)); return(productPrice); }
public static ProductSupply PopulateProductSupplyFromIDataReader(IDataReader dr) { ProductSupply result = new ProductSupply(); result.ApplyTaxRate = DataRecordHelper.GetDecimal(dr, "ApplyTaxRate"); result.CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"); result.CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"); result.DeliverySpan = DataRecordHelper.GetString(dr, "DeliverySpan"); result.IncludeFreight = (FreightIncludeType?)DataRecordHelper.GetNullableInt32(dr, "IncludeFreight"); result.IncludeTax = (TaxIncludeType)DataRecordHelper.GetInt32(dr, "IncludeTax"); result.ModelID = DataRecordHelper.GetNullableInt32(dr, "ModelID"); result.ProductID = DataRecordHelper.GetInt32(dr, "ProductID"); result.QuoteEnd = DataRecordHelper.GetDateTime(dr, "QuoteEnd"); result.QuoteFrom = DataRecordHelper.GetDateTime(dr, "QuoteFrom"); result.QuoteMOQ = DataRecordHelper.GetNullableInt32(dr, "QuoteMOQ"); result.QuotePrice = DataRecordHelper.GetNullableDecimal(dr, "QuotePrice"); result.QuoteRenewal = DataRecordHelper.GetInt32(dr, "QuoteRenewal"); result.SupplierID = DataRecordHelper.GetInt32(dr, "SupplierID"); result.SupplyID = DataRecordHelper.GetInt32(dr, "SupplyID"); result.SupplyRegion = DataRecordHelper.GetNullableInt32(dr, "SupplyRegion"); result.SupplyStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "SupplyStatus"); result.UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime"); result.UpdateUser = DataRecordHelper.GetInt32(dr, "UpdateUser"); result.WarrantySpan = DataRecordHelper.GetString(dr, "WarrantySpan"); return(result); }