private void frmBitacoraRegistrar_Load(object sender, EventArgs e) { foreach (var voluntario in voluntarios.ConsultarVoluntarios()) { cmbID.Items.Add(voluntario.NombreCompleto); } }
private void frmConsultarVoluntarios_Load(object sender, EventArgs e) { try { clsVoluntarios objVoluntarios = new clsVoluntarios(); var lista = objVoluntarios.ConsultarVoluntarios(); foreach (clsVoluntarios.dato dato in lista) { dgvVoluntarios.Rows.Add(dato.idVoluntario, dato.NombreCompleto, dato.Horario, dato.Telefono); } } catch (Exception) { throw; } }
private void btnRefresh_Click(object sender, EventArgs e) { //Vuelve a cargar la tabla completa try { dgvVoluntarios.Rows.Clear(); clsVoluntarios objVoluntarios = new clsVoluntarios(); var lista = objVoluntarios.ConsultarVoluntarios(); foreach (clsVoluntarios.dato dato in lista) { dgvVoluntarios.Rows.Add(dato.idVoluntario, dato.NombreCompleto, dato.Horario, dato.Telefono); } } catch (Exception) { throw; } }