Package br.com.procempa.modus.entity

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


    tur.setAberta(rs.getBoolean(7));
   
    if(rs.getString(8) == null){
      tur.setCurso(null);
    } else {
      Curso c = new Curso();
      tur.setCurso(c);
      tur.getCurso().setId(rs.getLong(8));
   

    return tur;
View Full Code Here


   
    public void actionPerformed(ActionEvent e) {
        JPanel appPanel = Main.getInstance().getAppPanel();
        appPanel.removeAll();
        JXTable table = CursoSearch.getInstance().getTable();
        Curso c = (Curso) table.getValueAt(table.getSelectedRows()[0], -1);
        JComponent form = CursoForm.getInstance(c);
        appPanel.add(form);
        appPanel.validate();
        appPanel.repaint();
    }   
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

    return CursoActionFactory.makeNew();
  }

  @Override
  public void buildTabs() {
    Curso curso = (Curso) getSelectedData();
    try {
      addTab("Turmas", TurmaSearch.getInstance(curso));
      addTab("Conte�dos", ConteudoSearch.getInstance(curso));
      addTab("Inscritos", InscritosView.getInstance(curso));
    } catch (Exception e) {
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

  }
 
  public void testInsereUsuario() throws Exception {
    Usuario user = UsuarioDataServices.getUsuario(new Long(2));
    UserContext.createInstance(user, null);
    Curso curso1 = CursoDataServices.getList().get(0);
    Curso curso2 = CursoDataServices.getList().get(1);
   
    FilaInscricaoDataServices.insereUsuario(user, curso1);
    FilaInscricaoDataServices.insereUsuario(user, curso2);
  }
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(5);
    c3.setCurso(c);
    c3 = (Conteudo) pa.persist(c3);
   
    Integer i = CursoDataServices.getSomaCargaHoraria(c, 5, c3);
    Integer j = c.getCargaHorario();
   
   
    pa.remove(c1);
    pa.remove(c2);
    pa.remove(c3);
View Full Code Here

      Usuario u = new Usuario();
      filaInscricao.setUsuario(u);
      filaInscricao.getUsuario().setId(rs.getLong(4));
    }

    Curso c = new Curso();
    filaInscricao.setCurso(c);
    filaInscricao.getCurso().setId(this.idCurso);

    return filaInscricao;
  }
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.