public void AddRange(GoodstradeloginfoCollection value) { for (int i = 0; i < value.Count; i++) { this.Add((Goodstradeloginfo)value.List[i]); } }
/// <summary> /// Adds the contents of another <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> to the end of the collection. /// </summary> /// <param name="value">A <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> containing the Components to add to the collection. </param> public void AddRange(GoodstradeloginfoCollection value) { for (int i = 0; (i < value.Count); i = (i + 1)) { this.Add((Goodstradeloginfo)value.List[i]); } }
/// <summary> /// 获得商品交易信息(DTO) /// </summary> /// <param name="__idatareader">要转换的数据</param> /// <returns>返回商品交易信息</returns> public static GoodstradeloginfoCollection GetGoodsTradeLogInfoList(IDataReader reader) { GoodstradeloginfoCollection goodsTradeLogInfoColl = new GoodstradeloginfoCollection(); while (reader.Read()) { Goodstradeloginfo goodsTradeLogInfo = new Goodstradeloginfo(); goodsTradeLogInfo.Id = TypeConverter.ObjectToInt(reader["id"]); goodsTradeLogInfo.Goodsid = TypeConverter.ObjectToInt(reader["goodsid"]); goodsTradeLogInfo.Orderid = reader["orderid"].ToString().Trim(); goodsTradeLogInfo.Tradeno = reader["tradeno"].ToString().Trim(); goodsTradeLogInfo.Subject = reader["subject"].ToString().Trim(); goodsTradeLogInfo.Price = Convert.ToDecimal(reader["price"].ToString()); goodsTradeLogInfo.Quality = Convert.ToInt16(reader["quality"].ToString()); goodsTradeLogInfo.Categoryid = TypeConverter.ObjectToInt(reader["categoryid"]); goodsTradeLogInfo.Number = Convert.ToInt16(reader["number"].ToString()); goodsTradeLogInfo.Tax = Convert.ToDecimal(reader["tax"].ToString()); goodsTradeLogInfo.Locus = reader["locus"].ToString().Trim(); goodsTradeLogInfo.Sellerid = TypeConverter.ObjectToInt(reader["sellerid"]); goodsTradeLogInfo.Seller = reader["seller"].ToString().Trim(); goodsTradeLogInfo.Selleraccount = reader["selleraccount"].ToString().Trim(); goodsTradeLogInfo.Buyerid = TypeConverter.ObjectToInt(reader["buyerid"]); goodsTradeLogInfo.Buyer = reader["buyer"].ToString().Trim(); goodsTradeLogInfo.Buyercontact = reader["buyercontact"].ToString().Trim(); goodsTradeLogInfo.Buyercredit = Convert.ToInt16(reader["buyercredit"].ToString()); goodsTradeLogInfo.Buyermsg = reader["buyermsg"].ToString().Trim(); goodsTradeLogInfo.Status = Convert.ToInt16(reader["status"].ToString()); goodsTradeLogInfo.Lastupdate = Convert.ToDateTime(reader["lastupdate"].ToString()); goodsTradeLogInfo.Offline = Convert.ToInt16(reader["offline"].ToString()); goodsTradeLogInfo.Buyername = reader["buyername"].ToString().Trim(); goodsTradeLogInfo.Buyerzip = reader["buyerzip"].ToString().Trim(); goodsTradeLogInfo.Buyerphone = reader["buyerphone"].ToString().Trim(); goodsTradeLogInfo.Buyermobile = reader["buyermobile"].ToString().Trim(); goodsTradeLogInfo.Transport = Convert.ToInt16(reader["transport"].ToString()); goodsTradeLogInfo.Transportpay = Convert.ToInt16(reader["transportpay"].ToString()); goodsTradeLogInfo.Transportfee = Convert.ToDecimal(reader["transportfee"].ToString()); goodsTradeLogInfo.Tradesum = Convert.ToDecimal(reader["tradesum"].ToString()); goodsTradeLogInfo.Baseprice = Convert.ToDecimal(reader["baseprice"].ToString()); goodsTradeLogInfo.Discount = Convert.ToInt16(reader["discount"].ToString()); goodsTradeLogInfo.Ratestatus = Convert.ToInt16(reader["ratestatus"].ToString()); goodsTradeLogInfo.Message = reader["message"].ToString().Trim(); goodsTradeLogInfoColl.Add(goodsTradeLogInfo); } reader.Close(); return goodsTradeLogInfoColl; }
/// <summary> /// 获取指定商品id和相关条件下的商品交易信息集合 /// </summary> /// <param name="goodsid">商品id</param> /// <param name="pagesize">页面大小</param> /// <param name="pageindex">当前页</param> /// <param name="orderby">排序字段</param> /// <param name="ascdesc">排序方式(0:升序, 1:降序)</param> /// <returns>商品交易信息集合</returns> public static GoodstradeloginfoCollection GetGoodsTradeLog(int goodsId, int pageSize, int pageIndex, string orderBy, int ascDesc) { GoodstradeloginfoCollection coll = new GoodstradeloginfoCollection(); if (pageIndex <= 0) return coll; string condition = DbProvider.GetInstance().SetGoodsTradeStatusCond((int)MallUtils.OperaCode.Equal, 7); return DTO.GetGoodsTradeLogInfoList(DbProvider.GetInstance().GetGoodsTradeLogByGid(goodsId, pageSize, pageIndex, condition, orderBy, ascDesc)); }
/// <summary> /// Initializes a new instance of the <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> class containing the elements of the specified source collection. /// </summary> /// <param name="value">A <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> with which to initialize the collection.</param> public GoodstradeloginfoCollection(GoodstradeloginfoCollection value) { this.AddRange(value); }
/// <summary> /// Initializes a new instance of the <see cref="GoodstradeloginfoCollectionEnumerator">GoodstradeloginfoCollectionEnumerator</see> class referencing the specified <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> object. /// </summary> /// <param name="mappings">The <see cref="GoodstradeloginfoCollection">GoodstradeloginfoCollection</see> to enumerate.</param> public GoodstradeloginfoCollectionEnumerator(GoodstradeloginfoCollection mappings) { _temp = ((IEnumerable)(mappings)); _enumerator = _temp.GetEnumerator(); }
public GoodstradeloginfoCollection(GoodstradeloginfoCollection value) { this.AddRange(value); }
public GoodstradeloginfoCollectionEnumerator(GoodstradeloginfoCollection mappings) { this._temp = mappings; this._enumerator = this._temp.GetEnumerator(); }