private void dgvFacturas_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Int32 DocumentoID; try { //evita el error al tratar de reordenar la lista if (e.RowIndex == -1) { return; } //Codigo que se obtiene desde el grid DocumentoID = Convert.ToInt32(dgvFacturas.Rows[e.RowIndex].Cells[1].Value); //Provee el codigo del Documento a ser buscado IBusqueda FormInterfaceReporte = this.Owner as IBusqueda; if (FormInterfaceReporte != null && DocumentoID != null) { if (Seleccion == 1) { FormInterfaceReporte.SeleccionarDocumentoDesde(DocumentoID); } else if (Seleccion == 2) { FormInterfaceReporte.SeleccionarDocumentoHasta(DocumentoID); } this.Close(); } } catch (Exception Ex) { MessageBox.Show(Ex.Message); } }
public Controlador(TaggerMensajes taggerMensajes, Respuesta respuesta, IBusqueda busqueda, GeneradorPerfil generadorPerfil) { this.taggerMensajes = taggerMensajes; this.taggerMensajes.SetMediador(this); this.respuesta = respuesta; this.respuesta.SetMediador(this); this.busqueda = busqueda; this.busqueda.SetMediador(this); this.generadorPerfil = generadorPerfil; this.generadorPerfil.SetMediador(this); }