public TipoBuscadorController(TipoBuscador vista) { this.vista = vista; vista.Load += new EventHandler(mostrarRegistrosTipo); vista.txtBuscar.TextChanged += new EventHandler(mostrarRegistrosTipo); vista.btnAgregar.Click += new EventHandler(enviarDatos); }
private void abrirFormulario(object sender, EventArgs e) { if (((PictureBox)sender).Name == "btnBuscarPaciente") { PacienteBuscador paciente = new PacienteBuscador(); vista.AddOwnedForm(paciente); paciente.Show(); } if (((PictureBox)sender).Name == "btnBuscarDoctor") { DoctorBuscador doctor = new DoctorBuscador(); vista.AddOwnedForm(doctor); doctor.Show(); } if (((PictureBox)sender).Name == "btnBuscarTipo") { TipoBuscador tipo = new TipoBuscador(); vista.AddOwnedForm(tipo); tipo.Show(); } }