/// <summary>
		/// Copies the elements of the specified <see cref="AttachPaymentlogInfo">AttachPaymentlogInfo</see> array to the end of the collection.
		/// </summary>
		/// <param name="value">An array of type <see cref="AttachPaymentlogInfo">AttachPaymentlogInfo</see> containing the Components to add to the collection.</param>
		public void AddRange(AttachPaymentlogInfo[] value) 
		{
			for (int i = 0;	(i < value.Length); i = (i + 1)) 
			{
				this.Add(value[i]);
			}
		}
Esempio n. 2
0
 /// <summary>
 /// 加载单个实体对象
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 private static AttachPaymentlogInfo LoadSingleAttachPaymentlogInfo(IDataReader reader)
 {
     AttachPaymentlogInfo attachPaymentlogInfo = new AttachPaymentlogInfo();
     attachPaymentlogInfo.Id = TypeConverter.ObjectToInt(reader["id"]);
     attachPaymentlogInfo.Uid = TypeConverter.ObjectToInt(reader["uid"]);
     attachPaymentlogInfo.UserName = reader["username"].ToString().Trim();
     attachPaymentlogInfo.Aid = TypeConverter.ObjectToInt(reader["aid"]);
     attachPaymentlogInfo.Authorid = TypeConverter.ObjectToInt(reader["authorid"]);
     attachPaymentlogInfo.PostDateTime = Convert.ToDateTime(reader["postdatetime"]);
     attachPaymentlogInfo.Amount = TypeConverter.ObjectToInt(reader["amount"]);
     attachPaymentlogInfo.NetAmount = TypeConverter.ObjectToInt(reader["netamount"]);
     return attachPaymentlogInfo;
 }
Esempio n. 3
0
 /// <summary>
 /// 更新的附件交易信息
 /// </summary>
 /// <param name="attachPaymentLogInfo">要更新的附件交易信息</param>
 /// <returns></returns>
 public static int UpdateAttachPaymetLog(AttachPaymentlogInfo attachPaymentLogInfo)
 {
     return DatabaseProvider.GetInstance().UpdateAttachPaymetLog(attachPaymentLogInfo);
 }
 /// <summary>
 /// Gets a value indicating whether the collection contains the specified <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</see>.
 /// </summary>
 /// <param name="value">The <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</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(AttachPaymentlogInfo value)
 {
     return(this.List.Contains(value));
 }
 public int Add(AttachPaymentlogInfo value)
 {
     return(this.List.Add(value));
 }
 public void Remove(AttachPaymentlogInfo value)
 {
     List.Remove(value);
 }
 public void Insert(int index, AttachPaymentlogInfo value)
 {
     List.Insert(index, value);
 }
		/// <summary>
		/// Gets the index in the collection of the specified <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</see>, if it exists in the collection.
		/// </summary>
		/// <param name="value">The <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</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(AttachPaymentlogInfo value) 
		{
			return this.List.IndexOf(value);
		}
