Example #1
0
 public Beans_InstructWO() {
   listeInstructWOItem = new ArrayList<SelectItem>();
   List<InstructWO> instructWO = new DAO.DAO_InstructWo().GET_ALL();
   for (InstructWO inst : instructWO) {
     listeInstructWOItem.add(new SelectItem(inst.getId_WO()));
   }
 }
Example #2
0
  public String AddInstructWO() throws Exception {
    InstructWO instruct = new InstructWO();
    instruct.setId_instructWO(getId_instructWO());
    instruct.setPos(getPos());
    instruct.setDesignation(getDesignation());
    instruct.setId_WO(getId_WO());

    int add = new DAO.DAO_InstructWo().CREATE(instruct);
    if (add != 0) {
      addMessage(
          new FacesMessage(
              FacesMessage.SEVERITY_INFO,
              "Information : ",
              "L'Instruction du Work Order a bien été ajouté!"));
      return "listInstructWO";
    } else {
      addMessage(new FacesMessage(FacesMessage.SEVERITY_INFO, "Enregistrement fail!!!", null));
      return "";
    }
  }