Ejemplo n.º 1
0
 private void doCheckRights() {
   UserWorkspace workspace = getUserWorkspace();
   //        String role = getUserWorkspace().getUserSession().getEmployeeRole();
   //        if (((getUserWorkspace().getUserSession().getOrganizationid() == 1176)
   //                || (getUserWorkspace().getUserSession().getOrganizationid() == 1413))
   //                &&
   // ((getUserWorkspace().getUserSession().getJobPositionCode().equals("Assistant Manager"))
   //                ||
   // (getUserWorkspace().getUserSession().getJobPositionCode().equals("Analyst"))
   //                || (getUserWorkspace().getUserSession().getJobPositionCode().equals("POH
   // Assistant Manager")))) {
   if (getUserWorkspace().getUserSession().getEmployeeRole().contains(1532)) {
     label_prioritas.setVisible(true);
     radiogroup_Prioritas.setVisible(true);
     label_dampak.setVisible(true);
     radiogroup_Dampak.setVisible(true);
     label_pelaksana.setVisible(true);
     listbox_NamaPelaksana.setVisible(true);
     label_target.setVisible(true);
     intbox_target.setVisible(true);
     label_hari.setVisible(true);
   } else {
     label_prioritas.setVisible(false);
     radiogroup_Prioritas.setVisible(false);
     label_dampak.setVisible(false);
     radiogroup_Dampak.setVisible(false);
     label_pelaksana.setVisible(false);
     listbox_NamaPelaksana.setVisible(false);
     label_target.setVisible(false);
     intbox_target.setVisible(false);
     label_hari.setVisible(false);
   }
 }
Ejemplo n.º 2
0
  public void onClick$voltarPaginaListaFrequencia(Event e) {

    for (Intbox i : intbox) {
      i.setId(null);
      i.setVisible(false);
    }

    for (Row r : rowss) {
      r.setId(null);
      r.setVisible(false);
    }

    rowss.clear();
    rowss = new ArrayList<Row>();

    intbox.clear();
    intbox = new ArrayList<Intbox>();

    ListagemDisciplina.setSelectedItem(null);
    ListagemAluno.getItems().clear();

    janelaDisciplinaAluno.setVisible(false);
    JanelaFiltroParaListarDisciplina.setVisible(true);
    binder.loadComponent(indexFrequencia);
  }
Ejemplo n.º 3
0
  public void onClick$adicionarFrequencias(Event e) throws InterruptedException {

    int id;
    for (Aluno a : Facade.getInstance().listarAlunoTurma(turmav.getId())) {
      for (Intbox i : intbox) {
        id = Integer.parseInt(i.getId());
        if (a.getId() == id) {
          Frequencia fr = new Frequencia();
          fr.setQtdAula(i.getValue());
          fr.setRegistroDeDisciplina(di);
          fr.setAluno(a);
          fr.setPeriodo("");
          Facade.getInstance().salvarFrequencia(fr);
        }
      }
    }

    Messagebox.show(
        "Frequências adicionadas com Sucesso!",
        "Sucesso!",
        Messagebox.OK,
        Messagebox.EXCLAMATION,
        new org.zkoss.zk.ui.event.EventListener() {
          public void onEvent(Event arg1) throws Exception {}
        });

    for (Intbox i : intbox) {
      i.setId(null);
      i.setVisible(false);
    }

    for (Row r : rowss) {
      r.setId(null);
      r.setVisible(false);
    }

    rowss.clear();
    rowss = new ArrayList<Row>();

    intbox.clear();
    intbox = new ArrayList<Intbox>();
    binder.loadComponent(indexFrequencia);
  }