Ejemplo n.º 1
0
 void fill()
 {
     db = new FactorManagmentEntities();
     DataGrid.DataSource = (from j in db.Togarrrs
                            select new
                            { j.id, j.name, type = j.Togaar_type.name, j.phone }).ToList();
 }
Ejemplo n.º 2
0
        private void button6_Click(object sender, EventArgs e)
        {
            db = new FactorManagmentEntities();
            string word = textBox1.Text;

            DataGrid.DataSource = (from j in db.Togarrrs
                                   where j.name.Contains(word) || j.phone.Contains(word) || j.Togaar_type.name.Contains(word)
                                   select new
                                   { j.id, j.name, type = j.Togaar_type.name, j.phone }).ToList();
        }