コード例 #1
0
        public void FilterByMarketingPreferenceOK()
        {
            clsCustomerCollection AllCustomers      = new clsCustomerCollection();
            clsCustomerCollection FilteredCustomers = new clsCustomerCollection();

            FilteredCustomers.FilterByMarketingPreference(false);
            Assert.AreEqual(1, FilteredCustomers.Count);
        }
コード例 #2
0
    protected void btnMarketingSearch_Click(object sender, EventArgs e)
    {
        clsCustomerCollection Customers = new clsCustomerCollection();

        Customers.FilterByMarketingPreference(Convert.ToBoolean(lstPreference.Text));
        lstCustomers.DataSource     = Customers.CustomerList;
        lstCustomers.DataValueField = "Customer_id";
        lstCustomers.DataTextField  = "Name";
        lstCustomers.DataBind();
    }