Exemplo n.º 1
0
        public void SearchByNameOK()
        {
            clsOrderCollection orders = new clsOrderCollection();

            orders.FilterByName("Name");
            Assert.AreEqual(2, orders.Count);
        }
Exemplo n.º 2
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsOrderCollection orders = new clsOrderCollection();

        orders.FilterByName(txtSearchByName.Text);
        lstOrders.DataSource     = orders.OrdersList;
        lstOrders.DataValueField = "OrderId";
        lstOrders.DataTextField  = "OrderName";
        lstOrders.DataBind();
    }