/// <summary>
        /// Loads a collection of InvtBatchTXF_Header objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the InvtBatchTXF_Header objects in the database.</returns>
        public static InvtBatchTXF_HeaderCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            InvtBatchTXF_HeaderCollection result = new InvtBatchTXF_HeaderCollection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    InvtBatchTXF_Header tmp = new InvtBatchTXF_Header();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }
 /// <summary>
 /// Loads a InvtBatchTXF_Header object from the database using the given where clause
 /// </summary>
 /// <param name="whereClause">The filter expression for the query</param>
 /// <returns>A InvtBatchTXF_Header object</returns>
 public static InvtBatchTXF_Header LoadWhere(string whereClause)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchTXF_Header_SelAll", parameterValues))
     {
         if (reader.Read())
         {
             InvtBatchTXF_Header result = new InvtBatchTXF_Header();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }
 /// <summary>
 /// Loads a InvtBatchTXF_Header object from the database using the given HeaderId
 /// </summary>
 /// <param name="headerId">The primary key value</param>
 /// <returns>A InvtBatchTXF_Header object</returns>
 public static InvtBatchTXF_Header Load(Guid headerId)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@HeaderId", headerId) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchTXF_Header_SelRec", parameterValues))
     {
         if (reader.Read())
         {
             InvtBatchTXF_Header result = new InvtBatchTXF_Header();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }