示例#1
0
        private void loadData()
        {
            string value    = txtSearch.Text.ToLower();
            var    products = studentBLO.GetBy
                              (
                x =>
                x.Reference.ToLower().Contains(value)
                              ).OrderBy(x => x.Reference).ToArray();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = products;
            dataGridView1.ClearSelection();
        }
示例#2
0
        private void loadData()
        {
            string value    = txtSearch.Text;
            var    students = studentBLO.GetBy(
                x =>
                x.FirstName.ToLower().Contains(value) ||
                x.LastName.ToLower().Contains(value) ||
                x.BornAt.ToLower().Contains(value)
                ).OrderBy(x => x.FirstName).ToArray();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = students;
            dataGridView1.ClearSelection();
        }
示例#3
0
        private void loadData()
        {
            string value    = txtSearch.Text.ToLower();
            var    students = studentBLO.GetBy
                              (
                x =>
                x.Matricule.ToLower().Contains(value) ||
                x.Nom.ToLower().Contains(value)
                              ).OrderBy(x => x.Matricule).ToArray();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = students;
            lblCount.Text            = $"{dataGridView1.RowCount} rows";
            dataGridView1.ClearSelection();
        }