Example #1
0
 public void init(GhZcqc z) {
   zcqc = z;
   if (z.getZcTime() != null) {
     titlegettime.setValue(ConvertUtil.convertDate(DateUtil.getDateString(z.getZcTime())));
   }
   if (z.getZcPubtime() != null) {
     gettime.setValue(ConvertUtil.convertDate(DateUtil.getDateString(z.getZcPubtime())));
   }
   if (z.getZcNum() != null
       || z.getZcQuasym() != null
       || z.getZcPubdept() != null
       || z.getZcIdentdept() != null) {
     certifino.setValue(z.getZcNum());
     qualino.setValue(z.getZcQuasym());
     certifidept.setValue(z.getZcPubdept());
     identdept.setValue(z.getZcIdentdept());
   }
   /** 初始化附件 */
   fileList.clear();
   List<Jxkh_DataFile> list = userDetailService.getFileByUser(zcqc.getZcId(), Jxkh_DataFile.TITLE);
   if (list != null && list.size() > 0) {
     for (Jxkh_DataFile f : list) {
       if (f != null) {
         String[] s = new String[4];
         s[0] = f.getFilePath();
         s[1] = f.getFileName();
         s[2] = f.getUpTime();
         s[3] = Jxkh_DataFile.TRAIN.toString();
         fileList.add(s);
       }
     }
   }
   fileListbox.setModel(new ListModelList(fileList));
 }
  @SuppressWarnings("unchecked")
  @Override
  public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);
    webEmployee = (WebEmployee) ZkUtils.getSessionAttribute("webEmployee");
    Map<String, String> map = new HashMap<String, String>();
    map = ZkUtils.getExecutionArgs();
    String dbId = map.get("dbId");
    currentPage = map.get("currentPage");
    aDbId = dbId;
    codeDb =
        ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService"))
            .findcodeDbByDbId(dbId, webEmployee);
    if (dbId != null) {
      dbIdTxt.setValue(codeDb.getDbId());
      dbNameTxt.setValue(codeDb.getName());
      resourcesIdTxt.setValue(codeDb.getResourcesId());
      // solr查詢語句
      String solrQuery = "";
      solrQuery += "type_id:DB";
      // resourceId
      if (codeDb.getResourcesId() != null && !codeDb.getResourcesId().trim().equals("")) {
        solrQuery += " resources_id:" + codeDb.getResourcesId();
      }
      List<ErmResourcesMainfileV> resMainDbwsList =
          ((ResourcesMainDbwsSolrSearch) SpringUtil.getBean("resourcesMainDbwsSolrSearch"))
              .resourcesMainSearch(solrQuery);
      if (resMainDbwsList.size() > 0) {
        resourcesNameTxt.setValue(resMainDbwsList.get(0).getTitle());
      }
      orderNoIbx.setValue(codeDb.getOrderNo());
      urlTxt.setValue(codeDb.getUrl());
      if (codeDb.getEzproxy() != null) {
        if (codeDb.getEzproxy().equals("Y")) {
          ezproxyRdo.setSelectedIndex(0);
        } else {
          ezproxyRdo.setSelectedIndex(1);
        }
      }
      ((ErmResourcesSuunitIdService) SpringUtil.getBean("ermResourcesSuunitIdService"))
          .findBySuunitResId(dbId);
    }

    if (dbIdTxt.getValue() == null || dbIdTxt.getValue().equals("")) {
      addSuunitBtn.setDisabled(true);
      delSuunitBtn.setDisabled(true);
    }
    flushList();
    // List<ErmResourcesSuunit> sunitList=new
    // ArrayList<ErmResourcesSuunit>();
    // sunitList=((ErmResourcesSuunitIdService) SpringUtil
    // .getBean("ermResourcesSuunitIdService")).findBySuunitResId(dbId);
    // if (sunitList.size() > 0) {
    // ListModelList<ErmResourcesSuunit> listModel = new
    // ListModelList<ErmResourcesSuunit>(sunitList);
    // listModel.setMultiple(true);
    // resMainSuunitLix.setModel(listModel);
    // }

  }
  @Override
  protected void preencherDadosTela(KCategoriaProblema kCategoriaProblema)
      throws NucleoRegraNegocioExcecao {

    tbNome.setValue(kCategoriaProblema.getNome());
    tbDescricao.setValue(kCategoriaProblema.getDescricao());
  }
  private void setConfigDefaults() {
    try {
      Properties config = Util.getConfig(null);

      for (Comboitem item : portBaudRate.getItems()) {
        if (config.getProperty(Constants.SERIAL_PORT_BAUD).equals(item.getValue())) {
          portBaudRate.setSelectedItem(item);
        }
      }
      portsToScan.setValue(config.getProperty(Constants.SERIAL_PORTS));
      cfgWindOffset.setValue(config.getProperty(Constants.WIND_ZERO_OFFSET));
      String useChoice = config.getProperty(Constants.DNS_USE_CHOICE);
      if (Constants.DNS_USE_BOAT.equals(useChoice)) {
        useHomeGroup.setSelectedItem(useBoatRadio);
      } else {
        useHomeGroup.setSelectedItem(useHomeRadio);
      }
      if (new Boolean(config.getProperty(Constants.PREFER_RMC))) {
        useRmcGroup.setSelectedItem(useRmcRadio);
      } else {
        useRmcGroup.setSelectedItem(useHdgRadio);
      }
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      Messagebox.show("There has been a problem with loading the configuration:" + e.getMessage());
    }
  }
