示例#1
0
 public void exportReport() throws Exception {
   try {
     JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(datas);
     Map param = new HashMap();
     param.put("dosen", ((Dosen) cmbNamaDosen.getSelectedItem().getValue()).getNama());
     param.put("prodi", ((ProgramStudi) cmbProgdi.getSelectedItem().getValue()).getNama());
     param.put("tahun", cmbTahun.getSelectedItem().getValue().toString());
     param.put("semester", cmbSemester.getSelectedItem().getValue() + "");
     if (cmbExportType.getSelectedItem().getValue().toString().equals("pdf")) {
       Window pdfPreviewWnd =
           (Window) Executions.createComponents("/zul/pdfpreview/PdfPreview.zul", null, null);
       Jasperreport pdfReport = (Jasperreport) pdfPreviewWnd.getFellow("report");
       pdfReport.setType(cmbExportType.getSelectedItem().getValue().toString());
       pdfReport.setSrc("reports/jadwaldosen/JadwalDosen.jasper");
       pdfReport.setParameters(param);
       pdfReport.setDatasource(dataSource);
       pdfPreviewWnd.doModal();
     } else {
       report.setType(cmbExportType.getSelectedItem().getValue().toString());
       report.setSrc("reports/jadwaldosen/JadwalDosen.jasper");
       report.setParameters(param);
       report.setDatasource(dataSource);
     }
   } catch (Exception ex) {
     Messagebox.show(ex.getMessage());
   }
 }
示例#2
0
 public void onClick$btnNuevo() {
   Map<String, Object> parametros = new HashMap<String, Object>();
   parametros.put("ctrlWinCardiaca", this);
   Window win = (Window) Executions.createComponents(editCardiaca, null, parametros);
   win.doHighlighted();
   apagarBotones();
 }
示例#3
0
  public void newAssociationConcept() {
    logger.debug("createConcept()");

    Map<String, Object> data = new HashMap<String, Object>();

    data.put("EditMode", PopupAssociationConcept.EDITMODES.CREATE);

    /*if (codeSystemVersionId > 0)
    data.put("ContentMode", PopupConcept.CONTENTMODE.CODESYSTEM);
    else if (valueSetVersionId > 0)
    data.put("ContentMode", PopupConcept.CONTENTMODE.VALUESET);*/
    // data.put("CodeSystemId", codeSystemId);
    // data.put("ValueSetId", valueSetId);
    try {
      Window w =
          (Window)
              Executions.getCurrent()
                  .createComponents("/gui/main/modules/PopupAssociationConcept.zul", null, data);
      ((PopupAssociationConcept) w).setUpdateListener(this);

      w.doModal();
    } catch (Exception e) {
      LoggingOutput.outputException(e, this);
    }
  }
示例#4
0
 public void onClick$calendario(Event event) {
   border.getCenter().getChildren().clear();
   Window winCalendario = (Window) CtrlLetivo.getInstance().abrirEventosCalendario();
   winCalendario.setWidth("100%");
   winCalendario.setHeight("100%");
   winCalendario.setParent(border.getCenter());
 }
示例#5
0
 public void onClick$sala(Event event) {
   border.getCenter().getChildren().clear();
   Window winDisciplina = (Window) CtrlLetivo.getInstance().abrirEventosSala();
   winDisciplina.setWidth("100%");
   winDisciplina.setHeight("100%");
   winDisciplina.setParent(border.getCenter());
 }
