Good friends. I am creating a project and I just ran into something that I can not solve. I have a datagridview where I show all the information of an employee:
private void Mostrar(){ var query = from p in db.Usuarios_
select p;
dataGridView1.Rows.Clear();
foreach (var items in query)
{
dataGridView1.Rows.Add(
items.Usuario.ToString(),
items.Numidentidad.ToString(),
items.NombreCom.ToString(),
items.Genero.ToString(),
items.Correo.ToString(),
items.Telefono.ToString(),
items.Cargo.ToString()
);
}
}
Now, my headache came when I tried to fill in another datagridview only if in the Cargo Registry the condition that Cargo had to be equal to "Teacher" was fulfilled, that is, I only filled the datagridview with all the records of the teacher . I would greatly appreciate your help.