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); }
/// <summary> /// 分类 /// </summary> /// <param name="dr"></param> /// <returns></returns> public static ArticleCategory ParseArticleCategory(IDataReader dr) { return(new ArticleCategory() { ID = DataRecordHelper.GetInt32(dr, "CategoryID"), Name = DataRecordHelper.GetString(dr, "CategoryName"), Description = DataRecordHelper.GetString(dr, "CategoryDesc"), Memo = DataRecordHelper.GetString(dr, "CategoryMemo"), ParentID = DataRecordHelper.GetNullableInt32(dr, "ParentID"), DisplayOrder = DataRecordHelper.GetInt32(dr, "DisplayOrder"), Status = (ComponentStatus)DataRecordHelper.GetInt32(dr, "CategoryStatus"), CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"), CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"), UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime"), UpdateUser = DataRecordHelper.GetInt32(dr, "UpdateUser"), }); }
/// <summary> /// 资源 /// </summary> /// <param name="dr"></param> /// <returns></returns> public static ArticleAttachment ParseArticleAttachment(IDataReader dr) { ArticleAttachment result = new ArticleAttachment(); result.ID = DataRecordHelper.GetInt32(dr, "AttachmentID"); result.FileName = DataRecordHelper.GetString(dr, "AttachmentFile"); result.Name = DataRecordHelper.GetString(dr, "AttachmentName"); result.ContentType = DataRecordHelper.GetString(dr, "ContentType"); result.ContentSize = DataRecordHelper.GetInt32(dr, "ContentSize"); result.IsRemote = DataRecordHelper.GetInt32(dr, "IsRemote") > 0; result.ImageWidth = DataRecordHelper.GetNullableInt32(dr, "ImageWidth"); result.ImageHeight = DataRecordHelper.GetNullableInt32(dr, "ImageHeight"); result.Desc = DataRecordHelper.GetString(dr, "AttachmentDesc"); result.Memo = DataRecordHelper.GetString(dr, "AttachmentMemo"); result.Status = (ComponentStatus)DataRecordHelper.GetInt32(dr, "AttachmentStatus"); result.CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"); result.CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"); result.UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime"); result.UpdateUser = DataRecordHelper.GetInt32(dr, "UpdateUser"); return(result); }