Exemplo n.º 1
0
        /// <summary>
        /// Loads a collection of MemberVipSupplement objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the MemberVipSupplement objects in the database.</returns>
        public static MemberVipSupplementCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            MemberVipSupplementCollection result = new MemberVipSupplementCollection();

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