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

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