Esempio n. 1
0
 /**
  * @param id_seccion
  * @param id_pregunta
  * @param tipo_pregunta
  * @param id_respuesta
  * @param respuesta
  */
 public void registrar_pregunta(
     BigDecimal id_seccion,
     BigDecimal id_pregunta,
     BigDecimal tipo_pregunta,
     BigDecimal id_respuesta,
     String respuesta) {
   int n = this.ref_seccion.size();
   for (int i = 0; i < n; i++) {
     CE_Seccion seccion = this.ref_seccion.get(i);
     if (seccion.getSe_id_seccion().compareTo(id_seccion) == 0)
       seccion.registrar_pregunta(id_pregunta, tipo_pregunta, id_respuesta, respuesta);
   }
 }
Esempio n. 2
0
 public static JSONObject Evaluacion_toJSONObject(CE_Evaluacion elemento) {
   JSONObject json = new JSONObject();
   try {
     json.put("id_evaluacion", elemento.getEv_id_evaluacion());
     json.put("mensaje", elemento.getEv_mensaje());
     json.put("descripcion", elemento.getEv_descripcion());
     json.put("estado", elemento.getEv_estado());
     if (elemento.ref_seccion != null)
       json.put("secciones", CE_Seccion.Seccion_toJSON(elemento.ref_seccion));
     else
       json.put(
           "secciones",
           CE_Seccion.Seccion_toJSON(
               CE_Seccion.secciones(elemento.getEv_id_evaluacion().toString())));
   } catch (Exception ex) {
     Logger.getLogger(CE_Evaluacion.class.getName()).log(Level.SEVERE, null, ex);
   }
   return json;
 }
Esempio n. 3
0
  private static CE_Evaluacion obtener_evaluacion(String sql) {
    CE_Evaluacion elemento = new CE_Evaluacion();

    Datos dato = new Datos("WebSAE");
    Registro registros = dato.consulta(sql);
    for (int i = 0; i < registros.size(); i++) {
      elemento.cr_CE_Evaluacion(registros.get(i));
      elemento.ref_seccion = CE_Seccion.secciones(elemento.getEv_id_evaluacion().toString());
    }
    return elemento;
  }