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="VPurchaseReturnHeader">Object of VPurchaseReturnHeader 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 9:57:48 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(VPurchaseReturnHeaderBase obj, IDataReader rdr)
        {
            obj.PurchaseReturnID = rdr.GetInt32(rdr.GetOrdinal(VPurchaseReturnHeaderFields.PurchaseReturnID));
            obj.ReturnDate       = rdr.GetDateTime(rdr.GetOrdinal(VPurchaseReturnHeaderFields.ReturnDate));
            obj.IsClosed         = rdr.GetBoolean(rdr.GetOrdinal(VPurchaseReturnHeaderFields.IsClosed));
            if (!rdr.IsDBNull(rdr.GetOrdinal(VPurchaseReturnHeaderFields.InvoiceNumber)))
            {
                obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(VPurchaseReturnHeaderFields.InvoiceNumber));
            }

            obj.SupplierName    = rdr.GetString(rdr.GetOrdinal(VPurchaseReturnHeaderFields.SupplierName));
            obj.PurcaseHeaderID = rdr.GetInt32(rdr.GetOrdinal(VPurchaseReturnHeaderFields.PurcaseHeaderID));
        }
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="VPurchaseReturnHeader">Object of VPurchaseReturnHeader 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 9:57:48 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(VPurchaseReturnHeaderBase obj,IDataReader rdr) 
		{

			obj.PurchaseReturnID = rdr.GetInt32(rdr.GetOrdinal(VPurchaseReturnHeaderFields.PurchaseReturnID));
			obj.ReturnDate = rdr.GetDateTime(rdr.GetOrdinal(VPurchaseReturnHeaderFields.ReturnDate));
			obj.IsClosed = rdr.GetBoolean(rdr.GetOrdinal(VPurchaseReturnHeaderFields.IsClosed));
			if (!rdr.IsDBNull(rdr.GetOrdinal(VPurchaseReturnHeaderFields.InvoiceNumber)))
			{
				obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(VPurchaseReturnHeaderFields.InvoiceNumber));
			}
			
			obj.SupplierName = rdr.GetString(rdr.GetOrdinal(VPurchaseReturnHeaderFields.SupplierName));
			obj.PurcaseHeaderID = rdr.GetInt32(rdr.GetOrdinal(VPurchaseReturnHeaderFields.PurcaseHeaderID));

		}