コード例 #1
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="INVTakingInventoryLine">Object of INVTakingInventoryLine to populate</param>
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/27/2014 6:55:58 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(INVTakingInventoryLineBase obj, IDataReader rdr)
        {
            obj.TakingLineID   = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.TakingLineID));
            obj.TakingHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.TakingHeaderID));
            obj.ProductID      = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.ProductID));
            obj.ActualQty      = rdr.GetDecimal(rdr.GetOrdinal(INVTakingInventoryLineFields.ActualQty));
            obj.ExpectedQty    = rdr.GetDecimal(rdr.GetOrdinal(INVTakingInventoryLineFields.ExpectedQty));
            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.CreatedBy)))
            {
                obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.CreatedBy));
            }

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

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

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

            obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTakingInventoryLineFields.IsDeleted));
            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.DeletedBy)))
            {
                obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.DeletedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.DeleteDate)))
            {
                obj.DeleteDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryLineFields.DeleteDate));
            }
        }
コード例 #2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="INVTakingInventoryLine">Object of INVTakingInventoryLine to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			27/4/2015 7:28:58 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(INVTakingInventoryLineBase obj,IDataReader rdr) 
		{

			obj.TakingLineID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.TakingLineID));
			obj.TakingHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.TakingHeaderID));
			obj.ProductID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.ProductID));
			obj.ActualQty = rdr.GetDecimal(rdr.GetOrdinal(INVTakingInventoryLineFields.ActualQty));
			obj.ExpectedQty = rdr.GetDecimal(rdr.GetOrdinal(INVTakingInventoryLineFields.ExpectedQty));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.CreatedBy)))
			{
				obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.CreatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.CreateDate)))
			{
				obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryLineFields.CreateDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.UpdatedBy)))
			{
				obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.UpdatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.UpdateDate)))
			{
				obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryLineFields.UpdateDate));
			}
			
			obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTakingInventoryLineFields.IsDeleted));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.DeletedBy)))
			{
				obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.DeletedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.DeleteDate)))
			{
				obj.DeleteDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryLineFields.DeleteDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryLineFields.StockTypeID)))
			{
				obj.StockTypeID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryLineFields.StockTypeID));
			}
			

		}