コード例 #1
0
ファイル: Managment.cs プロジェクト: shonie2xx/mediabazaar
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            string fname = tbxSearchFormerEmployee.Text;

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