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

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