예제 #1
0
        private void tbxSearchCurrent_TextChanged(object sender, EventArgs e)
        {
            string fname = tbxSearchCurrent.Text;

            if (fname == "")
            {
                UpdateDataGridView();
            }
            else
            {
                List <Employee> eList = new List <Employee>();
                eList.Add(managment.GetEmployeeByName(fname));
                BindingList <Employee> pos    = new BindingList <Employee>(eList);
                BindingSource          source = new BindingSource(pos, null);
                dataGridView1.DataSource = source;
            }
        }