/// <summary>
		/// Adds the contents of another <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> to the end of the collection.
		/// </summary>
		/// <param name="value">A <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> containing the Components to add to the collection. </param>
		public void AddRange(AlbumCategoryInfoCollection value) 
		{
			for (int i = 0;	(i < value.Count); i = (i +	1))	
			{
				this.Add((AlbumCategoryInfo)value.List[i]);
			}
		}
 /// <summary>
 /// Adds the contents of another <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> to the end of the collection.
 /// </summary>
 /// <param name="value">A <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> containing the Components to add to the collection. </param>
 public void AddRange(AlbumCategoryInfoCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add((AlbumCategoryInfo)value.List[i]);
     }
 }
示例#3
0
		public AlbumCategoryInfoCollection GetAlbumCategory()
		{
			string sql = string.Format("SELECT * FROM [{0}albumcategories] ORDER BY [displayorder]", BaseConfigs.GetTablePrefix);

			IDataReader reader = DbHelper.ExecuteReader(CommandType.Text, sql);

			AlbumCategoryInfoCollection acic = new AlbumCategoryInfoCollection();

			if (reader != null)
			{
				while (reader.Read())
				{
					AlbumCategoryInfo aci = new AlbumCategoryInfo();
					aci.Albumcateid = Utils.StrToInt(reader["albumcateid"], 0);
					aci.Albumcount = Utils.StrToInt(reader["albumcount"], 0);
					aci.Description = reader["description"].ToString();
					aci.Displayorder = Utils.StrToInt(reader["displayorder"], 0);
					aci.Title = reader["title"].ToString();
					acic.Add(aci);
				}
				reader.Close();
			}
			return acic;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> class containing the elements of the specified source collection.
		/// </summary>
		/// <param name="value">A <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> with which to initialize the collection.</param>
		public AlbumCategoryInfoCollection(AlbumCategoryInfoCollection value)	
		{
			this.AddRange(value);
		}
			/// <summary>
			/// Initializes a new instance of the <see cref="AlbumCategoryInfoCollectionEnumerator">AlbumCategoryInfoCollectionEnumerator</see> class referencing the specified <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> object.
			/// </summary>
			/// <param name="mappings">The <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> to enumerate.</param>
			public AlbumCategoryInfoCollectionEnumerator(AlbumCategoryInfoCollection mappings)
			{
				_temp =	((IEnumerable)(mappings));
				_enumerator = _temp.GetEnumerator();
			}
 /// <summary>
 /// Initializes a new instance of the <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> class containing the elements of the specified source collection.
 /// </summary>
 /// <param name="value">A <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> with which to initialize the collection.</param>
 public AlbumCategoryInfoCollection(AlbumCategoryInfoCollection value)
 {
     this.AddRange(value);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AlbumCategoryInfoCollectionEnumerator">AlbumCategoryInfoCollectionEnumerator</see> class referencing the specified <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="AlbumCategoryInfoCollection">AlbumCategoryInfoCollection</see> to enumerate.</param>
 public AlbumCategoryInfoCollectionEnumerator(AlbumCategoryInfoCollection mappings)
 {
     _temp       = ((IEnumerable)(mappings));
     _enumerator = _temp.GetEnumerator();
 }