コード例 #1
0
ファイル: VSalesReturnHeaderBase.cs プロジェクト: taiab/POS
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="VSalesReturnHeader">Object of VSalesReturnHeader to populate</param>
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			3/9/2015 4:39:22 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(VSalesReturnHeaderBase obj, IDataReader rdr)
        {
            obj.SlaesReturnHeaderID = rdr.GetInt32(rdr.GetOrdinal(VSalesReturnHeaderFields.SlaesReturnHeaderID));
            obj.ReturnDate          = rdr.GetDateTime(rdr.GetOrdinal(VSalesReturnHeaderFields.ReturnDate));
            obj.IsClosed            = rdr.GetBoolean(rdr.GetOrdinal(VSalesReturnHeaderFields.IsClosed));
            if (!rdr.IsDBNull(rdr.GetOrdinal(VSalesReturnHeaderFields.InvoiceNumber)))
            {
                obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(VSalesReturnHeaderFields.InvoiceNumber));
            }

            obj.CustomerName  = rdr.GetString(rdr.GetOrdinal(VSalesReturnHeaderFields.CustomerName));
            obj.SalesHeaderID = rdr.GetInt32(rdr.GetOrdinal(VSalesReturnHeaderFields.SalesHeaderID));
        }
コード例 #2
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="VSalesReturnHeader">Object of VSalesReturnHeader to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/9/2015 4:39:22 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(VSalesReturnHeaderBase obj,IDataReader rdr) 
		{

			obj.SlaesReturnHeaderID = rdr.GetInt32(rdr.GetOrdinal(VSalesReturnHeaderFields.SlaesReturnHeaderID));
			obj.ReturnDate = rdr.GetDateTime(rdr.GetOrdinal(VSalesReturnHeaderFields.ReturnDate));
			obj.IsClosed = rdr.GetBoolean(rdr.GetOrdinal(VSalesReturnHeaderFields.IsClosed));
			if (!rdr.IsDBNull(rdr.GetOrdinal(VSalesReturnHeaderFields.InvoiceNumber)))
			{
				obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(VSalesReturnHeaderFields.InvoiceNumber));
			}
			
			obj.CustomerName = rdr.GetString(rdr.GetOrdinal(VSalesReturnHeaderFields.CustomerName));
			obj.SalesHeaderID = rdr.GetInt32(rdr.GetOrdinal(VSalesReturnHeaderFields.SalesHeaderID));

		}