private void grillaAfiliados_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == grillaProfesionales.Columns["Seleccionar"].Index && e.RowIndex >= 0 && e.RowIndex < (grillaProfesionales.Rows.Count - 1)) //Para que la accion de click sea valida solo sobre el boton { DataGridViewRow fila = grillaProfesionales.Rows[e.RowIndex]; if (!estaDadoDeBaja(fila)) { Profesional profesional = crearProfesional(e.RowIndex); //instancia un afiliado y luego depende de la funcionalidad, abrirá otra ventana switch (funcion) { case "Baja": AsistenteVistas.mostrarNuevaVentana(new BajaProfesional(this, profesional), this); break; case "Modificar": AsistenteVistas.mostrarNuevaVentana(new ModificarProfesional(this, profesional), this); break; case "Pedir Turno": if (noTieneAgenda(fila)) //chequea que tenga fecha de atencion desde y hasta (quiere decir que tiene una agenda registrada) { MessageBox.Show("ERROR: El profesional no tiene registrada una agenda", "Pedir Turno", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (comboEspecialidad.SelectedIndex != -1) { EspecialidadMedica especialidad = crearEspecialidad(); volverAVistaPedirTurno(profesional, especialidad); } else { MessageBox.Show("ERROR: Debe especificar una especialidad", "Pedir Turno", MessageBoxButtons.OK, MessageBoxIcon.Error); } } break; case "Registrar Llegada": volvarAVistaRegistroLlegada(profesional); break; case "Registrar Resultado": volverAVistaRegistrarResultado(profesional); break; default: break; } } else { MessageBox.Show("El profesional seleccionado se encuentra inhabilitado"); } } }
private void cargarGrilla() { if (funcion == "Generar Receta") { AsistenteVistas.cargarGrilla(grillaTurnos, AppRegistrarResultado.traerConsultasConResultados(afiliado, profesional, fechaAtencionPicker.Value)); } else { AsistenteVistas.cargarGrilla(grillaTurnos, AppRegistrarResultado.traerConsultas(afiliado, profesional, fechaAtencionPicker.Value, checkConsultaSinResultado.Checked)); } cargarBotonFuncionalidad(); }
public void cargarGrilla() { int matricula = 0; int especialidad = 0; if (matriculaBox.Text != "") { matricula = Convert.ToInt32(matriculaBox.Text); } if (comboEspecialidad.SelectedIndex != -1) { especialidad = getCodigoEspecialidad(comboEspecialidad.SelectedItem.ToString()); } AsistenteVistas.cargarGrilla(grillaProfesionales, AppProfesional.traerDataTableMedicos(nombreBox.Text, apellidoBox.Text, matricula, especialidad)); }
private void grillaTurnos_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (afiliado.nroAfiliado != 0) { if (e.ColumnIndex == grillaTurnos.Columns["Seleccionar"].Index && e.RowIndex >= 0 && e.RowIndex < (grillaTurnos.Rows.Count - 1)) //Para que la accion de click sea valida solo sobre el boton { ConsultaMedica consulta = armarConsultaMedica(e.RowIndex); switch (funcion) { case "Generar Receta": setearGenerarReceta(consulta); AsistenteVistas.volverAPadreYCerrar(padre, this); break; default: AsistenteVistas.mostrarNuevaVentana(new RegistrarDiagnostico(this, consulta), this); break; } } } }
private void grillaAfiliados_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == grillaAfiliados.Columns["Seleccionar"].Index && e.RowIndex >= 0 && e.RowIndex < (grillaAfiliados.Rows.Count - 1)) //Para que la accion de click sea valida solo sobre el boton { DataGridViewRow fila = grillaAfiliados.Rows[e.RowIndex]; if (!estaDadoDeBaja(fila)) { Afiliado afiliado = crearAfiliado(e.RowIndex); //instancia un afiliado y luego depende de la funcionalidad, abrirá otra ventana switch (funcion) { case "Baja": AsistenteVistas.mostrarNuevaVentana(new BajaAfiliado(this, afiliado), this); break; case "Modificar": AsistenteVistas.mostrarNuevaVentana(new PeticionAccion(afiliado, this), this); break; case "Pedir Turno": volverAVistaPedirTurno(afiliado); break; case "Registrar Llegada": volvarAVistaRegistroLlegada(afiliado); break; case "Registrar Resultado": volverAVistaRegistrarResultado(afiliado); break; default: break; } } else { MessageBox.Show("El afiliado seleccionado se encuentra dado de baja"); } } }
public void cargarGrilla() { AsistenteVistas.cargarGrilla(grillaAfiliados, AppAfiliado.getAfiliados(nombreBox.Text, apellidoBox.Text, "", 0, nroAfiliadoRaizBox.Text)); }
private void cancelButton_Click(object sender, EventArgs e) { AsistenteVistas.volverAPadreYCerrar(padre, this); }
private void volverAVistaPedirTurno(Afiliado afiliado) { (padre as PedirTurno).setearAfiliado(afiliado); AsistenteVistas.volverAPadreYCerrar(padre, this); }
private void volvarAVistaRegistroLlegada(Afiliado afiliado) { (padre as RegistroLlegada).setearAfiliado(afiliado); AsistenteVistas.volverAPadreYCerrar(padre, this); }
private void volverAVistaRegistrarResultado(Afiliado afiliado) { (padre as ListadoConsultas).setearAfiliado(afiliado); AsistenteVistas.volverAPadreYCerrar(padre, this); }
public static void fatalError(Form padre, Form form, Exception ex) //muestra una ventana con mensaje de error fatal, cierra la ventana actual y vuelve a la ventana padre { MessageBox.Show("Ha ocurrido un error, por favor reintente mas tarde. \n Detalle: \n" + ex.Message.ToString(), "FATAL ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); AsistenteVistas.volverAPadreYCerrar(padre, form); form.Close(); }
private void selectProfesionalButton_Click(object sender, EventArgs e) { AsistenteVistas.mostrarNuevaVentana(new ListadoProfesionales(this, "Registrar Resultado"), this); validarCampos(); }
private void volverAVistaPedirTurno(Profesional profesional, EspecialidadMedica especialidad) { (padre as PedirTurno).setearProfesional(profesional, especialidad); AsistenteVistas.volverAPadreYCerrar(padre, this); }
private void volvarAVistaRegistroLlegada(Profesional profesional) { (padre as RegistroLlegada).setearProfesional(profesional); AsistenteVistas.volverAPadreYCerrar(padre, this); }
private void volverAVistaRegistrarResultado(Profesional profesional) { (padre as ListadoConsultas).setearProfesional(profesional); AsistenteVistas.volverAPadreYCerrar(padre, this); }