예제 #1
0
        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            string value     = textsearch.Text.ToLower();
            var    comptoirs = comptoirBLO.getby(
                x =>
                x.Code
                .Contains(value)              //||
                // x..Contains(value)


                );

            loadata(comptoirs);
        }
예제 #2
0
        private void loadata()
        {
            string value     = textsearch.Text.ToLower();
            var    comptoirs = venteBLO.getby
                               (
                x =>
                x.Code.ToLower().Contains(value) ||
                x.Designation.ToLower().Contains(value)
                               ).OrderBy(x => x.Code).ToArray();

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