Package br.com.procempa.modus.entity

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


  private CursoNewAction() {
    super("Curso", IconFactory.createCurso24());
  }

  public void actionPerformed(ActionEvent e) {
    Curso curso = new Curso();
    Main.getInstance().buildPanel(CursoForm.getInstance(curso));
  }
View Full Code Here


    return CursoActionFactory.makeNew();
  }

  @Override
  public void buildTabs() {
    Curso curso = (Curso) getSelectedData();
    try {
      addTab("Turmas", IconFactory.createTurma16(), TurmaSearch.getInstance(curso));
      addTab("Conte�dos", IconFactory.createConteudo16(), ConteudoSearch.getInstance(curso));
      addTab("Inscritos", IconFactory.createInscricao16(), InscritosView.getInstance(curso));
      addTab("Lista de Espera", IconFactory.createInscricao16(), InscritosListaView.getInstance(curso));
View Full Code Here

import br.com.procempa.modus.session.exceptions.PersistException;

public class CursoDataServices implements DataServices {

  public static Curso getCurso(Long id) {
    Curso curso = null;
    try {
      PersistentAccess pa = PersistentAccessFactory.getInstance();
      curso = (Curso) pa.find(Curso.class, id);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  }

  public static void remove(Long id) throws Exception {
    // try {
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    Curso curso = (Curso) pa.find(Curso.class, id);

    List<Inscricao> inscritos = InscricaoDataServices.getList(curso);

    if (inscritos.isEmpty()) {
View Full Code Here

    Action actionInscreve = new AbstractAction("", IconFactory.createFilaEspera16()) {

      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();
          InscritosRefresher.refresh(c);
View Full Code Here

    return CursoActionFactory.makeNew();
  }

  @Override
  public void buildTabs() {
    Curso curso = (Curso) getSelectedData();
    try {
      addTab("Turmas", IconFactory.createVerTurmaCurso16(), TurmaSearch.getInstance(curso));
      addTab("Conte�dos", IconFactory.createVerConteudoCurso16(), ConteudoSearch.getInstance(curso));
      addTab("Inscritos", IconFactory.createInscreverCurso16(), InscritosView.getInstance(curso));
      addTab("Fila de Inscri��o", IconFactory.createFilaEspera16(), InscritosListaView.getInstance(curso));
View Full Code Here

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

    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

  protected void setUp() throws Exception {
    pa = PersistentAccessFactory.getInstance();
  }
 
  public void testInsertCurso() throws Exception {
    Curso curso1  = new Curso();
    curso1.setNome("Curso Teste");
    curso1.setLocal("Cibernarium");
    curso1.setCargaHorario(30);
    curso1.setEmenta("O primeiro curso de teste");
    curso1.setAssiduidade(85);
   
    Curso curso = (Curso) pa.persist(curso1);
   
    assertEquals(curso1.getNome(),curso.getNome());
  }
View Full Code Here

import br.com.procempa.modus.services.CursoDataServices;

public class ConteudoDataServicesTest extends TestCase {
 
  public void testGetConteudosByTurmao() throws Exception {
    Curso c = CursoDataServices.getCurso(new Long(1));
    List<Conteudo> l = ConteudoDataServices.getList(c);
    assertFalse(l.isEmpty());
 
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.