Exemple #1
0
        private void CustomerSearch()
        {
            if (txtSurname.Text.Trim().Length == 0)
            {
                return;
            }

            var frm = new FrmCustomerSearch(txtSurname.Text.Trim());

            if (frm.CurrentCustomerID > 0)
            {
                SelectCustomer(frm.CurrentCustomerID);
            }
            frm.Dispose();
        }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (txtSurname.Text.Trim().Length == 0)
            {
                return;
            }

            var frm = new FrmCustomerSearch(txtSurname.Text.Trim());

            if (frm.CurrentCustomerID > 0)
            {
                ShowCustomer(frm.CurrentCustomerID);
                btnSearch.Enabled = false;
            }
            frm.Dispose();
        }