示例#6
0
 public void onClick$turma(Event event) {
   border.getCenter().getChildren().clear();
   Window winTurma = (Window) CtrlLetivo.getInstance().abrirEventosTurma(1);
   winTurma.setWidth("100%");
   winTurma.setHeight("100%");
   winTurma.setParent(border.getCenter());
 }
  @Command
  public void desplegarFormPersonas() { // z =Datos personales,Apoderado
    Map params = new HashMap();

    Window w =
        (Window) Executions.createComponents("/personas/formBuscaPersonas.zul", null, params);
    // w.setTitle("REGISTRAR DATOS PERSONALES");
    w.doModal();
    w.addEventListener(
        "onDetachForm",
        new EventListener<Event>() {

          // @Override
          public void onEvent(Event arg0) throws Exception {
            Object obj = arg0.getData();
            if (obj instanceof Personas) {
              perSel = (Personas) obj;
              BindUtils.postGlobalCommand(null, null, "refrescarPersonas", null);
            }

            // System.out.println(obj);

          }
        });
  }
  //	@NotifyChange({"detallePagoModel","totalDetallePagos","saldoPagos","montoWarning"})
  //	@Command
  //	public void eliminarDetallePago(){
  //		if(this.detallePagoSeleccionado == null){
  //			Clients.showNotification("Seleccione un detalle de pago");
  //			return;
  //		}
  //		detallePagoModel.remove(detallePagoSeleccionado);
  //		refrescarDetallePago();
  //	}
  //
  @Command
  public void nuevoInforme() {
    java.util.Map<String, Object> params = new java.util.HashMap<String, Object>();
    final ActividadesMordenproduccion prov = new ActividadesMordenproduccion();
    prov.setId_estado("A");
    prov.setEstado("C"); // Cancelado
    prov.setFechaini(new java.util.Date());
    prov.setFechafin(new java.util.Date());
    prov.setUlt_usuarioa(UsuarioLogueado.getIdUsuario());
    prov.setId_mov(itemSel.getId());
    DetalleFasesProduccion dm =
        detalleFasesProduccionMapper.selectByPrimaryKey(itemSel.getId_det_fase_actual());
    prov.setId_fase(dm.getId_fase());
    params.put("ITEM_SEL", prov);
    params.put("ACCION_ACTUAL", EnumAcciones.ADD);
    //		params.put("CAT_ACTUAL", catActual);
    final Window w =
        (Window) Executions.createComponents("/produccion/formDetalleActividad.zul", null, params);
    w.setTitle("Nueva Actividad");
    w.doModal();
    w.addEventListener(
        "onDetachForm",
        new EventListener() {
          @Override
          public void onEvent(Event event) throws Exception {
            //				detalleInformeModel.add((ActividadesMordenproduccion)event.getData());

            BindUtils.postGlobalCommand(null, null, "refrescarDetallePago", null);
          }
        });
  }
示例#9
0
 public void onClick$resultado(Event event) {
   border.getCenter().getChildren().clear();
   Window winResultado = (Window) CtrlMatricula.getInstance().abrirRelatorioResultados();
   winResultado.setWidth("100%");
   winResultado.setHeight("100%");
   winResultado.setParent(border.getCenter());
 }
示例#10
0
  @Command
  public void nuevoItem() {
    java.util.Map<String, Object> params = new java.util.HashMap<String, Object>();
    DetallePagosmovimiento prov = new DetallePagosmovimiento();
    prov.setId_estado("A");
    prov.setTipomov("E");
    prov.setFecha(new java.util.Date());
    prov.setUlt_usuarioa(UsuarioLogueado.getIdUsuario());
    prov.setMonto(BigDecimal.ZERO);
    //		prov.setPorcentajefactura(new BigDecimal("100.00"));
    params.put("ITEM_SEL", prov);

    params.put("ACCION_ACTUAL", EnumAcciones.ADD);

    final Window w = (Window) Executions.createComponents(formPath, null, params);
    w.setTitle("Registrar pago");
    w.doModal();
    w.addEventListener(
        "onDetachForm",
        new EventListener() {
          @Override
          public void onEvent(Event event) throws Exception {
            BindUtils.postGlobalCommand(null, null, "refrescar", null);
          }
        });
  }
