Package fing.satode.data

Examples of fing.satode.data.DesastreDTO


      if(a=="modificar") panelPrincipal.setCaptionText("Modificar Desastre");
      if(a=="eliminar") panelPrincipal.setCaptionText("Eliminar Desastre");
      if(a=="nuevo") panelPrincipal.setCaptionText("Nuevo Desastre");
     
      if(a=="modificar" ||a=="eliminar"){
        DesastreDTO dto=null;
        for(DesastreDTO d:desastreGlobal){
          if(id.equals(d.getId())){
            dto=d;
            break;
          }
        }
       
        datePicker.setValue(dto.getFechaDeclaracion(), true);
        row=1;
        for(EventoDTO e:eventosGlobal){
          if(e.getId().equals(dto.getEvento().getId())){
            RadioButton radio=(RadioButton) gridEventos.getWidget(row, 0);
            radio.setValue(true);
            break;
          }
          row++;
View Full Code Here


      center();
    }

    protected void procesar() {
      // TODO Auto-generated method stub
      DesastreDTO dto=validar();
      if(dto!=null){
        dto.setId(id);
        if(a=="modificar"){
         
          IDesastreAsync servidorDesastre=GWT.create(IDesastre.class);
         
          servidorDesastre.modificarDesastre(dto,new AsyncCallback<Void>() {
View Full Code Here

      }
    }

    private DesastreDTO validar() {
      // TODO Auto-generated method stub
      DesastreDTO dto= new DesastreDTO();
     
      dto.setFechaDeclaracion(datePicker.getValue()==null?new Date():datePicker.getValue());
      boolean salir=false;
      for(int i=1; i<eventosGlobal.size()+1 && !salir;i++){
        Long idEvento=Long.valueOf(((Label)gridEventos.getWidget(i, 1)).getText());
        RadioButton radio= (RadioButton) gridEventos.getWidget(i, 0);
        if(radio.getValue()){
          for(EventoDTO e: eventosGlobal){
            if(e.getId().equals(idEvento)){
              dto.setEvento(e);
              salir=true;
            }
          }
        }
      }
      if(!salir){
        Window.alert("Indique evento");
        return null;
      }
      dto.setUsuario(usuarioGlobal);
     
      return dto;
     
    }
View Full Code Here

  public void setEvento(Evento evento) {
    this.evento = evento;
  }

  public DesastreDTO getDTO() {
    DesastreDTO dto= new DesastreDTO();
    dto.setId(id);
    dto.setUsuario(usuario.getDTO());
    dto.setEvento(evento.getDTO());
    dto.setFechaDeclaracion(fechaDeclaracion);
    return dto;
  }
View Full Code Here

TOP

Related Classes of fing.satode.data.DesastreDTO

Copyright © 2018 www.massapicom. 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.