Example #5
0
  /*
   * (non-Javadoc)
   *
   * @see com.hxzy.base.web.window.ActionWindow#onBind()
   */
  @Override
  public void onBind() {

    list = dictService.findByProperty("parent.code", "productCategory");
    binder.loadComponent(combobox);

    if (member != null) {
      companyName.setValue(member.getCompanyName());
      contacts.setValue(member.getContacts());
      joinTime.setValue(member.getJoinTime());
      endTime.setValue(member.getEndTime());

      combobox.setItemRenderer(
          new ComboitemRenderer() {

            public void render(Comboitem item, Object o) throws Exception {
              Dict d = (Dict) o;
              item.setValue(d);
              item.setLabel(d.getName());
              Dict category = member.getCategory();

              if (d.equals(category)) {
                combobox.setSelectedItem(item);
              }
            }
          });
    }
  }
 public void doClear() {
   txtClaveUsuario.setValue(null);
   txtClaveUsuario2.setValue(null);
   txtNombreUsuario.setValue(null);
   txtNumerocarne.setValue(null);
   txtRegistrosLista.setValue(null);
   txtUsuarioSistema.setValue(null);
 }
  /** Resets the init values from mem vars. <br> */
  private void doResetInitValues() {

    artNr.setValue(oldVar_artNr);
    artKurzbezeichnung.setValue(oldVar_artKurzbezeichnung);
    aupMenge.setValue(oldVar_aupMenge);
    aupEinzelwert.setValue(oldVar_aupEinzelwert);
    aupGesamtwert.setValue(oldVar_aupGesamtwert);
  }
  /**
   * Writes the bean data to the components.<br>
   *
   * @param anOrderposition Orderposition
   */
  public void doWriteBeanToComponents(Orderposition anOrderposition) {

    artNr.setValue(anOrderposition.getArticle().getArtNr());
    artKurzbezeichnung.setValue(anOrderposition.getArticle().getArtKurzbezeichnung());
    aupMenge.setValue(anOrderposition.getAupMenge());
    aupEinzelwert.setValue(anOrderposition.getAupEinzelwert());
    aupGesamtwert.setValue(anOrderposition.getAupGesamtwert());
  }
 public void buscarInformacionPrestador(Prestadores pre) {
   if (pre.getDireccion() != null) {
     tbxDirPres.setValue(pre.getDireccion());
   }
   if (pre.getTel_oficina() != null || pre.getTel_res() != null) {
     tbxTelePres.setValue(pre.getTel_res() + " - " + prestador.getTel_oficina());
   }
 }