示例#11
0
 public void onClick$alocarProfessor(Event event) {
   border.getCenter().getChildren().clear();
   Window winAlocarProfessor = (Window) CtrlLetivo.getInstance().abrirEventosAlocarProfessor(2);
   winAlocarProfessor.setWidth("100%");
   winAlocarProfessor.setHeight("100%");
   winAlocarProfessor.setParent(border.getCenter());
 }
 public void exportReport() throws Exception {
   try {
     // JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(datas);
     if (cmbExportType.getSelectedItem().getValue().toString().equals("pdf")) {
       Window pdfPreviewWnd =
           (Window) Executions.createComponents("/zul/pdfpreview/PdfPreview.zul", null, null);
       Jasperreport pdfReport = (Jasperreport) pdfPreviewWnd.getFellow("report");
       pdfReport.setType(cmbExportType.getSelectedItem().getValue().toString());
       pdfReport.setSrc("reports/statistikpendidikandosen/StatistikPendidikanDosen.jasper");
       Map parameters = new HashMap();
       parameters.put("chart", chart.createBufferedImage(500, 300));
       pdfReport.setParameters(parameters);
       pdfReport.setDatasource(null);
       pdfPreviewWnd.doModal();
     } else {
       report.setType(cmbExportType.getSelectedItem().getValue().toString());
       report.setSrc("reports/statistikpendidikandosen/StatistikPendidikanDosen.jasper");
       Map parameters = new HashMap();
       parameters.put(
           "chart", chart.createBufferedImage(500, 300, BufferedImage.TRANSLUCENT, null));
       report.setParameters(parameters);
       report.setDatasource(null);
     }
   } catch (Exception ex) {
     Messagebox.show(ex.getMessage());
   }
 }
 public void cetak() throws Exception {
   Window win =
       (Window) Executions.createComponents("/zul/admin/rpt_daftar_perusahaan.zul", null, null);
   Textbox sql = (Textbox) win.getFellow("sql");
   Kecamatan kec = (Kecamatan) cmbKecamatan.getSelectedItem().getValue();
   sql.setValue("SELECT * FROM perusahaan WHERE kecamatan_id=" + kec.getId());
   win.doModal();
 }
 public void onClick$toolbarButtonNuevo() {
   Window win =
       (Window)
           Executions.createComponents(
               "/Modulo_Control_Productos/RegistroProductos.zul", null, null);
   win.setTitle("Registrar Nuevo Producto");
   win.doModal();
 }
