示例#1
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            // Get the keyword from Text box

            string keyword = txtSearch.Text;

            if (keyword == "")
            {
                txtName.Text    = "";
                txtEmail.Text   = "";
                txtContact.Text = "";
                txtAddress.Text = "";
                return;
            }
            // write the code to get details and set the value on text boxes

            DeaCustBLL dc = dcDAL.SearchDealerCustomerTransaction(keyword);

            // Transfer the values from DeaCustBLL to our txtBoxes.

            txtName.Text    = dc.name;
            txtEmail.Text   = dc.email;
            txtContact.Text = dc.contact;
            txtAddress.Text = dc.address;
        }