/// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="PURPurchaseReturnLine">Object of PURPurchaseReturnLine 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:26 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(PURPurchaseReturnLineBase obj, IDataReader rdr)
        {
            obj.PurchaseReturnLineID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.PurchaseReturnLineID));
            obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseReturnLineFields.Qty));
            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.Reason)))
            {
                obj.Reason = rdr.GetString(rdr.GetOrdinal(PURPurchaseReturnLineFields.Reason));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.OriginalpurchaseLineID)))
            {
                obj.OriginalpurchaseLineID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.OriginalpurchaseLineID));
            }

            obj.BatchID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchID));
            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchNumber)))
            {
                obj.BatchNumber = rdr.GetString(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchNumber));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.ExpiryDate)))
            {
                obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnLineFields.ExpiryDate));
            }
        }
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="PURPurchaseReturnLine">Object of PURPurchaseReturnLine to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			11/4/2015 8:46:46 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(PURPurchaseReturnLineBase obj,IDataReader rdr) 
		{

			obj.PurchaseReturnLineID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.PurchaseReturnLineID));
			obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseReturnLineFields.Qty));
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.Reason)))
			{
				obj.Reason = rdr.GetString(rdr.GetOrdinal(PURPurchaseReturnLineFields.Reason));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.OriginalpurchaseLineID)))
			{
				obj.OriginalpurchaseLineID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.OriginalpurchaseLineID));
			}
			
			obj.BatchID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchID));
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchNumber)))
			{
				obj.BatchNumber = rdr.GetString(rdr.GetOrdinal(PURPurchaseReturnLineFields.BatchNumber));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnLineFields.ExpiryDate)))
			{
				obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnLineFields.ExpiryDate));
			}
			
			obj.PurchaseReturnHeaderID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnLineFields.PurchaseReturnHeaderID));

		}