Examples of Choix


Examples of org.xrace.model.Choix

    {
      private static final long serialVersionUID = 1L;

      public Page getPage()
      {
        final Choix choix = new Choix();
        choix.setPrix(0.0);
        return new ArticleUpdatePage(choix);
      }

      public Class getPageIdentity()
      {
View Full Code Here

Examples of org.xrace.model.Choix

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final Choix choix = (Choix) item.getModelObject();

    item.add(new Label("description", choix.getDescription()));
    item.add(new Label("prix", choix.getPrix().toString()));

    if (choix.getImage() != null)
    {

      BlobImage rscBlob = new BlobImage(choix.getImage(), imageService);
      Image img = new Image("image", rscBlob);

      item.add(img);
    }
    else
    {

      Image img = new Image("image");
      img.setVisible(false);
      item.add(img);

    }

    if (choix.isTextField())
    {
      item.add(new Label("textField", "Oui"));
    }
    else
    {
      item.add(new Label("textField", "Non"));
    }

    if (choix.isAfficherAvis1())
    {
      item.add(new Label("afficherAvis", "Oui"));
    }
    else
    {
      item.add(new Label("afficherAvis", "Non"));
    }

    if (choix.isAfficherQuestion1())
    {
      item.add(new Label("afficherQuestion1", "Oui"));
    }
    else
    {
      item.add(new Label("afficherQuestion1", "Non"));
    }

    if (choix.isAfficherQuestion2())
    {
      item.add(new Label("afficherQuestion2", "Oui"));
    }
    else
    {
      item.add(new Label("afficherQuestion2", "Non"));
    }

    if (choix.isInactif())
    {
      item.add(new Label("inactif", "Oui"));
    }
    else
    {
View Full Code Here

Examples of org.xrace.model.Choix

      }
    });

    int qteTotalChoix = 0;
    double prixTotalChoix = 0;
    Choix choixCourant = null;

    for (final DossierArticle dossier : dossiers)
    {
      if (choixCourant == null)
      {
        choixCourant = dossier.getArticle().getChoix();
      }
      else
      {
        if (!choixCourant.equals(dossier.getArticle().getChoix()))
        {
          createLigneTotal(wb, sheet, ++i, qteTotalChoix,
              prixTotalChoix);

          prixTotalChoix = 0;
          qteTotalChoix = 0;
          choixCourant = dossier.getArticle().getChoix();
        }
      }

      row = sheet.createRow((short) ++i);

      // --------- Informations sur la personne inscrite -------
      final Personne personneInscrite = dossier.getPersonneInscrite();
      row.createCell((short) 0).setCellValue(personneInscrite.getId());
      row.createCell((short) 1).setCellValue(
          new HSSFRichTextString(personneInscrite.getNom()));
      row.createCell((short) 2).setCellValue(
          new HSSFRichTextString(personneInscrite.getPrenom()));

      // --------- Informations sur l'article -------
      final Article article = dossier.getArticle();
      final Choix choix = article.getChoix();

      // --------- Information sur la facture et la transaction -------
      final Facture facture = dossier.getFacture();
      final FactureItem factureItem = dossier.getFactureItem();
      final Transaction transaction = dossier.getTransaction();

      // --------- Personne qui a effectué la transaction -------
      final Personne personneTransaction = dossier
          .getPersonneTransaction();

      row.createCell((short) 3).setCellValue(
          new HSSFRichTextString(choix.getDescription()));
      row.createCell((short) 4).setCellValue(
          new HSSFRichTextString(article.getTextFieldValue()));
      if (factureItem != null)
      {
        HSSFUtils.createCurrencyCell(wb, row, 5, factureItem.getPrix());
View Full Code Here

Examples of org.xrace.model.Choix

    row.createCell((short) 4).setCellValue(
        new HSSFRichTextString("Date Transaction"));

    for (Map.Entry<Choix, Integer> entry : mapChoixIndex.entrySet())
    {
      Choix choix = entry.getKey();
      int indexArticle = entry.getValue().intValue()
          * NB_COLONNES_ARTICLE + IND_PART_ARTICLE_INDEX;
      row.createCell((short) (indexArticle + IND_QTE)).setCellValue(
          new HSSFRichTextString(choix.getDescription()));
      row.createCell((short) (indexArticle + IND_PRIX_UNITAIRE))
          .setCellValue(
              new HSSFRichTextString("Tarif"
                  + (entry.getValue().intValue() + 1)));
      row.createCell((short) (indexArticle + IND_PRIX_TOTAL))
          .setCellValue(
              new HSSFRichTextString("S.Total"
                  + (entry.getValue().intValue() + 1)));
    }

    row.createCell((short) indexDerniereCol).setCellValue(
        new HSSFRichTextString("Total"));

    HSSFUtils.applyStyle(row, style);

    // --------- Liste des inscrits -------
    int i = 3;
    List<DossierArticleParPersonne> dossiers = articleService
        .generateDossiersArticleParPersonne(evenement);

    for (final DossierArticleParPersonne dossier : dossiers)
    {
      row = sheet.createRow((short) ++i);

      // --------- Informations sur la personne inscrite -------
      final Personne personneInscrite = dossier.getPersonneInscrite();
      final Transaction transaction = dossier.getLatestTransaction();
      row.createCell((short) 0).setCellValue(personneInscrite.getId());
      row.createCell((short) 1).setCellValue(
          new HSSFRichTextString(personneInscrite.getNom()));
      row.createCell((short) 2).setCellValue(
          new HSSFRichTextString(personneInscrite.getPrenom()));
      if (transaction != null)
      {
        row.createCell((short) 3).setCellValue(
            new HSSFRichTextString(transaction.getPersonne()
                .getNomPrenom()));
        HSSFUtils.createDateTimeCell(wb, row, 4, transaction
            .getDateCreated());
      }

      for (Map.Entry<Choix, Integer> entry : mapChoixIndex.entrySet())
      {
        Choix choix = entry.getKey();
        short index = (short) (entry.getValue().intValue()
            * NB_COLONNES_ARTICLE + IND_PART_ARTICLE_INDEX);

        if (dossier.getQte(choix) > 0)
        {
          row.createCell((short) (index + IND_QTE)).setCellValue(
              dossier.getQte(choix));
        }
        HSSFUtils.createCurrencyCell(wb, row,
            index + IND_PRIX_UNITAIRE, choix.getPrix());
        HSSFUtils.createCurrencyCell(wb, row, index + IND_PRIX_TOTAL,
            dossier.getTotalChoix(choix));
      }

      HSSFUtils.createCurrencyCell(wb, row, indexDerniereCol, dossier
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.