コード例 #1
0
        public void ReportByDescriptionNoneFound()
        {
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.ReportByDescription("xxx");
            Assert.AreEqual(0, FilteredOrders.Count);
        }
コード例 #2
0
        public void ReportByDescriptionMethodOK()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.ReportByDescription("");
            Assert.AreEqual(AllOrders.Count, FilteredOrders.Count);
        }
コード例 #3
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsOrderCollection Orders = new clsOrderCollection();

        Orders.ReportByDescription(txtFilter.Text);
        lstOrderList.DataSource     = Orders.OrderList;
        lstOrderList.DataValueField = "OrderId";
        lstOrderList.DataTextField  = "Description";
        lstOrderList.DataBind();
    }