/// <summary>
 /// Copies the elements of the specified <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> array to the end of the collection.
 /// </summary>
 /// <param name="value">An array of type <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> containing the Components to add to the collection.</param>
 public void AddRange(Goodsusercreditinfo[] value)
 {
     for (int i = 0; (i < value.Length); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
예제 #2
0
 public int Add(Goodsusercreditinfo value)
 {
     return(base.List.Add(value));
 }
예제 #3
0
 public void Remove(Goodsusercreditinfo value)
 {
     base.List.Remove(value);
 }
예제 #4
0
 public void Insert(int index, Goodsusercreditinfo value)
 {
     base.List.Insert(index, value);
 }
예제 #5
0
            /// <summary>
            /// 获得(商品)用户信用信息(DTO)
            /// </summary>
            /// <param name="dt">要转换的数据表</param>
            /// <returns>返回(商品)用户信用信息</returns>
            public static Goodsusercreditinfo[] GetGoodsUserCreditArray(DataTable dt)
            {
                if (dt == null || dt.Rows.Count == 0)
                    return null;

                Goodsusercreditinfo[] goodsUserCreditsInfoArray = new Goodsusercreditinfo[dt.Rows.Count];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    goodsUserCreditsInfoArray[i] = new Goodsusercreditinfo();
                    goodsUserCreditsInfoArray[i].Id = TypeConverter.ObjectToInt(dt.Rows[i]["id"].ToString());
                    goodsUserCreditsInfoArray[i].Uid = TypeConverter.ObjectToInt(dt.Rows[i]["uid"].ToString());
                    goodsUserCreditsInfoArray[i].Oneweek = TypeConverter.ObjectToInt(dt.Rows[i]["oneweek"].ToString());
                    goodsUserCreditsInfoArray[i].Onemonth = TypeConverter.ObjectToInt(dt.Rows[i]["onemonth"].ToString());
                    goodsUserCreditsInfoArray[i].Sixmonth = TypeConverter.ObjectToInt(dt.Rows[i]["sixmonth"].ToString());
                    goodsUserCreditsInfoArray[i].Sixmonthago = TypeConverter.ObjectToInt(dt.Rows[i]["sixmonthago"].ToString());
                    goodsUserCreditsInfoArray[i].Ratefrom = TypeConverter.ObjectToInt(dt.Rows[i]["ratefrom"].ToString());
                    goodsUserCreditsInfoArray[i].Ratetype = TypeConverter.ObjectToInt(dt.Rows[i]["ratetype"].ToString());

                }
                dt.Dispose();
                return goodsUserCreditsInfoArray;
            }
예제 #6
0
            /// <summary>
            /// 获得(商品)用户信用信息(DTO)
            /// </summary>
            /// <param name="__idatareader">要转换的数据</param>
            /// <returns>返回(商品)用户信用信息</returns>
            public static GoodsusercreditinfoCollection GetGoodsUserCreditList(IDataReader reader)
            {
                GoodsusercreditinfoCollection goodsUserCreditInfoColl = new GoodsusercreditinfoCollection();

                while (reader.Read())
                {
                    Goodsusercreditinfo goodsUserCreditsInfo = new Goodsusercreditinfo();
                    goodsUserCreditsInfo.Id = TypeConverter.ObjectToInt(reader["id"].ToString());
                    goodsUserCreditsInfo.Uid = TypeConverter.ObjectToInt(reader["uid"].ToString());
                    goodsUserCreditsInfo.Oneweek = TypeConverter.ObjectToInt(reader["oneweek"].ToString());
                    goodsUserCreditsInfo.Onemonth = TypeConverter.ObjectToInt(reader["onemonth"].ToString());
                    goodsUserCreditsInfo.Sixmonth = TypeConverter.ObjectToInt(reader["sixmonth"].ToString());
                    goodsUserCreditsInfo.Sixmonthago = TypeConverter.ObjectToInt(reader["sixmonthago"].ToString());
                    goodsUserCreditsInfo.Ratefrom = Convert.ToInt16(reader["ratefrom"].ToString());
                    goodsUserCreditsInfo.Ratetype = Convert.ToInt16(reader["ratetype"].ToString());

                    goodsUserCreditInfoColl.Add(goodsUserCreditsInfo);
                }
                reader.Close();
                return goodsUserCreditInfoColl;
            }
예제 #7
0
 /// <summary>
 /// 更新用户信用信息
 /// </summary>
 /// <param name="goodsusercreditinfo">要更新的用户信用信息</param>
 /// <returns></returns>
 public static bool UpdateUserCredit(Goodsusercreditinfo goodsusercreditinfo)
 {
     return DbProvider.GetInstance().UpdateGoodsUserCredit(goodsusercreditinfo);
 }
 /// <summary>
 /// Gets the index in the collection of the specified <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see>, if it exists in the collection.
 /// </summary>
 /// <param name="value">The <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> to locate in the collection.</param>
 /// <returns>The index in the collection of the specified object, if found; otherwise, -1.</returns>
 public int IndexOf(Goodsusercreditinfo value)
 {
     return this.List.IndexOf(value);
 }
 /// <summary>
 /// Gets a value indicating whether the collection contains the specified <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see>.
 /// </summary>
 /// <param name="value">The <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> to search for in the collection.</param>
 /// <returns><b>true</b> if the collection contains the specified object; otherwise, <b>false</b>.</returns>
 public bool Contains(Goodsusercreditinfo value)
 {
     return this.List.Contains(value);
 }
 public int Add(Goodsusercreditinfo value)
 {
     return this.List.Add(value);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> class containing the specified array of <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> Components.
 /// </summary>
 /// <param name="value">An array of <see cref="GoodsusercreditinfoCollection">GoodsusercreditinfoCollection</see> Components with which to initialize the collection. </param>
 public GoodsusercreditinfoCollection(Goodsusercreditinfo[] value)
 {
     this.AddRange(value);
 }
 public void Remove(Goodsusercreditinfo value)
 {
     List.Remove(value);
 }
 public void Insert(int index, Goodsusercreditinfo value)
 {
     List.Insert(index, value);
 }
예제 #14
0
 public bool Contains(Goodsusercreditinfo value)
 {
     return(base.List.Contains(value));
 }
 /// <summary>
 /// Copies the collection Components to a one-dimensional <see cref="T:System.Array">Array</see> instance beginning at the specified index.
 /// </summary>
 /// <param name="array">The one-dimensional <see cref="T:System.Array">Array</see> that is the destination of the values copied from the collection.</param>
 /// <param name="index">The index of the array at which to begin inserting.</param>
 public void CopyTo(Goodsusercreditinfo[] array, int index)
 {
     this.List.CopyTo(array, index);
 }
예제 #16
0
 public int IndexOf(Goodsusercreditinfo value)
 {
     return(base.List.IndexOf(value));
 }
예제 #17
0
        /// <summary>
        /// 更新商品用户信用记录
        /// </summary>
        /// <param name="goodsusercredits">要更新的用户信用信息</param>
        /// <returns></returns>
        public bool UpdateGoodsUserCredit(Goodsusercreditinfo goodsUserCredits)
        {
            DbParameter[] parms = 
				{
						DbHelper.MakeInParam("@uid", (DbType)SqlDbType.Int, 4,goodsUserCredits.Uid),
						DbHelper.MakeInParam("@oneweek", (DbType)SqlDbType.Int, 4,goodsUserCredits.Oneweek),
						DbHelper.MakeInParam("@onemonth", (DbType)SqlDbType.Int, 4,goodsUserCredits.Onemonth),
						DbHelper.MakeInParam("@sixmonth", (DbType)SqlDbType.Int, 4,goodsUserCredits.Sixmonth),
						DbHelper.MakeInParam("@sixmonthago", (DbType)SqlDbType.Int, 4,goodsUserCredits.Sixmonthago),
						DbHelper.MakeInParam("@ratefrom", (DbType)SqlDbType.TinyInt, 1,goodsUserCredits.Ratefrom),
						DbHelper.MakeInParam("@ratetype", (DbType)SqlDbType.TinyInt, 1,goodsUserCredits.Ratetype),
                        DbHelper.MakeInParam("@id", (DbType)SqlDbType.Int, 4,goodsUserCredits.Id)
				};
            string commandText = String.Format("Update [{0}goodsusercredits]  Set [uid] = @uid, [oneweek] = @oneweek, [onemonth] = @onemonth, [sixmonth] = @sixmonth, [sixmonthago] = @sixmonthago, [ratefrom] = @ratefrom, [ratetype] = @ratetype WHERE [id] = @id", BaseConfigs.GetTablePrefix);

            DbHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);

            return true;
        }