Package br.com.procempa.modus.entity

Examples of br.com.procempa.modus.entity.Curso


//    assertTrue(turma2.getVagas() == vagas - 1);
// 
  }

  public void testGetInscritosPorCurso() throws Exception {
    Curso curso = CursoDataServices.getList().get(0);
    List<Inscricao> l  = InscricaoDataServices.getList(curso);
    assertFalse(l.isEmpty());
  }
View Full Code Here


//    List<Turma> l = TurmaDataServices.getTurmasAbertas(t);
//    assertFalse(l.isEmpty());
  }
 
  public void testGetTurmasByCurso() throws Exception {
    Curso c = CursoDataServices.getList().get(0);
    List<Turma> l = TurmaDataServices.getList(c);
    assertTrue(l.size() == 1);
  }
View Full Code Here

    List<Turma> l = TurmaDataServices.getList(c);
    assertTrue(l.size() == 1);
  }
 
  public void testGetVagasDisponiveis() throws Exception {
    Curso c = CursoDataServices.getList().get(0);
   
    Integer i = TurmaDataServices.getVagasDisponiveis(c);
   
    assertTrue(i == 1);
 
View Full Code Here

        .createVisitaAtiva16()) {
     
      private static final long serialVersionUID = 0L;

      public void actionPerformed(ActionEvent e) {
        Curso c = (Curso) getTable().getValueAt(
            getTable().getSelectedRows()[0], -1);
        try {
          FilaInscricaoDataServices.insereUsuario (usuario, c);
          getTableModel().refresh();
View Full Code Here

    this.pa = PersistentAccessFactory.getInstance();
  }
 
  //TODO Arrumar esse teste de acordo com as novas condicoes de contagem
  public void testGetSomaCargaHoraria(){
    Curso c = new Curso();
    c.setNome("Curso Teste 1");
    c.setCargaHorario(25);
    c = (Curso) pa.persist(c);
   
    Conteudo c1 = new Conteudo();
    c1.setNome("ContUm");
    c1.setHorasAula(10);
    c1.setCurso(c);
    c1 = (Conteudo) pa.persist(c1);
   
    Conteudo c2 = new Conteudo();
    c2.setNome("ContDois");
    c2.setHorasAula(5);
    c2.setCurso(c);
    c2 = (Conteudo) pa.persist(c2);
   
    Conteudo c3 = new Conteudo();
    c3.setNome("ContTres");
    c3.setHorasAula(10);
    c3.setCurso(c);
    c3 = (Conteudo) pa.persist(c3);
   
    Integer i = CursoDataServices.getSomaCargaHoraria(c);
    Integer j = c.getCargaHorario();
   
   
    pa.remove(c1);
    pa.remove(c2);
    pa.remove(c3);
View Full Code Here

    private CursoEditAction() {
        super("", IconFactory.createEdit());
    }
   
    public void actionPerformed(ActionEvent e) {
        Curso c = (Curso) CursoSearch.getInstance().getSelectedData();
        JComponent form = CursoForm.getInstance(c);
        Main.getInstance().buildPanel(form);
    }   
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        JXTable table = CursoSearch.getInstance().getTable();
       
        for (int row : table.getSelectedRows()) {
            try {
                Curso curso = (Curso) table.getValueAt(row, -1);
                CursoDataServices.remove(curso.getId());
                ((CursoTableModel) table.getModel()).removeItem(curso);
            } catch (Exception e1) {
                // TODO Implementar controle de exce��es
                e1.printStackTrace();
            }
View Full Code Here

    private CursoNewAction() {
        super("Curso", IconFactory.createEquipamento16());
    }
   
    public void actionPerformed(ActionEvent e) {
        Curso curso = new Curso();
        Main.getInstance().buildPanel(CursoForm.getInstance(curso));
    }
View Full Code Here

  private CursoEditAction() {
    super("", IconFactory.createEdit());
  }

  public void actionPerformed(ActionEvent e) {
    Curso c = (Curso) CursoSearch.getInstance().getSelectedData();
    JComponent form = CursoForm.getInstance(c);
    Main.getInstance().buildPanel(form);
  }
View Full Code Here

    case ConfirmViewAction.YES:
      JXTable table = CursoSearch.getInstance().getTable();

      for (int row : table.getSelectedRows()) {
        try {
          Curso curso = (Curso) table.getValueAt(row, -1);
          CursoDataServices.remove(curso.getId());
          ((CursoTableModel) table.getModel()).removeItem(curso);
        } catch (BusinessException ex) {
          MessageView.showWarning(ex.getMessage(),
              "Falha ao remover o curso.");
View Full Code Here

TOP

Related Classes of br.com.procempa.modus.entity.Curso

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.