예제 #1
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="INVTransferLine">Object of INVTransferLine to populate</param>
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			3/7/2015 2:37:01 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(INVTransferLineBase obj, IDataReader rdr)
        {
            obj.TransferLineID   = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.TransferLineID));
            obj.TransferHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.TransferHeaderID));
            obj.ProductID        = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.ProductID));
            obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(INVTransferLineFields.Qty));
            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.CreatedBy)))
            {
                obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.CreatedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.CreateDate)))
            {
                obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.CreateDate));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.UpdatedBy)))
            {
                obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.UpdatedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.UpdateDate)))
            {
                obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.UpdateDate));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.IsDeleted)))
            {
                obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTransferLineFields.IsDeleted));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.DeletedBy)))
            {
                obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.DeletedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.DeletedDate)))
            {
                obj.DeletedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.DeletedDate));
            }
        }
예제 #2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="INVTransferLine">Object of INVTransferLine to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:01 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(INVTransferLineBase obj,IDataReader rdr) 
		{

			obj.TransferLineID = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.TransferLineID));
			obj.TransferHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.TransferHeaderID));
			obj.ProductID = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.ProductID));
			obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(INVTransferLineFields.Qty));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.CreatedBy)))
			{
				obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.CreatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.CreateDate)))
			{
				obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.CreateDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.UpdatedBy)))
			{
				obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.UpdatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.UpdateDate)))
			{
				obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.UpdateDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.IsDeleted)))
			{
				obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTransferLineFields.IsDeleted));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.DeletedBy)))
			{
				obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferLineFields.DeletedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferLineFields.DeletedDate)))
			{
				obj.DeletedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferLineFields.DeletedDate));
			}
			

		}