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

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