Package sn.unitech.stock.entity

Examples of sn.unitech.stock.entity.Events


  }

  @Override
  public Resultat saveEvents(List<DetailEvent> listDetailEvent,
      List<Taxes> listTaxe) {
    Events events=listDetailEvent.get(0).getEvents();
    EntityManager em=getEntityManager();
    EntityTransaction tx=em.getTransaction();
    tx.begin();
    try{
    this.persist(events, em);
    for(int i=0;i<listDetailEvent.size();i++){
      listDetailEvent.get(i).setEvents(events);
      listDetailEvent.get(i).setId(new DetailEventId(events.getIdLot(),i));
      this.persist(listDetailEvent.get(i), em);
    }
    new SysEcritsDao(listDetailEvent,listTaxe,em).persistAllEcrits();
    tx.commit();
    return new Resultat(true,"Validation effectuee avec succes.",events.getIdLot());
    }catch(Exception e){
      e.printStackTrace();
      tx.rollback();
      return new Resultat(false,"Erreur fatale: "+e.getMessage());
    }finally{
View Full Code Here


        SysProduit sysProduit=new SysProduit();
        sysProduit.setCompte(new Compte());
        sysProduit.getCompte().setIdCompte("1");
        stock.setSysProduit(sysProduit);
        detailEvent.setStock(stock);
        detailEvent.setEvents(new Events());
        detailEvent.getEvents().setMntTot(new Double(100000));
        detailEvent.setPrixTot(new Double(40000));
        SysUsers sysUsers=new SysUsers();
        sysUsers.setCompte(new Compte());
        sysUsers.getCompte().setIdCompte("2");
View Full Code Here

      SysProduit sysProduit=new SysProduit();
      sysProduit.setCompte(new Compte());
      sysProduit.getCompte().setIdCompte("1");
      stock.setSysProduit(sysProduit);
      detailEvent.setStock(stock);
      detailEvent.setEvents(new Events());
      detailEvent.getEvents().setMntNet(new Double(100000));
      detailEvent.setPrixTot(new Double(40000));
      SysUsers sysUsers=new SysUsers();
      sysUsers.setCompte(new Compte());
      sysUsers.getCompte().setIdCompte("2");
View Full Code Here

      Resultat result;
      result=this.eventsM.saveEvents(listDetailEvent, this.citems.listTaxesEtValues);
      this.cmessages.saveMessage=result.getMessage();
      if(result.isSucceed()){
        ToolsBean.getToolsBean().setAttribute(this.cproperties.paramIdLot,result.getId());
        this.events=new Events();
        this.getModelProduitsEvents().clear();
      }
    }
    else{
      this.citems.dataProduitsEvents.setRowIndex(listDetailEvent.size());
View Full Code Here

      this.citems.dataListEvents.setRowIndex(this.cproperties.getLastIndex());
      this.citems.dataListEvents.getRowData().setListDetailEvent(null);
      this.citems.dataListEvents.getRowData().setLabelDetail(ToolsBean.lblDetail);
    }
    this.citems.dataListEvents.setRowIndex(currentIndex);
    Events events=this.citems.dataListEvents.getRowData();
    if(events.getLabelDetail().equals(ToolsBean.lblFermer)){
      events.setListDetailEvent(null);
      events.setLabelDetail(ToolsBean.lblDetail);
    }   
    else{
      this.cproperties.idEvent=events.getIdLot();
      events.setListDetailEvent(this.citems.getListDetailEvent());
      if((events.getListDetailEvent()!=null)&&(events.getListDetailEvent().size()>0))
        events.setLabelDetail(ToolsBean.lblFermer);
    }
    this.cproperties.setLastIndex(currentIndex);
  }
View Full Code Here

    }
    this.cproperties.setLastIndex(currentIndex);
  }
 
  public void detailEcritures(){
    Events events=this.citems.dataListEvents.getRowData();
    this.cproperties.idNumop=events.getIdLot();
  }
View Full Code Here

TOP

Related Classes of sn.unitech.stock.entity.Events

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.