/// <summary> /// Loads a collection of PriceManagementActiveDetails objects from the database. /// </summary> /// <returns>A collection containing all of the PriceManagementActiveDetails objects in the database.</returns> public static PriceManagementActiveDetailsCollection LoadCollection(string spName, SqlParameter[] parms) { PriceManagementActiveDetailsCollection result = new PriceManagementActiveDetailsCollection(); using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms)) { while (reader.Read()) { PriceManagementActiveDetails tmp = new PriceManagementActiveDetails(); tmp.LoadFromReader(reader); result.Add(tmp); } } return(result); }
/// <summary> /// Loads a PriceManagementActiveDetails object from the database using the given where clause /// </summary> /// <param name="whereClause">The filter expression for the query</param> /// <returns>A PriceManagementActiveDetails object</returns> public static PriceManagementActiveDetails LoadWhere(string whereClause) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spPriceManagementActiveDetails_SelAll", parameterValues)) { if (reader.Read()) { PriceManagementActiveDetails result = new PriceManagementActiveDetails(); result.LoadFromReader(reader); return(result); } else { return(null); } } }
/// <summary> /// Loads a PriceManagementActiveDetails object from the database using the given DetailId /// </summary> /// <param name="detailId">The primary key value</param> /// <returns>A PriceManagementActiveDetails object</returns> public static PriceManagementActiveDetails Load(Guid detailId) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@DetailId", detailId) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spPriceManagementActiveDetails_SelRec", parameterValues)) { if (reader.Read()) { PriceManagementActiveDetails result = new PriceManagementActiveDetails(); result.LoadFromReader(reader); return(result); } else { return(null); } } }