Examples of DepositoDTO


Examples of fing.satode.data.DepositoDTO

  public void setCiudad(Ciudad ciudad) {
    this.ciudad = ciudad;
  }
  public DepositoDTO getDTO() {
    DepositoDTO dto= new DepositoDTO();
    dto.setId(id);
    dto.setDireccion(direccion);
    dto.setTelefono(telefono);
    dto.setMail(mail);
    dto.setArea2(area2);
    dto.setArea3(area3);
    dto.setCiudad(ciudad.getDTO());
    dto.setDepartamento(departamento.getDTO());
    dto.setResponsable(responsable);
    return dto;
  }
View Full Code Here

Examples of fing.satode.data.DepositoDTO

        area2.addKeyboardListener(new KeyNumeric());
        area3.addKeyboardListener(new KeyNumeric());
       
        if (a == "modificar" || a == "eliminar" ){
         
          DepositoDTO depositoDTO= null;
          for(DepositoDTO d:depositoGlobal){
            if(d.getId().equals(id)){
              depositoDTO=d;
            }
          }
         
         
          direccion.setText(depositoDTO.getDireccion());
          telefono.setText(depositoDTO.getTelefono());
          mail.setText(depositoDTO.getMail());
          area2.setText(String.valueOf(depositoDTO.getArea2()));
          area3.setText(String.valueOf(depositoDTO.getArea3()));
          responsable.setText(depositoDTO.getResponsable());
         
          int row=0;
          for(DepartamentoDTO d:departamentosGlobal){
            row++;
            if(d.getId().equals(depositoDTO.getDepartamento().getId())){
              departamentos.setSelectedIndex(row);
              ciudades.clear();
              ciudades.addItem("Seleccionar","0");
              int row2=1;
            for(CiudadDTO c:d.getCiudades()){
              ciudades.addItem(c.getNombre(),c.getId().toString());
              if(c.getId().equals(depositoDTO.getCiudad().getId())){
                ciudades.setSelectedIndex(row2);
              }
              row2++;
            }
            }
View Full Code Here

Examples of fing.satode.data.DepositoDTO

      add(panelPrincipal);
      center();
    }

    protected void procesar() {
      DepositoDTO dto=validar();
      if(dto!=null){
        dto.setId(id);
        if(a=="modificar"){
         
          IDepositoAsync servidorDeposito=GWT.create(IDeposito.class);
         
          servidorDeposito.modificarDeposito(dto,new AsyncCallback<Void>() {
View Full Code Here

Examples of fing.satode.data.DepositoDTO

        }
      }
    }

    private DepositoDTO validar() {
      DepositoDTO dto= new DepositoDTO();
     
      if(responsable.getText().trim().length()==0){
        Window.alert("Indique responsable");
        return null;
      }
      dto.setResponsable(responsable.getText());
     
      if(departamentos.getSelectedIndex()<1){
        Window.alert("Indique departamento");
        return null;
      }
     
      Long idDep=Long.valueOf(departamentos.getValue(departamentos.getSelectedIndex()));
      for(DepartamentoDTO d:departamentosGlobal){
        if(idDep.equals(d.getId())){
          dto.setDepartamento(d);
        }
      }
     
      if(ciudades.getSelectedIndex()<1){
        Window.alert("Indique ciudad");
        return null;
      }
     
      Long idCiu=Long.valueOf(ciudades.getValue(ciudades.getSelectedIndex()));
      for(CiudadDTO c:dto.getDepartamento().getCiudades()){
        if(idCiu.equals(c.getId())){
          dto.setCiudad(c);
        }
      }
     
      if(direccion.getText().trim().length()==0){
        Window.alert("Indique Direccion");
        return null;
      }
      dto.setDireccion(direccion.getText());
     
      if(telefono.getText().trim().length()==0){
        Window.alert("Indique Telefono");
        return null;
      }
      dto.setTelefono(telefono.getText());
     
      if(mail.getText().trim().length()==0){
        Window.alert("Indique Mail");
        return null;
      }     
      dto.setMail(mail.getText());
     
      if(area2.getText().trim().length()==0){
        Window.alert("Indique Area en m\u00B2");
        return null;
     
      dto.setArea2(getFloat(area2.getText()));
     
      if(area3.getText().trim().length()==0){
        Window.alert("Indique Area en m\u00B3");
        return null;
      }
      dto.setArea3(getFloat(area3.getText()));
     
      return dto;
     
    }
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.