Esempio n. 9
0
        public int CreateAttachPaymetLog(AttachPaymentlogInfo attachPaymentLogInfo)
        {
            DbParameter[] parms = {
						   DbHelper.MakeInParam("@uid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Uid),
                           DbHelper.MakeInParam("@username",(DbType)SqlDbType.NChar, 20, attachPaymentLogInfo.UserName),
                           DbHelper.MakeInParam("@postdatetime",(DbType)SqlDbType.DateTime, 8, attachPaymentLogInfo.PostDateTime),
                           DbHelper.MakeInParam("@amount",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Amount),
                           DbHelper.MakeInParam("@netamount",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.NetAmount),
                           DbHelper.MakeInParam("@aid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Aid),
						   DbHelper.MakeInParam("@authorid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Authorid)
					   };
            string commandText = string.Format("INSERT INTO [{0}attachpaymentlog] ([uid],[postdatetime],[username],[amount],[netamount],[aid],[authorid]) VALUES (@uid,@postdatetime,@username,@amount,@netamount,@aid,@authorid);SELECT SCOPE_IDENTITY()",
                                                BaseConfigs.GetTablePrefix);
            return DbHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
		/// <summary>
		/// Gets a value indicating whether the collection contains the specified <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</see>.
		/// </summary>
		/// <param name="value">The <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</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(AttachPaymentlogInfo value) 
		{
			return this.List.Contains(value);
		}
		public int Add(AttachPaymentlogInfo value) 
		{
			return this.List.Add(value);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</see> class containing the specified array of <see cref="AttachPaymentlogInfo">AttachPaymentlogInfo</see> Components.
		/// </summary>
		/// <param name="value">An array of <see cref="AttachPaymentlogInfo">AttachPaymentlogInfo</see> Components with which to initialize the collection. </param>
		public AttachPaymentlogInfoCollection(AttachPaymentlogInfo[] value)
		{
			this.AddRange(value);
		}
		public void Remove(AttachPaymentlogInfo value) 
		{
			List.Remove(value);
		}
		public void Insert(int index, AttachPaymentlogInfo value)	
		{
			List.Insert(index, 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(AttachPaymentlogInfo[] array, int index) 
		{
			this.List.CopyTo(array, index);
		}
Esempio n. 16
0
 /// <summary>
 /// 创建附件交易信息
 /// </summary>
 /// <param name="attachPaymentLogInfo">要创建的附件交易信息</param>
 /// <returns>创建的交易id</returns>
 public static int CreateAttachPaymentLog(AttachPaymentlogInfo attachPaymentLogInfo)
 {
     return Data.AttachPaymentLogs.CreateAttachPaymentLog(attachPaymentLogInfo);
 }
 /// <summary>
 /// Gets the index in the collection of the specified <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</see>, if it exists in the collection.
 /// </summary>
 /// <param name="value">The <see cref="AttachPaymentlogInfoCollection">AttachPaymentlogInfoCollection</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(AttachPaymentlogInfo value)
 {
     return(this.List.IndexOf(value));
 }
Esempio n. 18
0
        public int UpdateAttachPaymetLog(AttachPaymentlogInfo attachPaymentLogInfo)
        {
            DbParameter[] parms = {
                           DbHelper.MakeInParam("@id",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Id),
						   DbHelper.MakeInParam("@uid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Uid),
                           DbHelper.MakeInParam("@username",(DbType)SqlDbType.NChar, 20, attachPaymentLogInfo.UserName),
                           DbHelper.MakeInParam("@postdatetime",(DbType)SqlDbType.DateTime, 8, attachPaymentLogInfo.PostDateTime),
                           DbHelper.MakeInParam("@amount",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Amount),
                           DbHelper.MakeInParam("@netamount",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.NetAmount),
                           DbHelper.MakeInParam("@aid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Aid),
						   DbHelper.MakeInParam("@authorid",(DbType)SqlDbType.Int, 4, attachPaymentLogInfo.Authorid)
					   };
            string commandText = string.Format("UPDATE [{0}attachpaymentlog] SET [uid]=@uid,[postdatetime]=@postdatetime,[username]=@username,[amount]=@amount,[netamount]=@netamount,[aid]=@aid,[authorid]=@authorid WHERE [id] = @id",
                                                BaseConfigs.GetTablePrefix);
            return DbHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
Esempio n. 19
0
        public int UpdateAttachPaymetLog(AttachPaymentlogInfo attachPaymentLogInfo)
        {
            DbParameter[] parms = {
                           DbHelper.MakeInParam("@id",DbType.Int32, 4, attachPaymentLogInfo.Id),
                           DbHelper.MakeInParam("@uid",DbType.Int32, 4, attachPaymentLogInfo.Uid),
                           DbHelper.MakeInParam("@username",DbType.AnsiString, 20, attachPaymentLogInfo.UserName),
                           DbHelper.MakeInParam("@postdatetime",DbType.DateTime, 8, attachPaymentLogInfo.PostDateTime),
                           DbHelper.MakeInParam("@amount",DbType.Int32, 4, attachPaymentLogInfo.Amount),
                           DbHelper.MakeInParam("@netamount",DbType.Int32, 4, attachPaymentLogInfo.NetAmount),
                           DbHelper.MakeInParam("@aid",DbType.Int32, 4, attachPaymentLogInfo.Aid),
                           DbHelper.MakeInParam("@authorid",DbType.Int32, 4, attachPaymentLogInfo.Authorid)
                       };
            string sql = "UPDATE [" + BaseConfigs.GetTablePrefix + "attachpaymentlog] SET [uid]=@uid,[postdatetime]=@postdatetime,[username]=@username,[amount]=@amount,[netamount]=@netamount,[aid]=@aid,[authorid]=@authorid WHERE [id] = @id";

            return DbHelper.ExecuteNonQuery(CommandType.Text, sql, parms);
        }