Package sn.unitech.stock.entity

Examples of sn.unitech.stock.entity.SysUsers


        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");
        sysUsers.setId(new SysUsersId());
        sysUsers.getId().setIdAdherent("1");
        detailEvent.getEvents().setSysUsers(sysUsers);
        detailEvent.getEvents().setSysEvents(new SysEvents());
        detailEvent.getEvents().getSysEvents().setIdEvent("VT");
        listDetailEvent.add(detailEvent);
        //SysEcritsDao sysEcritsDao=new SysEcritsDao(listDetailEvent,null,null);
View Full Code Here


private static final String NAV_WELCOME = "/welcome";
private static final String NAV_REDIRECT = "?faces-redirect=true";
private static final String NAV_DECONNEXION="/stock/connexion/connexion.unit";

  public ConnexionBean() {
    user=new SysUsers(new SysUsersId());
    user.getId().setIdAdherent("1");
    FacesContext context = FacesContext.getCurrentInstance();
    Collection<Locale> list=new ArrayList<Locale>();
    list.add(Locale.FRENCH);
    list.add(Locale.ENGLISH);
View Full Code Here

    context.getApplication().setMessageBundle("messages");
  }

 
  public String connexion() throws IllegalArgumentException, IllegalAccessException{
    SysUsers sysUsers;
    if((sysUsers=this.iconnexionM.findUser(user))!=null){
      this.user=sysUsers;
      this.cproperties.setMessage("");
        cproperties.setLogged(iconnexionM.connexion(user,cproperties.getPassword()));
      if(!cproperties.isLogged()){
View Full Code Here

      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");
      sysUsers.setId(new SysUsersId());
      sysUsers.getId().setIdAdherent("1");
      detailEvent.getEvents().setSysUsers(sysUsers);
      detailEvent.getEvents().setSysEvents(new SysEvents());
      detailEvent.getEvents().getSysEvents().setIdEvent("VT");
      listDetailEvent.add(detailEvent);
      SysEcritsDao sysEcritsDao=new SysEcritsDao(listDetailEvent,new ArrayList(),null);
View Full Code Here

    try{
    tx.begin();
    DetailCommand detailCommand=new DetailCommand();
    detailCommand= listDetailCommand.get(0);
    commande.setFournisseur( new Fournisseur(detailCommand.getCodFourn()));
    SysUsers sysUsers=new SysUsers();
    sysUsers.setId(new SysUsersId(detailCommand.getCodUser(),detailCommand.getSysProduit().getSysAdherent().getIdAdherent()));
    commande.setSysDate(new Date());
    commande.setSysUsers(sysUsers);
    this.persist(commande, em);
    for(int i=0;i<listDetailCommand.size();i++){
        detailCommand=new DetailCommand();
View Full Code Here

    this.getModelMenu().clear();
    this.getModelMenu().addAll(mapMenu.values());
  }
 
  public void clickAnnuler(ActionEvent e){
    this.sysUsers=new SysUsers(new SysUsersId("",""));
    this.cmessages.saveMessage="";
  }
View Full Code Here

  public Resultat updateUser(List<SysMenu> listMenu,SysUsers user){
    try{
    EntityManager em=this.getEntityManager();
    EntityTransaction tx=em.getTransaction();
    tx.begin();
    SysUsers sysUsers;
    Object obj=this.find(SysUsers.class, user.getId(), em);
    if(obj==null){
      user.setSysAdherent(em.find(SysAdherent.class, user.getId().getIdAdherent()));
      user.setPasswd(ToolsDao.getToolsDao().encodePassword(user.getId().getIdUser()));
      user.setSysDatcre(new java.util.Date());
      sysUsers=user;
      persist(user, em);
      this.persist(sysUsers, em);
    }
    else{
      sysUsers=(SysUsers) obj;
      sysUsers.setNom(user.getNom());
      sysUsers.setPrenom(user.getPrenom());
      sysUsers.setIsActiv(user.getIsActiv());
      persist(sysUsers,em);
    }
    for(SysMenu menu:listMenu){
      SysAccessUserId sysAccessUserId = new SysAccessUserId();
      sysAccessUserId.setIdAdherent(user.getId().getIdAdherent());
View Full Code Here

TOP

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

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.