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);
        }
Example #3
0
 public static WordStatistic ReadStatistic(IDataReader dr)
 {
     return(new WordStatistic()
     {
         StatisticID = DataRecordHelper.GetInt32(dr, "StatisticID"),
         HitCount = DataRecordHelper.GetDecimal(dr, "HitCount"),
         SearchWord = DataRecordHelper.GetString(dr, "SearchWord"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime")
     });
 }
Example #4
0
 public static CompanyCredit ReadCompanyCredit(IDataReader dr)
 {
     return(new CompanyCredit()
     {
         CreditID = DataRecordHelper.GetInt32(dr, "CreditID"),
         SupplierID = DataRecordHelper.GetInt32(dr, "SupplierID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         CreditAmount = DataRecordHelper.GetDecimal(dr, "CreditAmount"),
         CreditDate = DataRecordHelper.GetDateTime(dr, "CreditDate"),
         CreditDelta = DataRecordHelper.GetDecimal(dr, "CreditDelta"),
         CreditDesc = DataRecordHelper.GetString(dr, "CreditDesc"),
         CreditMemo = DataRecordHelper.GetString(dr, "CreditMemo")
     });
 }
Example #5
0
 public static CompanyDeposit ReadCompanyDeposit(IDataReader dr)
 {
     return(new CompanyDeposit()
     {
         CompanyID = DataRecordHelper.GetInt32(dr, "CompanyID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         DepositAmount = DataRecordHelper.GetDecimal(dr, "DepositAmount"),
         DepositDate = DataRecordHelper.GetDateTime(dr, "DepositDate"),
         DepositDelta = DataRecordHelper.GetDecimal(dr, "DepositDelta"),
         DepositDesc = DataRecordHelper.GetString(dr, "DepositDesc"),
         DepositID = DataRecordHelper.GetInt32(dr, "DepositID"),
         DepositMemo = DataRecordHelper.GetString(dr, "DepositMemo"),
         DepositType = (DepositType)DataRecordHelper.GetInt32(dr, "DepositType")
     });
 }