private void bnResponderPreguntas_Click(object sender, EventArgs e) { FrmResponder responder = new FrmResponder(idUsuario); this.Hide(); responder.ShowDialog(); responder = (FrmResponder)this.ActiveMdiChild; }
private void DgvPreguntas_CellContentClick(object sender, DataGridViewCellEventArgs e) { //Solo ejecutarla si es la columna de botones if (e.ColumnIndex < 4 || e.RowIndex == -1) return; //Obtengo la pregunta seleccionada para abrir el detalle y poder responderla var selectedQuestion = _questions.Find(question => question.ID_Pregunta == (int)DgvPreguntas.Rows[e.RowIndex].Cells[2].Value); var selectedPublication = _questions.Find(question => question.ID_Publicacion == (int)DgvPreguntas.Rows[e.RowIndex].Cells[2].Value); if (selectedQuestion != null) { var editQuestion = new FrmResponder(selectedQuestion); editQuestion.ShowDialog(); if (editQuestion.CompleteAction) RefreshSources(); } }
private void DgvPreguntas_CellContentClick(object sender, DataGridViewCellEventArgs e) { //Solo ejecutarla si es la columna de botones if (e.ColumnIndex < 4 || e.RowIndex == -1) { return; } //Obtengo la pregunta seleccionada para abrir el detalle y poder responderla var selectedQuestion = _questions.Find(question => question.ID_Pregunta == (int)DgvPreguntas.Rows[e.RowIndex].Cells[2].Value); var selectedPublication = _questions.Find(question => question.ID_Publicacion == (int)DgvPreguntas.Rows[e.RowIndex].Cells[2].Value); if (selectedQuestion != null) { var editQuestion = new FrmResponder(selectedQuestion); editQuestion.ShowDialog(); if (editQuestion.CompleteAction) { RefreshSources(); } } }