示例#15
0
  /**
   * 生成报告按钮事件
   *
   * @param event
   * @throws Exception
   */
  public void onClick$CreateReportBtn(Event event) throws Exception {

    if (topNList.getSelectedItem() == null) {
      try {
        Messagebox.show("请选择报告!", "提示", Messagebox.OK, Messagebox.INFORMATION);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      return;
    }

    View view = Toolkit.getToolkit().getSvdbView(event.getTarget().getDesktop());
    String loginname = view.getLoginName();
    Listitem item = topNList.getSelectedItem();
    String section = item.getId();
    this.iniFile = new IniFile(INI_FILE);
    try {
      this.iniFile.load();
    } catch (Exception e) {
    }
    Map<String, String> reportDefine = this.iniFile.getSectionData(section);
    String Period = reportDefine.get("Period");
    String filetype = reportDefine.get("fileType");
    if (filetype == null) {
      filetype = "html";
    }
    Date tmStart = null;
    Date tmEnd = new Date();

    if (Period.equals("Month")) tmStart = Toolkit.getToolkit().delDay(new Date(), 30);
    else if (Period.equals("Week")) tmStart = Toolkit.getToolkit().delDay(new Date(), 7);
    else if (Period.equals("Day")) tmStart = Toolkit.getToolkit().delDay(new Date(), 1);
    else {
      Toolkit.getToolkit().showError("报告区间不支持:");
      return;
    }

    TopNReport tmpTopNReport = new TopNReport(section, reportDefine, tmStart, tmEnd, view, false);

    //	    tmpTopNReport.createReport();
    Thread thread = new Thread(tmpTopNReport);
    thread.setName("TopNReport -- TopNReport.java");
    thread.start();
    final Window win =
        (Window) Executions.createComponents("/main/progress/topnprogress.zul", null, null);
    win.setAttribute("topnreport", tmpTopNReport);
    win.setAttribute("filetype", filetype);
    win.setAttribute("reportname", tmpTopNReport.strReportName);
    win.doModal();
    // AMedia(String name, String format, String ctype, URL url, String charset)
    // 刷新日志数据

    // addlog
    //		View view = Toolkit.getToolkit().getSvdbView(event.getTarget().getDesktop());
    String minfo = loginname + " " + "在" + OpObjectId.topn_report.name + "中进行了手动生成报告操作.";
    AppendOperateLog.addOneLog(loginname, minfo, OpTypeId.add, OpObjectId.topn_report);
    onSelecttopNList(event);
  }
 public void onClick$btnHistorial() {
   Map<String, Object> parametros = new HashMap<String, Object>();
   parametros.put("paciente", paciente);
   Window win =
       (Window)
           Executions.createComponents(
               "/sigma/vistas/servicios/servicios/CatalogoHistorial.zul", null, parametros);
   win.doHighlighted();
 }
示例#17
0
  /**
   * 添加TOPN报告
   *
   * @param event
   * @throws InterruptedException
   * @throws SuspendNotAllowedException
   */
  public void onClick$addTopN(Event event) throws SuspendNotAllowedException, InterruptedException {
    final Window win = (Window) Executions.createComponents(EditTOPN, null, null);
    win.setAttribute("isedit", false);
    win.setAttribute("tTopNReportComposer", this);
    win.setAttribute("iniFile", iniFile);
    win.doModal();

    refreshInifile();
  }
示例#18
0
 @Override
 public void onEvent(Event arg0) throws Exception {
   // TODO Auto-generated method stub
   try {
     final Window win =
         (Window) Executions.createComponents("/main/progress/topnprogress.zul", null, null);
     win.setAttribute("topnreport", topNReport);
     win.doModal();
   } catch (Exception e) {
   }
 }
示例#19
0
 public void onClick$boletim(Event event) {
   border.getCenter().getChildren().clear();
   Window winBoletim;
   if (user.getPrivilegio() == 4) {
     winBoletim = (Window) CtrlMatricula.getInstance().abrirRelatorioBoletim(aluno);
   } else {
     winBoletim = (Window) CtrlMatricula.getInstance().abrirRelatorioBoletim();
   }
   winBoletim.setWidth("100%");
   winBoletim.setHeight("100%");
   winBoletim.setParent(border.getCenter());
 }
示例#20
0
 public void onClick$btnEditar() {
   if (listCardiaca.getSelectedItems().isEmpty()) {
     MensajeEmergente.mostrar("SELECTREG");
   } else {
     Map<String, Object> parametros = new HashMap<String, Object>();
     parametros.put("objeto", seleccion);
     parametros.put("ctrlWinCardiaca", this);
     Window win = (Window) Executions.createComponents(editCardiaca, null, parametros);
     win.doHighlighted();
     apagarBotones();
   }
 }
 @Listen("onLeitorUpdate = #lb_leitor")
 public void onClickAlterarLeitor(ForwardEvent event) {
   Button btn_confirmarLeitor = (Button) event.getOrigin().getTarget();
   Listcell celula = (Listcell) btn_confirmarLeitor.getParent().getParent();
   Listitem itemAlterar = (Listitem) celula.getParent();
   Leitor op = (Leitor) itemAlterar.getValue();
   Map<String, Object> arguments = new HashMap<String, Object>();
   arguments.put("funAlterar", op);
   arguments.put("lb_leitor", lb_leitor);
   Window win =
       (Window) Executions.createComponents("/registos/alteracaoLeitor.zul", null, arguments);
   win.doHighlighted();
 }
示例#22
0
  @GlobalCommand("showUserDetail")
  public void showUserDetail(@BindingParam("selectedUser") User user) {

    Map<String, Object> param = new HashMap<String, Object>();
    if (user != null && user.getId() != null) {
      param.put("selectedUser", user);
    }

    Window popupWin =
        (Window) Executions.createComponents("/widgets/modal/user-detail.zul", null, param);

    popupWin.doModal();
  }
示例#23
0
  public void onClick$visualizarTurmas(Event event) {
    border.getCenter().getChildren().clear();
    Window winVisualizarTurmas;
    if (user.getPrivilegio() == 3) {
      winVisualizarTurmas = (Window) CtrlLetivo.getInstance().abrirVisualizarTurmas(prof);
    } else {
      winVisualizarTurmas = (Window) CtrlLetivo.getInstance().abrirVisualizarTurmas();
    }

    winVisualizarTurmas.setWidth("100%");
    winVisualizarTurmas.setHeight("100%");
    winVisualizarTurmas.setParent(border.getCenter());
  }
示例#24
0
  public void onClick$matricularAluno(Event event) {
    Window winMatricularAluno;
    border.getCenter().getChildren().clear();
    if (user.getPrivilegio() == 4) {
      winMatricularAluno = (Window) CtrlMatricula.getInstance().abrirEventosMatricula(aluno);
    } else {
      winMatricularAluno = (Window) CtrlMatricula.getInstance().abrirEventosMatricula();
    }

    winMatricularAluno.setWidth("100%");
    winMatricularAluno.setHeight("100%");
    winMatricularAluno.setParent(border.getCenter());
  }
 public void onClick$deleteBtn(Event event) {
   Window canvasBoardWindow =
       (Window) zkpaintWindow.getFellow("canvasInc").getFellow("canvasBoardWindow");
   Canvas cvs1 = (Canvas) canvasBoardWindow.getFellow("cvs1");
   int size = shapeListBox.getItemCount();
   System.out.println(size);
   for (int i = size - 1; i > -1; i--) {
     if (!shapeListBox.getItemAtIndex(i).isSelected()) continue;
     System.out.println(i);
     cvs1.remove(i);
     ((ListModelList) shapeListBox.getModel()).remove(i);
   }
 }
示例#26
0
 public void onClick$cadastrarAluno(Event event) {
   Window winCadastrarAluno;
   if (user.getPrivilegio() == 4) {
     Aluno a = (Aluno) user.getPessoa();
     CtrlPessoa.getInstance().abrirEditarAluno(a, a.getCurso());
   } else {
     border.getCenter().getChildren().clear();
     winCadastrarAluno = (Window) CtrlPessoa.getInstance().abrirEventosAluno();
     winCadastrarAluno.setWidth("100%");
     winCadastrarAluno.setHeight("100%");
     winCadastrarAluno.setParent(border.getCenter());
   }
 }
示例#27
0
 public void onClick$professor(Event event) {
   Window winProfessor;
   if (user.getPrivilegio() == 3) {
     Professor p = (Professor) user.getPessoa();
     CtrlPessoa.getInstance().abrirEditarProfessor(p);
   } else {
     border.getCenter().getChildren().clear();
     winProfessor = (Window) CtrlPessoa.getInstance().abrirEventosProfessor();
     winProfessor.setWidth("100%");
     winProfessor.setHeight("100%");
     winProfessor.setParent(border.getCenter());
   }
 }
 private Component createDialog(Component content, String title) {
   Window dialog = new Window();
   dialog.appendChild(content);
   dialog.setTitle(title);
   dialog.setClosable(true);
   dialog.setSizable(true);
   dialog.setWidth("50%");
   dialog.setHeight("50%");
   dialog.setBorder(true);
   dialog.setParent(view);
   dialog.setMode(Window.MODAL);
   return dialog;
 }
示例#29
0
  public void onClick$chamada(Event event) {
    border.getCenter().getChildren().clear();
    Window winChamada;
    if (user.getPrivilegio() == 3) {
      winChamada = (Window) CtrlAula.getInstance().abrirEventosChamada(prof);
    } else {
      winChamada = (Window) CtrlAula.getInstance().abrirEventosChamada();
    }

    winChamada.setWidth("100%");
    winChamada.setHeight("100%");
    winChamada.setParent(border.getCenter());
  }
示例#30
0
  public void onClick$avaliacao(Event event) {
    border.getCenter().getChildren().clear();
    Window winAvaliacao;
    if (user.getPrivilegio() == 3) {
      winAvaliacao = (Window) CtrlAula.getInstance().abrirEventosAvaliacao(prof);
    } else {
      winAvaliacao = (Window) CtrlAula.getInstance().abrirEventosAvaliacao();
    }

    winAvaliacao.setWidth("100%");
    winAvaliacao.setHeight("100%");
    winAvaliacao.setParent(border.getCenter());
  }