Example #10
0
  /** Clears the components values. <br> */
  public void doClear() {

    // temporarely disable the validation to allow the field's clearing
    doRemoveValidation();

    rolShortdescription.setValue("");
    rolLongdescription.setValue("");
  }
  @Listen("onClick=#saveBtn")
  public void addCodeDb() {
    try {
      Map<String, String> map = new HashMap<String, String>();
      map = ZkUtils.getExecutionArgs();
      ErmCodeDb ermCodeDb = new ErmCodeDb();
      List<ErmCodeDb> codeDbList =
          ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService")).findAllCodeDb(webEmployee);
      String tempId = "OB";
      Long number = (long) codeDbList.size();
      number = number + 1;
      String dbId = tempId + RandomIDGenerator.fmtLong(number, 9);
      ermCodeDb.setDbId(dbId);
      aDbId = dbId;
      dbIdTxt.setValue(dbId);
      if (dbNameTxt.getValue() != null && !"".equals(dbNameTxt.getValue())) {
        ermCodeDb.setName(dbNameTxt.getValue());
      } else {
        ZkUtils.showExclamation(
            Labels.getLabel("webErwSource.nameZhTw") + " " + Labels.getLabel("cannottNull"),
            Labels.getLabel("warn"));
        dbNameTxt.focus();
        return;
      }
      if (resourcesIdTxt.getValue() != null) {
        ermCodeDb.setResourcesId(resourcesIdTxt.getValue());
      }
      ermCodeDb.setHistory("N");
      if (ezproxyRdo.getSelectedItem().getValue() != null) {
        ermCodeDb.setEzproxy(ezproxyRdo.getSelectedItem().getValue().toString());
      }
      if (urlTxt.getValue() != null && !"".equals(urlTxt.getValue())) {
        ermCodeDb.setUrl(urlTxt.getValue());
      }
      if (orderNoIbx.getValue() != null) {
        ermCodeDb.setOrderNo(orderNoIbx.getValue());
      }
      ermCodeDb.setIsDataEffid(1);
      ermCodeDb.setWebEmployee(webEmployee);
      ermCodeDb.setCreateDate(new Date());
      ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService")).saveCodeDb(ermCodeDb);

      ((WebSysLogService) SpringUtil.getBean("webSysLogService"))
          .insertLog(
              ZkUtils.getRemoteAddr(),
              ermCodeDb.getWebEmployee().getEmployeesn(),
              "codeDb_" + ermCodeDb.getDbId());
      ZkUtils.showInformation(Labels.getLabel("saveOK"), Labels.getLabel("info"));
      dbIdTxt.setValue(ermCodeDb.getDbId());
      addSuunitBtn.setDisabled(false);
      delSuunitBtn.setDisabled(false);
      String url = "ermCodeDb/ermCodeDb.zul";
      ZkUtils.refurbishMethod(url);

    } catch (WrongValueException e) {
      log.error("新增資料庫異常" + e);
    }
  }
 protected void limpiarCampos() {
   txtCodigo.setValue("");
   txtNombre.setValue("");
   buscadorCiudad.settearCampo(null);
   buscadorCategoria.settearCampo(null);
   buscadorEstado.settearCampo(null);
   buscadorVendedor.settearCampo(null);
   buscadorZona.settearCampo(null);
   clave = null;
 }
  /** cargamos los textboxs desde entity */
  private void loadDataFromEntity() {
    txtClaveUsuario.setValue(usuarioSelected.getContrasena());
    txtClaveUsuario2.setValue(usuarioSelected.getContrasena());
    txtNombreUsuario.setValue(usuarioSelected.getNombreCompleto());
    txtNumerocarne.setValue(usuarioSelected.getCodigoempleado());
    txtRegistrosLista.setValue(usuarioSelected.getRegistroslista());
    txtUsuarioSistema.setValue(usuarioSelected.getNombreCompleto());

    loadDataFromEntity();
    // checkEstadoUsuario.setChecked(usuarioSelected.getStatus());
  }
 public void buscarInformacionPaciente(Paciente paciente) {
   SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
   if (paciente.getTel_oficina() != null || paciente.getTel_res() != null) {
     tbxTelPac.setValue(paciente.getTel_oficina() + " " + paciente.getTel_res());
   }
   if (paciente.getFecha_nacimiento() != null) {
     tbxFecNac.setValue(dateFormat.format(paciente.getFecha_nacimiento()));
   }
   if (paciente.getDireccion() != null) {
     tbxDirPac.setValue(paciente.getDireccion());
   }
 }
  public void cargarDatosIniciales() throws Exception {
    Map parametros = Executions.getCurrent().getArg();
    admision_seleccionada = (Admision) parametros.get("admision_seleccionada");
    Long codigo_historia = null;
    Hisc_urgencia hu = new Hisc_urgencia();
    hu.setNro_ingreso(admision_seleccionada.getNro_ingreso());
    hu.setCodigo_empresa(admision_seleccionada.getCodigo_empresa());
    hu.setCodigo_sucursal(admision_seleccionada.getCodigo_sucursal());
    hu.setNro_identificacion(admision_seleccionada.getNro_identificacion());

    hu = getServiceLocator().getServicio(Hisc_urgenciaService.class).consultar(hu);
    if (hu != null) {
      codigo_historia = hu.getCodigo_historia();
    }

    Impresion_diagnostica impresion_diagnostica = new Impresion_diagnostica();
    impresion_diagnostica.setCodigo_historia(codigo_historia);
    impresion_diagnostica.setCodigo_sucursal(admision_seleccionada.getCodigo_sucursal());
    impresion_diagnostica.setCodigo_empresa(admision_seleccionada.getCodigo_empresa());

    impresion_diagnostica =
        getServiceLocator()
            .getServicio(Impresion_diagnosticaService.class)
            .consultar(impresion_diagnostica);

    // log.info("impresion_diagnostica>>>>>>>>>>>" + impresion_diagnostica);

    if (impresion_diagnostica != null) {
      tbxCie_p.setValue(impresion_diagnostica.getCie_relacionado1());
      tbxCie_1.setValue(impresion_diagnostica.getCie_relacionado2());
      tbxCie_2.setValue(impresion_diagnostica.getCie_relacionado3());
    }

    // loadComponents();
    onMostrarModuloOrdenamiento();

    Anexo3_entidad anexo3_entidad = new Anexo3_entidad();
    anexo3_entidad.setCodigo_empresa(codigo_empresa);
    anexo3_entidad.setCodigo_sucursal(codigo_sucursal);
    anexo3_entidad.setCodigo_paciente(admision_seleccionada.getNro_identificacion());
    anexo3_entidad.setNro_ingreso(admision_seleccionada.getNro_ingreso());
    //		anexo3_entidad.setCie_1(impresion_diagnostica.getCie_relacionado2());
    //		anexo3_entidad.setCie_2(impresion_diagnostica.getCie_relacionado3());
    //		anexo3_entidad.setCie_p(impresion_diagnostica.getCie_relacionado1());
    anexo3_entidad = getServiceLocator().getAnexo3EntidadService().consultar(anexo3_entidad);
    if (anexo3_entidad != null) {
      mostrarDatos(anexo3_entidad);
    } else {
      accionForm(true, "registrar");
    }

    inicializarCampos();
  }
