protected void btnPersonas_Click(object sender, EventArgs e) { activosController ac = new activosController(); pruebaEntities db = new pruebaEntities(); GridViewTodo.DataSource = db.personas.ToList(); GridViewTodo.DataBind(); }
protected void btnBuscar_Click(object sender, EventArgs e) { activosController ac = new activosController(); pruebaEntities db = new pruebaEntities(); if (txtID.Text != "" && dropTipo.Text != "" && calCompra.SelectedDate != null && txtSerial.Text != "") { int id = Convert.ToInt32(txtID.Text); GridViewTodo.DataSource = ac.Getactivo(id); } else { GridViewTodo.DataSource = db.activos.ToList(); } GridViewTodo.DataBind(); }