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="PURPurchaseReturnHeader">Object of PURPurchaseReturnHeader 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:23 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(PURPurchaseReturnHeaderBase obj, IDataReader rdr)
        {
            obj.PurchaseReturnID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.PurchaseReturnID));
            obj.ReturnDate       = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.ReturnDate));
            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.OriginalHeaderID)))
            {
                obj.OriginalHeaderID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.OriginalHeaderID));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreatedBy)))
            {
                obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreatedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreateDate)))
            {
                obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreateDate));
            }

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

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

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

            if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeleteDate)))
            {
                obj.DeleteDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeleteDate));
            }
        }
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="PURPurchaseReturnHeader">Object of PURPurchaseReturnHeader 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:45 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(PURPurchaseReturnHeaderBase obj,IDataReader rdr) 
		{

			obj.PurchaseReturnID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.PurchaseReturnID));
			obj.ReturnDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.ReturnDate));
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.OriginalHeaderID)))
			{
				obj.OriginalHeaderID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.OriginalHeaderID));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreatedBy)))
			{
				obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreateDate)))
			{
				obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.CreateDate));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.UpdatedBy)))
			{
				obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.UpdatedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.UpdateDate)))
			{
				obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.UpdateDate));
			}
			
			obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.IsDeleted));
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeletedBy)))
			{
				obj.DeletedBy = rdr.GetString(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeletedBy));
			}
			
			if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeleteDate)))
			{
				obj.DeleteDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.DeleteDate));
			}
			
			obj.IsClosed = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.IsClosed));
			obj.IsVoid = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.IsVoid));
			obj.ReturnMoney = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseReturnHeaderFields.ReturnMoney));

		}