Example #16
0
  /** Clears the components values. <br> */
  public void doClear() {

    // remove validation, if there are a save before
    doRemoveValidation();

    artNr.setValue("");
    artKurzbezeichnung.setValue("");
    bandbox_OrderPositionDialog_ArticleSearch.setValue("");
    aupMenge.setValue(new BigDecimal(0));
    aupEinzelwert.setValue(new BigDecimal(0));
    aupGesamtwert.setValue(new BigDecimal(0));
  }
  // Metodo para guardar la informacion //
  public void guardarDatos() throws Exception {
    try {
      // log.info("ejecutando metodo guardarDatos()");
      if (validarForm()) {
        FormularioUtil.setUpperCase(groupboxEditar);
        // Cargamos los componentes //

        Maestro_manual maestro_manual = new Maestro_manual();
        maestro_manual.setId_manual(
            (lgxId_manual.getValue() != null ? lgxId_manual.getValue() : 0L));
        maestro_manual.setCodigo_empresa(codigo_empresa);
        maestro_manual.setCodigo_sucursal(codigo_sucursal);
        maestro_manual.setManual(tbxManual.getValue());
        maestro_manual.setTipo_manual(lbxTipo_manual.getSelectedItem().getValue().toString());
        maestro_manual.setTipo_moneda(lbxTipo_moneda.getSelectedItem().getValue().toString());
        maestro_manual.setCreacion_date(new Timestamp(new GregorianCalendar().getTimeInMillis()));
        maestro_manual.setCreacion_user(usuarios.getCodigo().toString());
        Map<String, Object> mapa_datos = new HashMap<String, Object>();
        mapa_datos.put("maestro_manual", maestro_manual);
        mapa_datos.put("accion", tbxAccion.getValue());
        mapa_datos.put("mapa_datos_procedimientos", mapa_datos_procedimientos);
        maestro_manualService.guardarDatos(mapa_datos);
        tbxAccion.setValue("modificar");
        mostrarDatos(maestro_manual);
        MensajesUtil.mensajeInformacion(
            "Informacion ..", "Los datos se guardaron satisfactoriamente");
      }

    } catch (Exception e) {
      MensajesUtil.mensajeError(e, "", this);
    }
  }
 private void cargarDatosIniciales() {
   logger.log(Level.INFO, "[TipoAbonoMttoCtrl][cargarDatosIniciales]");
   Boolean checked;
   Boolean optTodo = Boolean.FALSE;
   Boolean optClave = Boolean.FALSE;
   try {
     if (tipoAbonoSelected != null) {
       txtDescripcionTipoAbono.setValue(tipoAbonoSelected.getDescripcionTipoAbono());
       checked =
           (accion != null && accion == Constants.ACCION_MANTTO_NEW)
               ? Boolean.TRUE
               : (tipoAbonoSelected.getEstadoRegistro() != null
                   ? tipoAbonoSelected.getEstadoRegistro()
                   : Boolean.FALSE);
       checkEstadoTipoAbono.setChecked(checked);
     }
     optTodo =
         (accion != null && accion == Constants.ACCION_MANTTO_VER) ? Boolean.TRUE : Boolean.FALSE;
     optClave =
         (accion != null && accion == Constants.ACCION_MANTTO_NEW) ? Boolean.FALSE : Boolean.TRUE;
     txtDescripcionTipoAbono.setDisabled(optTodo);
     checkEstadoTipoAbono.setDisabled(optTodo);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 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$btnBuscar() {
   if (txtHm.getValue().isEmpty()) {
     MensajeEmergente.mostrar("NOFINDED", asignarFocusBuscar);
   } else {
     paciente = servicioPaciente.buscarUno(txtHm.getValue(), 'A');
     veterinario = usuario.getPersona().getVeterinario();
     if (paciente == null) {
       MensajeEmergente.mostrar("NOTFOUND", asignarFocusBuscar);
     } else {
       txtHm.setDisabled(true);
       txtNombrePaciente.setValue(paciente.getNombre());
       txtRaza.setValue(paciente.getRaza().getNombre());
       txtEspecie.setValue(paciente.getRaza().getEspecie().getNombre());
       txtSexo.setValue(paciente.getSexo().getNombre());
       txtNombreResponsable.setValue(
           paciente.getResponsable().getPersona().getNombre()
               + " "
               + paciente.getResponsable().getPersona().getApellido());
       txtCi.setValue(String.valueOf(paciente.getResponsable().getCedula()));
       txtEdad.setValue(HelperDateAge.age(paciente.getFechaNac(), ' '));
       visibilidadSecciones(true, true, true);
       cargar();
       actividadBotones(false, false, true, false, false, false);
     }
   }
 }
 @ZkEvent(id = "taskList", event = Events.ON_SELECT)
 public void select() {
   StringBuilder selectedText = new StringBuilder();
   for (Task selectedTask : listCtl.getSelectedItems()) {
     selectedText.append(selectedTask.getName());
     selectedText.append(", ");
   }
   textboxSelected.setValue(selectedText.toString());
 }
Example #22
0
 @Listen("onClick = #btnVer")
 public void seleccionarItemLista() {
   if (ltbPedidos.getItemCount() != 0) {
     if (ltbPedidos.getSelectedItems().size() == 1) {
       Listitem listItem = ltbPedidos.getSelectedItem();
       TabDetalles modelo = listItem.getValue();
       spnImporte.setValue(modelo.getImpNot());
       txtConcepto.setValue(modelo.getConNot());
       txtReferencia.setValue(modelo.getRefNot());
       ltbPedidos.removeItemAt(listItem.getIndex());
       listaDetalle.remove(modelo);
       ltbPedidos.renderAll();
       Double cantidad = txtTotal.getValue();
       if (cantidad == null) cantidad = (double) 0;
       txtTotal.setValue(cantidad - modelo.getImpNot());
     } else msj.mensajeAlerta(Mensaje.editarSoloUno);
   } else msj.mensajeAlerta(Mensaje.noHayRegistros);
 }
Example #23
0
  public void onClick$delete() {

    if (signList.getSelectedItem() == null) {
      MessageBox.showWarning("请选择删除项!");
    } else {
      WKTHtmlSign sign = (WKTHtmlSign) signList.getSelectedItem().getValue();
      WKTHtmlSign wHtmlSign = signService.findBySignValue(sign.getKsValue().trim());
      if (wHtmlSign.equals("")) {
        WKTHtmlSign sign2;
        for (int i = 0; i < sList.size(); i++) {
          sign2 = sList.get(i);
          if (sign.getKsName().equals(sign2.getKsName())) {
            try {
              if (Messagebox.show(
                      "确定删除标记信息?", "提示信息", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION)
                  == Messagebox.YES) {
                sList.remove(i);
                signValue.setValue("");
                signName.setValue("");
                loadSignList();
              }
            } catch (InterruptedException e) {
              e.printStackTrace();
            }
          }
        }
      } else {
        try {
          if (Messagebox.show(
                  "确定删除标记信息?", "提示信息", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION)
              == Messagebox.YES) {
            signService.delete(sign);
            signValue.setValue("");
            signName.setValue("");
            Init();
          }
        } catch (InterruptedException e) {
          e.printStackTrace();
        }
      } // else
    }
  }
  public void obtenerAdmision(Admision admision) {
    Paciente paciente = admision.getPaciente();
    tbxIdentificacion.setValue(admision.getNro_identificacion());
    tbxNombres_y_apellidos.setValue(paciente.getNombreCompleto());
    tbxTipo_identidad.setValue(paciente.getTipo_identificacion());

    tbxAseguradora.setValue(admision.getCodigo_administradora());
    // log.info("PACIENTE"+paciente);
    // log.info("ADMINISTRADORA"+admision.getCodigo_empresa()+" "+admision.getCodigo_sucursal()+"
    // "+paciente.getCodigo_administradora());

    Administradora administradora = new Administradora();
    administradora.setCodigo_empresa(admision.getCodigo_empresa());
    administradora.setCodigo_sucursal(admision.getCodigo_sucursal());
    administradora.setCodigo(admision.getCodigo_administradora());
    administradora = getServiceLocator().getAdministradoraService().consultar(administradora);
    // log.info("administradora"+administradora);

    tbxNombre_aseguradora.setValue(administradora.getNombre());
  }
  // Accion del formulario si es nuevo o consultar //
  public void accionForm(boolean sw, String accion) throws Exception {
    groupboxConsulta.setVisible(!sw);
    groupboxEditar.setVisible(sw);

    if (!accion.equalsIgnoreCase("registrar")) {
      buscarDatos();
    } else {
      // buscarDatos();
      limpiarDatos();
    }
    tbxAccion.setValue(accion);
  }
Example #26
0
  /**
   * when doubleClick on a item in the bandbox search list.<br>
   * <br>
   * Select the customer and search all orders for him.
   *
   * @param event
   */
  public void onDoubleClickedArticleItem(Event event) {
    // logger.debug(event.toString());

    // get the customer
    Listitem item = this.listBoxArticleSearch.getSelectedItem();
    if (item != null) {

      // get and cast the selected object
      setArticle((Article) item.getAttribute("data"));

      artNr.setValue(article.getArtNr());
      artKurzbezeichnung.setValue(article.getArtKurzbezeichnung());
      aupEinzelwert.setValue(article.getArtPreis());
    }

    // clear old stuff at end, because the NO EMPTY validation
    aupMenge.setValue(new BigDecimal(0));
    aupGesamtwert.setValue(new BigDecimal(0));

    // close the bandbox
    bandbox_OrderPositionDialog_ArticleSearch.close();
  }
Example #27
0
 private void onNameChanged(InputEvent e) {
   String value = e.getValue();
   Textbox box = (Textbox) e.getTarget();
   String lastName, firstName;
   if (box == lastNameBox) {
     lastName = value;
     firstName = firstNameBox.getValue();
   } else {
     lastName = lastNameBox.getValue();
     firstName = value;
   }
   labelBox.setValue(lastName + ", " + firstName);
 }
Example #28
0
 /// Search Data and add to array
 @Listen("onClick = #btnsave")
 public void btnsave_Clicked(Event event) {
   int a = 0, bc = 0, closs = 0;
   for (Store e : Store.findAllStores()) {
     Textbox txtid = (Textbox) find(getPage(), "#idproduct").get(0);
     if ((Integer.parseInt(txtid.getText())) == e.getIdproduct()) {
       checksamesell(e.getNameproduct());
       if (checksame == true) {
         int oldqty = qty.get(posarray);
         int modernqty = oldqty + Integer.parseInt(idqty.getValue());
         qty.remove(posarray);
         qty.add(posarray, modernqty);
         int medernprice = e.getPrice() * modernqty;
         price.remove(posarray);
         price.add(posarray, medernprice);
         checksame = false;
         break;
       } else {
         idpro.add(Integer.parseInt(idproduct.getValue()));
         nameproduct.add(e.getNameproduct());
         qty.add(Integer.parseInt(idqty.getValue()));
         unitprice.add(e.getPrice());
         bc = e.getPrice();
         a = Integer.parseInt(idqty.getValue());
         closs = a * bc;
         price.add(closs);
         namecus.add((String) Sessions.getCurrent().getAttribute("name"));
         pointcount++;
         break;
       }
     }
   }
   Textbox txtid = (Textbox) find(getPage(), "#idproduct").get(0);
   Textbox txtqty = (Textbox) find(getPage(), "#idqty").get(0);
   txtid.setValue(null);
   txtqty.setValue(null);
   showgrid();
 }
  @Listen("onSeleccion = #divCatalogoF0004")
  public void seleccion() {
    F0004 f0004 = catalogoF0004.objetoSeleccionadoDelCatalogo();

    switch (idBoton) {
      case "btnBuscarF0004":
        txtSYF0005.setValue(f0004.getId().getDtsy());
        txtRTF0005.setValue(f0004.getId().getDtrt());
        lblDescripcionF0004.setValue(
            servicioF0004.buscar(f0004.getId().getDtsy(), f0004.getId().getDtrt()).getDtdl01());
        break;
      case "btnBuscarF0004Filtro":
        lblSY.setValue(f0004.getId().getDtsy());
        lblRT.setValue(f0004.getId().getDtrt());
        lblF0004.setValue(f0004.getDtdl01());
        catalogo.actualizarLista(
            servicioF0005.buscarParaUDCOrdenados(f0004.getId().getDtsy(), f0004.getId().getDtrt()));
        break;
      default:
        break;
    }
    catalogoF0004.setParent(null);
  }
 public void limpiarCampos() {
   clave = null;
   txtDL01F0005.setValue("");
   txtSPHDF0005.setValue("");
   txtHRDCF0005.setValue("");
   txtRTF0005.setValue("");
   txtSYF0005.setValue("");
   txtDL02F0005.setValue("");
   txtKYF0005.setValue("");
   txtSYF0005.setFocus(true);
   lblDescripcionF0004.setValue("");
   catalogo.limpiarSeleccion();
   btnBuscarF0004.setVisible(true);
 }