Ejemplo n.º 1
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="SALSalesReturnLine">Object of SALSalesReturnLine 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:04 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(SALSalesReturnLineBase obj, IDataReader rdr)
        {
            obj.SalesReturnLineID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.SalesReturnLineID));
            obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(SALSalesReturnLineFields.Qty));
            if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.Reason)))
            {
                obj.Reason = rdr.GetString(rdr.GetOrdinal(SALSalesReturnLineFields.Reason));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.OriginalSalesLineID)))
            {
                obj.OriginalSalesLineID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.OriginalSalesLineID));
            }

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

            if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.ExpiryDate)))
            {
                obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(SALSalesReturnLineFields.ExpiryDate));
            }
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="SALSalesReturnLine">Object of SALSalesReturnLine to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(SALSalesReturnLineBase obj,IDataReader rdr) 
		{

			obj.SalesReturnLineID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.SalesReturnLineID));
			obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(SALSalesReturnLineFields.Qty));
			if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.Reason)))
			{
				obj.Reason = rdr.GetString(rdr.GetOrdinal(SALSalesReturnLineFields.Reason));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.OriginalSalesLineID)))
			{
				obj.OriginalSalesLineID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.OriginalSalesLineID));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.BatchID)))
			{
				obj.BatchID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.BatchID));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.BatchNumber)))
			{
				obj.BatchNumber = rdr.GetString(rdr.GetOrdinal(SALSalesReturnLineFields.BatchNumber));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(SALSalesReturnLineFields.ExpiryDate)))
			{
				obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(SALSalesReturnLineFields.ExpiryDate));
			}
			
			obj.SalesReturnHeaderID = rdr.GetInt32(rdr.GetOrdinal(SALSalesReturnLineFields.SalesReturnHeaderID));

		}