Examples of Tenencia


Examples of com.vaadin.demo.domain.Tenencia

  }

  @Override
  protected void pressOk() {
    Operacion operacion = new Operacion();
    Tenencia tenencia = Tenencia.getTenencia(especie.getEspecie());
    if (tenencia == null){
      tenencia = new Tenencia();
      tenencia.setEliminado(false);
      tenencia.setEspecie(especie.getEspecie());
      tenencia.setUsuario(UsuarioDetalle.getCurrentUser().getUsuario());
      try {
        HibernateUtil.saveEntity(tenencia);
      } catch (Exception e) {
        Notification.show(e.getMessage(),Type.HUMANIZED_MESSAGE);
      }
      tenencia = Tenencia.getTenencia(especie.getEspecie());
    }
    operacion.setTenencia(tenencia.getTenencia());
    operacion.setFecha(new Date());
    Double nominal = Cotizacion.getCotizacion(especie.getEspecie());
    operacion.setValor((Double.parseDouble(txtMonto.getValue())/nominal)*100);
    try{
      HibernateUtil.saveEntity(operacion);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.