コード例 #1
0
        /// <summary>
        /// Loads a collection of ProductAppendix3 objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the ProductAppendix3 objects in the database.</returns>
        public static ProductAppendix3Collection LoadCollection(string spName, SqlParameter[] parms)
        {
            ProductAppendix3Collection result = new ProductAppendix3Collection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    ProductAppendix3 tmp = new ProductAppendix3();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Loads a ProductAppendix3 object from the database using the given where clause
 /// </summary>
 /// <param name="whereClause">The filter expression for the query</param>
 /// <returns>A ProductAppendix3 object</returns>
 public static ProductAppendix3 LoadWhere(string whereClause)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spProductAppendix3_SelAll", parameterValues))
     {
         if (reader.Read())
         {
             ProductAppendix3 result = new ProductAppendix3();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Loads a ProductAppendix3 object from the database using the given Appendix3Id
 /// </summary>
 /// <param name="appendix3Id">The primary key value</param>
 /// <returns>A ProductAppendix3 object</returns>
 public static ProductAppendix3 Load(Guid appendix3Id)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@Appendix3Id", appendix3Id) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spProductAppendix3_SelRec", parameterValues))
     {
         if (reader.Read())
         {
             ProductAppendix3 result = new ProductAppendix3();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }