Esempio n. 1
0
 /// <summary>
 /// Populates the fields of a single objects from the columns found in an open reader.
 /// </summary>
 /// <param name="obj" type="INVInventory">Object of INVInventory 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:56:16 PM		Created function
 ///
 /// </RevisionHistory>
 ///
 /// </remarks>
 ///
 internal static void PopulateObjectFromReader(INVInventoryBase obj, IDataReader rdr)
 {
     obj.InventoryID   = rdr.GetInt32(rdr.GetOrdinal(INVInventoryFields.InventoryID));
     obj.InventoryName = rdr.GetString(rdr.GetOrdinal(INVInventoryFields.InventoryName));
     if (!rdr.IsDBNull(rdr.GetOrdinal(INVInventoryFields.Notes)))
     {
         obj.Notes = rdr.GetString(rdr.GetOrdinal(INVInventoryFields.Notes));
     }
 }
Esempio n. 2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="INVInventory">Object of INVInventory to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			5/3/2015 10:23:04 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(INVInventoryBase obj,IDataReader rdr) 
		{

			obj.InventoryID = rdr.GetInt32(rdr.GetOrdinal(INVInventoryFields.InventoryID));
			obj.InventoryName = rdr.GetString(rdr.GetOrdinal(INVInventoryFields.InventoryName));
			if (!rdr.IsDBNull(rdr.GetOrdinal(INVInventoryFields.Notes)))
			{
				obj.Notes = rdr.GetString(rdr.GetOrdinal(INVInventoryFields.Notes));
			}
			
			obj.IsBasic = rdr.GetBoolean(rdr.GetOrdinal(INVInventoryFields.IsBasic));

		}