// boton buscar Contacto private void btnBuscar_Click(object sender, EventArgs e) { try { frmConsultaContactos pConsulta = new frmConsultaContactos(); pConsulta.ShowDialog(); if (pConsulta.pInfoContact != null) { pContact = pConsulta.pInfoContact; txtNombre.Text = pContact.name; txtApellido.Text = pContact.lastName; txtCorreo.Text = pContact.Email; // para cargar las fotos del contacto loadImages(); setVisibleTrueComboBoxes(); setVisibleTruePBforNumbers(); loadNumbers(); } } catch (Exception ex) { MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void contactosToolStripMenuItem1_Click(object sender, EventArgs e) { frmConsultaContactos pConsulta = new frmConsultaContactos(); pConsulta.Menu = true; pConsulta.Show(); }
private void btnBuscarContacto_Click(object sender, EventArgs e) { frmConsultaContactos pConsulta = new frmConsultaContactos(); pConsulta.Menu = false; pConsulta.ShowDialog(); if (pConsulta.pInfoContact != null) { try { // TODO: This line of code loads data into the 'dsAgenda.reportContacto' table. You can move, or remove it, as needed. this.reportContactoTableAdapter.Fill(this.dsAgenda.reportContacto, pConsulta.pInfoContact.id); this.reportViewer1.RefreshReport(); } catch (Exception ex) { MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("No se selecciono un contacto para poder general el reporte", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }