Exemplo n.º 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());
   }
 }
Exemplo n.º 2
0
 @Override
 public void onEvent(Event event) throws Exception {
   try {
     Date begin_date = view.getBeginDatabox().getValue();
     Date end_date = view.getEndDatabox().getValue();
     if (view.getSelectedNode() == null) {
       Messagebox.show(
           ErrorMessage.UNSELECT_MONITOR, "提示", Messagebox.OK, Messagebox.INFORMATION);
       return;
     }
     if (begin_date.after(end_date)) {
       Messagebox.show(ErrorMessage.TIME_ERROR, "提示", Messagebox.OK, Messagebox.INFORMATION);
       return;
     }
     Events.sendEvent(new Event(Events.ON_CLICK, view.getQueryBtn()));
     Window win = (Window) Executions.createComponents("/main/report/export.zul", null, null);
     win.setAttribute("colorlist", view.getColorlist());
     win.setAttribute("stateBeanData", view.getStateBean());
     win.setAttribute("persistTimeData", view.getStateItems());
     win.setSizable(false);
     win.setClosable(true);
     win.doModal();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  //	@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);
          }
        });
  }
 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());
   }
 }
  @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);

          }
        });
  }
 public void onCreate$tipoAbonoMttoWindow(Event event) throws Exception {
   logger.log(Level.INFO, "[TipoAbonoMttoCtrl][onCreate$tipoAbonoMttoWindow]");
   try {
     doOnCreateCommon(this.tipoAbonoMttoWindow, event);
     MensajeMultilinea.doSetTemplate();
     if (this.args.containsKey("gestorTipoAbonoCtrl")) {
       tipoAbonoListaCtrl = (GestorTipoAbonoCtrl) this.args.get("gestorTipoAbonoCtrl");
     } else {
       tipoAbonoListaCtrl = null;
     }
     if (this.args.containsKey("accion")) {
       accion = (Integer) this.args.get("accion");
     } else {
       accion = Constants.ACCION_MANTTO_NEW;
     }
     if (this.args.containsKey("tipoAbonoSelected")) {
       tipoAbonoSelected = (TipoAbono) this.args.get("tipoAbonoSelected");
     } else {
       tipoAbonoSelected = new TipoAbono();
     }
     cargarDatosIniciales();
     tipoAbonoMttoWindow.doModal();
     verificarEstadoBotones();
   } catch (Exception e) {
     logger.log(Level.SEVERE, e.getLocalizedMessage());
     e.printStackTrace();
   }
 }
Exemplo n.º 7
0
  public void onSetBatchButton(Event event) {
    final Window win = (Window) Executions.createComponents(batchMonitors_TargetUrl, null, null);
    win.setAttribute("monitorlistbox", monitorlistbox);
    Label pall = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("all");
    win.setAttribute("all", pall);
    Label pok = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("ok");
    win.setAttribute("ok", pok);
    Label pwarn = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("warn");
    win.setAttribute("warn", pwarn);
    Label perror = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("error");
    win.setAttribute("error", perror);
    Label pforbid =
        (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("forbid");
    win.setAttribute("forbid", pforbid);
    Label pbad = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("bad");
    win.setAttribute("bad", pbad);

    Label pnullspecial =
        (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("nullspecial");
    win.setAttribute("null", pnullspecial);

    try {
      win.doModal();
    } catch (SuspendNotAllowedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
Exemplo n.º 8
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);
          }
        });
  }
Exemplo n.º 9
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);
    }
  }
Exemplo n.º 10
0
  @Override
  public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);

    Map map = Executions.getCurrent().getArg();
    parent = (ShowPartnerController) map.get("parent");
    windowAddPartner.doModal();
  }
 public void onClick$toolbarButtonNuevo() {
   Window win =
       (Window)
           Executions.createComponents(
               "/Modulo_Control_Productos/RegistroProductos.zul", null, null);
   win.setTitle("Registrar Nuevo Producto");
   win.doModal();
 }
 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();
 }
Exemplo n.º 13
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);
  }
  @Override
  public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);

    Map map = Executions.getCurrent().getArg();
    parent = (ShowSpecificAddressController) map.get("parent");
    // specificAddress = (SpecificAddress) map.get("obj");
    windowEditSpecificAddress.doModal();
  }
Exemplo n.º 15
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();
  }
Exemplo n.º 16
0
 /**
  * Sets the mode to overlapped, popup, modal, embedded or highlighted.
  *
  * <p>Notice: {@link Events#ON_MODAL} is posted if you specify "modal" to this method. Unlike
  * {@link #doModal}, {@link Events#ON_MODAL} is posted, so the window will become modal later
  * (since 3.0.4). In other words, setMode("modal") never suspends the execution of the current
  * thread. On the other hand, {@link #doModal} will suspends the execution if executed in an event
  * listener, or throws an exception if <em>not</em> executed in an event listener.
  *
  * <p>Refer to <a
  * href="http://books.zkoss.org/wiki/ZK_Component_Reference/Containers/Window">Overlapped, Popup,
  * Modal, Highlighted and Embedded</a> for more information.
  *
  * <p>If the event processing thread is disabled (it is the default), InterruptedException won't
  * be thrown.
  *
  * @param name the mode which could be one of "embedded", "overlapped", "popup", "modal",
  *     "highlighted". Note: it cannot be "modal". Use {@link #doModal} instead.
  * @exception InterruptedException thrown if "modal" is specified the event thread is enabled
  *     (disabled by default), and one of the following conditions occurs: 1) the desktop or the
  *     Web application is being destroyed, or 2) {@link
  *     org.zkoss.zk.ui.sys.DesktopCtrl#ceaseSuspendedThread}. To tell the difference, check the
  *     getMessage method of InterruptedException.
  */
 public void setMode(String name) throws InterruptedException {
   if ("popup".equals(name)) doPopup();
   else if ("overlapped".equals(name)) doOverlapped();
   else if ("embedded".equals(name)) doEmbedded();
   else if ("modal".equals(name)) {
     if (isEventThreadEnabled(false)) Events.postEvent(Events.ON_MODAL, this, null);
     else doModal();
   } else if ("highlighted".equals(name)) doHighlighted();
   else throw new WrongValueException("Unknown mode: " + name);
 }
Exemplo n.º 17
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) {
   }
 }
Exemplo n.º 18
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();
  }
Exemplo n.º 19
0
  private void doShowDialog(TPermohonan tPermohonan, TVerifikasi tVerifikasi)
      throws InterruptedException {
    if (tPermohonan == null) {
      tPermohonan = getPermohonanService().getNewPermohonan();
      settPermohonan(tPermohonan);
    }
    try {
      doWriteBeanToComponents(tPermohonan, tVerifikasi);
      window_Permohonan.doModal();

    } catch (Exception e) {
      Messagebox.show(e.toString());
    }
  }
