Exemplo n.º 1
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="INVTakingInventory">Object of INVTakingInventory 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:11 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(INVTakingInventoryBase obj, IDataReader rdr)
        {
            obj.TakingHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.TakingHeaderID));
            obj.TakingDate     = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.TakingDate));
            obj.TakingName     = rdr.GetString(rdr.GetOrdinal(INVTakingInventoryFields.TakingName));
            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.CreatedBy)))
            {
                obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.CreatedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.CreatedDate)))
            {
                obj.CreatedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.CreatedDate));
            }

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

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

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

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.DeletedDate)))
            {
                obj.DeletedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.DeletedDate));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.Notes)))
            {
                obj.Notes = rdr.GetString(rdr.GetOrdinal(INVTakingInventoryFields.Notes));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.InventoryID)))
            {
                obj.InventoryID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.InventoryID));
            }
        }
Exemplo n.º 2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="INVTakingInventory">Object of INVTakingInventory 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:11 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(INVTakingInventoryBase obj,IDataReader rdr) 
		{

			obj.TakingHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.TakingHeaderID));
			obj.TakingDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.TakingDate));
			obj.TakingName = rdr.GetString(rdr.GetOrdinal(INVTakingInventoryFields.TakingName));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.CreatedBy)))
			{
				obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.CreatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.CreatedDate)))
			{
				obj.CreatedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.CreatedDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.UpdatedBy)))
			{
				obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.UpdatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.UpdateDate)))
			{
				obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.UpdateDate));
			}
			
			obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTakingInventoryFields.IsDeleted));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.DeletedBy)))
			{
				obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.DeletedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.DeletedDate)))
			{
				obj.DeletedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTakingInventoryFields.DeletedDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.Notes)))
			{
				obj.Notes = rdr.GetString(rdr.GetOrdinal(INVTakingInventoryFields.Notes));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVTakingInventoryFields.InventoryID)))
			{
				obj.InventoryID = rdr.GetInt32(rdr.GetOrdinal(INVTakingInventoryFields.InventoryID));
			}
			

		}