public void AddMethodAddressOK()
        {
            //create an instance of the class we want to create
            clsAddressCollection AllAddresses = new clsAddressCollection();
            //create the item of test data
            clsAddress TestItem = new clsAddress();
            //var to store the primary key
            Int32 PrimaryKey = 0;

            //set its properties
            TestItem.ChangeNo = 2;
            TestItem.HouseNo  = "123b";
            TestItem.Street   = "London Road";
            TestItem.Town     = "Leicester";
            TestItem.PostCode = "Le2 102";
            TestItem.Email    = "*****@*****.**";
            //set ThisOrder to the test data
            AllAddresses.ThisAddress = TestItem;
            //add the record
            PrimaryKey = AllAddresses.AddAddress();
            //set the primary key to the test data
            TestItem.ChangeNo = PrimaryKey;
            //find the record
            AllAddresses.ThisAddress.Find(PrimaryKey);

            //test to see that two values are the same
            Assert.AreEqual(AllAddresses.ThisAddress, TestItem);
        }
    void AddAddress()
    {
        //create instance of the class
        clsAddressCollection NewAddress = new clsAddressCollection();
        //validate the data on the web form
        String Error = NewAddress.ThisAddress.Valid(ddlCustomer.Text, txtHouseNo.Text, txtStreet.Text, txtTown.Text, txtPostcode.Text);

        if (Error == "")
        {
            //capture emailaddress
            NewAddress.ThisAddress.Email = ddlCustomer.Text;
            //capture delivery town
            NewAddress.ThisAddress.HouseNo = txtHouseNo.Text;
            //capture date added
            NewAddress.ThisAddress.Street = txtStreet.Text;
            //capture order value
            NewAddress.ThisAddress.Town = txtTown.Text;
            //capture order status
            NewAddress.ThisAddress.PostCode = txtPostcode.Text;
            //add the record
            NewAddress.AddAddress();

            lblError.Text = "New address was added succesfully";
        }

        else
        {
            //report error

            lblError.Text = "There were problems with the data entered: " + Error;
        }
    }