using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


public class BusinessObjectCollection : System.Collections.Generic.List<BusinessObject>
{
    public BusinessObjectCollection()
    {
        for (int i = 0; i < 10; i++)
        {
            this.Add(new BusinessObject(i));
        }
    }

    public BusinessObjectCollection(int itemCount)
    {
        for (int i = 0; i < itemCount; i++)
        {
            this.Add(new BusinessObject(i));
        }
    }
}

public class BusinessObject
{
    private int _id;
    private string _name;
    private DateTime _date;
    private int _quantity;
    private double _price;
    private bool _available;

    static Random rand = new Random();

    public BusinessObject()
        : this(rand.Next(1000))
    {
    }

    public BusinessObject(int id)
    {
        _id = id;
        _name = "Business object ID: " + _id.ToString();
        _date = DateTime.Today.AddDays(rand.Next(10));
        _quantity = rand.Next(100);
        _price = Math.Round(rand.NextDouble() * 100, 2);
        _available = rand.Next(1000) % 2 == 0;
    }

    public int ID
    {
        get
        {
            return _id;
        }
        set
        {
            _id = value;
        }
    }

    public string Name
    {
        get
        {
            return _name;
        }
        set
        {
            _name = value;
        }
    }

    public DateTime Date
    {
        get
        {
            return _date;
        }
        set
        {
            _date = value;
        }
    }

    public int Quantity
    {
        get
        {
            return _quantity;
        }
        set
        {
            _quantity = value;
        }
    }

    public double Price
    {
        get
        {
            return _price;
        }
        set
        {
            _price = value;
        }
    }

    public bool Available
    {
        get
        {
            return _available;
        }
        set
        {
            _available = value;
        }
    }
}