Exemplo n.º 20
0
  public void about() {

    Window win = (Window) Executions.createComponents("about.zul", this, null);
    win.setClosable(true);
    try {
      win.doModal();
    } catch (SuspendNotAllowedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
 /**
  * showModal()
  *
  * @param showModal()
  * @return Conecta con la ventana modal DetalleHistorialEstudiante.zul
  * @throws No dispara ninguna excepcion.
  */
 @Command
 public void showModal() {
   cedula = apelacionseleccionada.getId().getCedulaEstudiante();
   codigoLapso = apelacionseleccionada.getId().getCodigoLapso();
   final HashMap<String, Object> map = new HashMap<String, Object>();
   map.put("cedula", cedula);
   map.put("codigoLapso", codigoLapso);
   final Window window =
       (Window)
           Executions.createComponents(
               "/WEB-INF/sigarep/vistas/transacciones/DetalleHistorialEstudiante.zul", null, map);
   window.setMaximizable(true);
   window.doModal();
 }
Exemplo n.º 22
0
  /**
   * @type m�todo de la clase ActionStandardBorder.java
   * @name generarReporte
   * @param idMapper representa el identificador del DTO en el mapa de reportes disponibles
   * @param titulo representa el titulo del reporte en la plantilla definida.
   * @param subtitulo representa el subtitulo del reporte en la plantilla definida.
   * @param list debido los reportes pueden ser generados a partir de una lista de objetos ya
   *     cargados en memoria es decir no hay que ejecutar una consulta SQL a la base de datos, este
   *     par��metro representa esa lista de objetos los cuales son procesados internamente por el
   *     ReportBuilder que es el encargado de la generaci��n de reportes.
   * @param componente especifica el nombre del componente o m��dulo al cual pertenece la entidad
   *     (DTO) del reporte a generar
   * @throws Exception Cualquier Excepcion
   * @desc Eencapsula la funcionalidad de generaci��n din��mica de reportes para tablas b��sicas.
   *     Debe ser invocado en cada uno de los action que necesiten tener esta opci��n
   */
  public void generarReporte(String idMapper, String fuente, String modulo, Component component)
      throws Exception {
    log.info("Ejecutando m�todo [generarReporte]...");

    Map<String, Object> parametros = new HashMap<String, Object>();
    parametros.put("id", idMapper);
    parametros.put("fuente", fuente);
    parametros.put("modulo", modulo);
    parametros.put("SEC_EJECUTABLE_PADRE", component.getAttribute("SEC_EJECUTABLE"));

    Component emergente = getEmergente("SRZ_REPORTE", parametros);
    if (emergente instanceof Window) {
      Window win = (Window) emergente;
      win.setClosable(true);
      emergente.setAttribute("TITULO_NOTIFICACIONES_GRITTER", ((Window) emergente).getTitle());
      win.doModal();
    }
  }
 public void onClick$toolbarButtonEditar() {
   Productos productoSeleccionado = null;
   if (listboxProductos.getSelectedItem() != null) {
     productoSeleccionado = listboxProductos.getSelectedItem().getValue();
   } else {
     alert("Por favor seleccione un producto de la lista");
     return;
   }
   Window win =
       (Window)
           Executions.createComponents(
               "/Modulo_Control_Productos/RegistroProductos.zul", null, null);
   win.setTitle("Editar Producto");
   String opcion = "editar";
   win.setAttribute("productos", productoSeleccionado);
   win.setAttribute("op", opcion);
   win.doModal();
   actualizarLista("");
 }
 public void onCreate$preparacionesEmpleadoMttoWindow(Event event) throws Exception {
   logger.log(
       Level.INFO, "[PreparacionesEmpleadoMttoCtrl][onCreate$preparacionesEmpleadoMttoWindow]");
   try {
     doOnCreateCommon(this.preparacionesEmpleadoMttoWindow, event);
     MensajeMultilinea.doSetTemplate();
     planillaSelected = null;
     if (this.args.containsKey("planillaSelected")) {
       planillaSelected = (Planilla) this.args.get("planillaSelected");
       lblNombrePlanillaSelected.setValue(planillaSelected.getDescripcionPlanilla());
     }
     llenarDatosCampos();
     revisarEstadoComponentes();
     preparacionesEmpleadoMttoWindow.doModal();
   } catch (Exception e) {
     logger.log(Level.SEVERE, e.getLocalizedMessage());
     e.printStackTrace();
   }
 }
Exemplo n.º 25
0
  @NotifyChange("itemSel")
  @Command
  public void modificarItem(@BindingParam("param") DetallePagosmovimiento param) {
    if (param != null) {
      this.itemSel = param;
    }

    if (itemSel == null) {
      Messagebox.show("Seleccione un detalle de pago! para realizar esta operacion");
      return;
    }

    java.util.Map<String, Object> params = new java.util.HashMap<String, Object>();

    //		Datoextra ma = new Datoextra();
    //		ma.setId(itemSel.getId_tamano());
    //		ma.setNombre(itemSel.getTamano());
    //
    //		itemSel.setTamSel(ma);

    //		Datoextra ma2 = new Datoextra();
    //		ma2.setId(itemSel.getId_tinta());
    //		ma2.setNombre(itemSel.getTinta());
    //		itemSel.setTinSel(ma2);

    params.put("ITEM_SEL", itemSel);
    params.put("ACCION_ACTUAL", EnumAcciones.MOD);

    final Window w = (Window) Executions.createComponents(formPath, null, params);
    w.setTitle("Modificar pago");

    w.doModal();
    w.addEventListener(
        "onDetachForm",
        new EventListener() {
          @Override
          public void onEvent(Event event) throws Exception {
            BindUtils.postGlobalCommand(null, null, "refrescar", null);
          }
        });
  }
  @NotifyChange("detalleModel")
  @Command
  public void nuevoDetalle() {

    final java.util.Map<String, Object> params = new java.util.HashMap<String, Object>();
    params.put("NOT_IN", tmSel);
    final Window w =
        (Window)
            Executions.createComponents("/ventaservicios/formBuscarDetalleOtr.zul", null, params);
    w.doModal();
    w.addEventListener(
        "onDetalleServSelected",
        new EventListener<Event>() {
          @Override
          public void onEvent(Event event) throws Exception {
            detalleSeleccionado = (DetalleServicio) event.getData();
            //				DetalleProduccion prov = new DetalleProduccion();
            //				itemSel.setId_detserv(ds.getId());
            //				itemSel.setDetalle(ds.getDetalle());
            //
            //				itemSel.setCliente(ds.getCliente());
            //				itemSel.setNro_otr(ds.getNro_comprobante());
            //				itemSel.setFecha_correccion(ds.getFecha_correccion());
            //				itemSel.setFecha_entrega(ds.getFecha_entrega());
            //				Iterator<DetalleProduccion> it = detalleModel.iterator();
            //				boolean existe = false;
            //				while (it.hasNext()) {
            //					DetalleProduccion m = it.next();
            //					if(m.getId_detserv().equals(ds.getId()))existe = true;
            //				}
            //
            //				if (!existe) {
            //					detalleModel.add(prov);
            //				}

            BindUtils.postGlobalCommand(null, null, "refrescarDetalle", null);
            // params.put("SERV_SEL", servSel);

          }
        });
  }
 public void onEventCreate(CalendarsEvent event) throws InterruptedException, RemoteException {
   StorageComponentProxy proxy = SystemDictionary.getSCProxy();
   bookEventWin = (Window) Executions.createComponents("bookEvent.zul", self.getParent(), null);
   bookEventWin.setAttribute("calendars", cal);
   bookEventWin.setAttribute("calevent", event);
   bookEventWin.getFellow("qsrow").setVisible(true);
   Date setting = event.getBeginDate();
   setting.setTime(setting.getTime() + 43200000);
   ((Datebox) bookEventWin.getFellow("datetask")).setValue(setting);
   ((Timebox) bookEventWin.getFellow("timetask")).setValue(setting);
   ((Button) bookEventWin.getFellow("savebutton")).setVisible(true);
   ((Listbox) bookEventWin.getFellow("tasktypesel")).setSelectedIndex(0);
   String userid = (String) Sessions.getCurrent().getAttribute("userid");
   ((Textbox) bookEventWin.getFellow("userid")).setValue(userid);
   Toolbar toolbar = (Toolbar) self.getFellow("toolbar");
   String currentexecutor = ((Label) toolbar.getFellow("exechelp")).getValue();
   SystemDictionary.webguiLog("DEBUG", "Executor: " + currentexecutor);
   OperationResult opres =
       proxy.getUserIdByPersonId(currentexecutor, SystemDictionary.USERTYPE_PATIENT_INT, userid);
   Patient patient = proxy.getPatient(currentexecutor, userid);
   Carer carer = patient.getPatientCarer();
   OperationResult realexecutor =
       proxy.getUserIdByPersonId(carer.getID(), SystemDictionary.USERTYPE_CARER_INT, userid);
   SystemDictionary.webguiLog(
       "DEBUG", "Executor req: " + realexecutor.getCode() + ":" + opres.getDescription());
   ((Textbox) bookEventWin.getFellow("objid")).setValue(realexecutor.getCode());
   ((Textbox) bookEventWin.getFellow("addressedid")).setValue(opres.getCode());
   ((Textbox) bookEventWin.getFellow("objstr")).setValue(carer.toString());
   ((Textbox) bookEventWin.getFellow("addressedstr")).setValue(patient.toString());
   User assigner = proxy.getUser(userid);
   Clinician assg = proxy.getClinician(assigner.getPersonID(), userid);
   ((Textbox) bookEventWin.getFellow("userstr")).setValue(assg.toString());
   ((Listbox) bookEventWin.getFellow("questnamefield")).setSelectedIndex(0);
   // bookEventWin.getFellow("assignerrow").setVisible(false);
   bookEventWin.getFellow("massivequestionrow").setVisible(true);
   bookEventWin.getFellow("massivecheckrow").setVisible(true);
   bookEventWin.setTitle("New Task");
   bookEventWin.setVisible(true);
   bookEventWin.doModal();
 }
Exemplo n.º 28
0
  /**
   * Opens the Dialog window modal.
   *
   * <p>It checks if the dialog opens with a new or existing object and set the readOnly mode
   * accordingly.
   *
   * @param anOrderposition
   * @throws InterruptedException
   */
  public void doShowDialog(Orderposition anOrderposition) throws InterruptedException {

    // if aBranche == null then we opened the Dialog without
    // args for a given entity, so we get a new Obj().
    if (anOrderposition == null) {

      /** !!! DO NOT BREAK THE TIERS !!! */
      // We don't create a new DomainObject() in the frontend.
      // We GET it from the backend.
      anOrderposition = getOrderService().getNewOrderposition();
    }

    try {

      if (anOrderposition.getOrder() != null) {
        // fill the components with the data
        doWriteBeanToComponents(anOrderposition);
      }

      // set Readonly mode accordingly if the object is new or not.
      if (anOrderposition.isNew()) {
        btnCtrl.setInitNew();
        doEdit();
      } else {
        btnCtrl.setInitEdit();
        doReadOnly();
      }

      // stores the inital data for comparing if they are changed
      // during user action.
      doStoreInitValues();

      orderPositionDialogWindow.doModal(); // open the dialog in
      // modal
      // mode
    } catch (final Exception e) {
      Messagebox.show(e.toString());
    }
  }
Exemplo n.º 29
0
 /**
  * Sets the mode to overlapped, popup, modal, embedded or highlighted.
  *
  * @see #setMode(String)
  */
 public void setMode(int mode) throws InterruptedException {
   switch (mode) {
     case POPUP:
       doPopup();
       break;
     case OVERLAPPED:
       doOverlapped();
       break;
     case EMBEDDED:
       doEmbedded();
       break;
     case MODAL:
       if (isEventThreadEnabled(false)) Events.postEvent(Events.ON_MODAL, this, null);
       else doModal();
       break;
     case HIGHLIGHTED:
       doHighlighted();
       break;
     default:
       throw new WrongValueException("Unknown mode: " + mode);
   }
 }
Exemplo n.º 30
0
 /**
  * 编辑TOP_N报告
  *
  * @param section
  * @throws Exception
  */
 public void onTpenEditTop_NReport(Event section) throws Exception {
   View view = Toolkit.getToolkit().getSvdbView(Executions.getCurrent().getDesktop());
   if (this.editFlag) {
     final Window win = (Window) Executions.createComponents(EditTOPN, null, null);
     win.setAttribute("isedit", true);
     win.setAttribute("tTopNReportComposer", this);
     win.setAttribute("iniFile", iniFile);
     win.setAttribute("currsection", section.getData());
     try {
       win.doModal();
     } catch (Exception e) {
       return;
     }
     refreshInifile();
     String loginname = view.getLoginName();
     String minfo =
         loginname
             + " "
             + "在"
             + OpObjectId.topn_report.name
             + "中进行了  "
             + OpTypeId.edit.name
             + "操作。";
     AppendOperateLog.addOneLog(loginname, minfo, OpTypeId.edit, OpObjectId.topn_report);
   } else {
     try {
       Messagebox.show(
           "用户:" + view.getLoginName() + " 没有  编辑TopN报告  的权限!",
           "提示",
           Messagebox.OK,
           Messagebox.INFORMATION);
       return;
     } catch (Exception e) {
     }
   }
 }