Package br.com.visualmidia.system

Examples of br.com.visualmidia.system.GDSystem


import br.com.visualmidia.persistence.GetRegistrationByPerson;
import br.com.visualmidia.system.GDSystem;

public class Exportacao {
  public static void main(String[] args) throws Exception {
    GDSystem system = GDSystem.getInstance();
    List<Person> users = (List<Person>) system.query(new GetAllStudent());

    // aluno;rg; cpf;data nasc; endere�o + numero, bairro, cidade, estado,
    // cep; telefones
    String export = "ALUNO;RG;CPF;DATA NASCIMENTO;ENDERECO;BAIRRO;CIDADE;ESTADO;CEP;TELEFONE;CELULAR\n";
    for (Person person : users) {
     
      try {
        List<Registration> registrations = (List<Registration>) system.query(new GetRegistrationByPerson(person.getId()));
        if(registrations.size() > 0) {
          export += "" +
            person.getName() + ";" +
            person.getRg() + ";" +
            person.getCpf() + ";" +
View Full Code Here


        super.createContents(parent);
       
        setTitle("Sobre o Gerente Digital");
        setMessage("Gerente Digital");

        GDSystem system = GDSystem.getInstance();
        try {
         
//            List <String> screens = new ArrayList <String> ();
//            screens.add("Central de Salas");
//            screens.add("Central de Alunos");
//            screens.add("Central de Funcionarios");
//            screens.add("Central de Matricula");
//            screens.add("Dividir Parcelas de Matricula");
//            screens.add("Editar Matricula");
//            screens.add("Editar Matricula Finalizada");
//            screens.add("Editar Parcelas de Matricula");
//            screens.add("Finalizar Matricula");
//            screens.add("Habilitar Desconto de Matricula");
//            screens.add("Habilitar Data de Parcelas Retroativas");
//            screens.add("Habilitar Data de Taxa de Matricula Retroativa");
//            screens.add("Remover Curso de Matricula");
//            screens.add("Remover Parcelas de Matricula");
//            screens.add("Imprimir Certificado");
//            screens.add("Habilitar Desconto de Pontualidade na Parcela");
//            screens.add("Central Financeira");
//            screens.add("Central de Cursos");
//            screens.add("Central de Pesquisa");
//            screens.add("Central de Seguran�a");
//            screens.add("Central de Hor�rios");
//            screens.add("Quadro de Hor�rios");
//            screens.add("Caixa");
//            screens.add("Contas");
//           
//            screens.add("Permiss�o de Contas Banc�rias");
//            screens.add("Adicionar Contas");
//            screens.add("Editar Contas");
//            screens.add("Transfer�ncia de Contas");
//            screens.add("Movimenta��o de Contas");
//           
//            screens.add("Altera��o de Parcelas");
//            screens.add("Despesas / Receitas");
//            screens.add("Fluxo de Caixa");
//            screens.add("Confer�ncia");
//            screens.add("Controle de Cheques");
//            screens.add("Importa��o de Extrato");
//           
//            //Reports       
//            screens.add("Relat�rios");
//            screens.add("Extrato de Contas");
//            screens.add("Holerite");
//            screens.add("Gera��o de Boletos");
//            screens.add("Contrato em Branco");
//            screens.add("Relat�rio de Parcelas");
//            screens.add("Relat�rio de Alunos");
//            screens.add("Relat�rio de Presen�as");
//            screens.add("Aniversariantes do M�s");
//            screens.add("Impress�o de Certificado");
//            screens.add("Certificados Pendentes para Impress�o");
//            screens.add("Ficha de Cadastro");
//            screens.add("Quadro de Hor�rios");
//            screens.add("Contrato em Branco");
//            screens.add("Relatorio de Parcelas");
//            screens.add("Ficha de Cadastro");
//            screens.add("Quadro de Hor�rios");
//            screens.add("Extrato de Contas");
//            screens.add("Carta de Cobran�a");
//            screens.add("Carta de boas-vindas");
//            screens.add("Impress�o de Etiquetas");
//            screens.add("Contas � Pagar/Receber");
//           
//            screens.add("Configura��es");
//            screens.add("Backup");
           
           
            //ADICIONA ADMINISTRADORES
//            List<String> permissionsList = new ArrayList<String>();
//            permissionsList.add("Impress�o de Etiquetas");
//           
//            system.execute(new AddGroup("Administrador",permissionsList));
//            List<Group> groups = new ArrayList(((Map<String, Group>) system.query(new GetGroup())).values());
//           
//            system.execute(new AddUser((String) system.query(new GetPersonID()), "Administrador", "developer", "simpsons", groups));
//            system.execute(new AddUser((String) system.query(new GetPersonID()), "Administrador", "admin", "gdadmin", groups));
//            system.execute(new AddHowDoYouKnowVisualmidia("Carro de som"));
//            system.execute(new AddHowDoYouKnowVisualmidia("Radio"));
//           
//            Person user = (Person) system.query(new GetPersonByName("Administrador"));
//            system.execute(new AddUserToGroup("Administrador", user));
           
           
           
           
           // system.execute(new AddGroup("Geral", screens));
            //system.execute(new AddGroup("Geral2", new ArrayList <String> ()));
            //List<String> groupsNames;
           
            
            //system.execute(new AddUser((String) system.query(new GetPersonID()), "Usuarios", "teste6", "teste6",null));

            //system.execute(new AddUser((String) system.query(new GetPersonID()),
          /*--------------------------------------------------------------------------------------
          Usado quando as parcelas dos alunos crescerem absurdamente
          Esse c�digo pode ser usado na registration group.
          Primeiro coloque em coment�rio o m�todo updateSelectedRegistration na classe RegistrationGroup
          depois finalize o aluno e n�o exclui as parcelas em aberto, ap�s isso altere os atributos
          com o c�digo abaixo, pode colocar quando seleciona a matricula
          */
//          Registration registration = (Registration) system.query(new GetRegistration(selection[0].getText(0)));
//      registration.setEndDate(null);
//      registration.setEndRegistrationEmployee(null);
//          registration.setActive(true);
//     
//      List<String> registrationStatus = registration.getEndStatus();
//      registrationStatus.set(0, null);
          //--------------------------------------------------------------------------------------
         
         
          //--------------------------------------------------------------------------------------
          /*
          O c�digo abaixo exibe os alunos que tem muitas matriculas
          OBs: Isso pode acontecer quando a secret�ria vai adicionar parcelas, pois ela erra no nro de parcelas
          */
          Map<String, Registration> registrations = (Map<String, Registration>) system.query(new GetRegistration());
          List<String> lista = new ArrayList<String>();
         
          for (Registration registration : registrations.values()) {
            List<Parcel> parcels = registration.getParcels();
            if(parcels.size() > 30) {
              System.out.println("Nome = " + registration.getStudent().getName());
              lista.add(registration.getIdRegistration());
        }
      }         
          //--------------------------------------------------------------------------------------
         
         
         
//          Map <String, LinkedOperation> map = (Map <String, LinkedOperation>) system.query(new GetLinkedOperation());
//            List <LinkedOperation> list = new ArrayList <LinkedOperation> (map.values());
//            for (LinkedOperation linkedOperation : list) {
//              if ((!linkedOperation.isChecked()) && (!linkedOperation.getOperation().getAccount().isBankAccount())) {
//                //if(linkedOperation.getOperation().getAccount().getName().equals("NAO UTILIZAR")){
//            User u = (User)(linkedOperation.getOperation().getAccount().getPerson().getPersonType("user"));
//                  if(u != null)
//                    System.out.println(u.getUserName());
//                //}
//              }
//            }
         
          //SERIAL
//          GD gd = GD.getInstance();
//          gd.set("username", "docomp");
//          gd.set("password", "docomp");
//          gd.set("serialnumber", "711IRGG9CIQJTTPEAQCFPHMJL2");
//         
//          System.out.println(gd.get("username"));
//          System.out.println(gd.get("password"));
//          System.out.println(gd.get("serialnumber"));
         
          //PROBLEMA PARA REMOVER AS MATRICULAS COM PROBLEMA
//          Map<String, Registration> registrations = (Map<String, Registration>) system.query(new GetRegistration());
//          List<String> lista = new ArrayList<String>();
//          for (Registration registration : registrations.values()) {
//            if(registration.getStudent() == null) {
//              lista.add(registration.getIdRegistration());
//        }
//      }
//          for (String i : lista) {
//            system.execute(new RemoveRegistration(i));
//      }
         
         
//          Map<String, List<RegistrationAppointment>> map = (Map<String, List<RegistrationAppointment>>) system.query(new GetAllAppointmentMap());
//          for (List<RegistrationAppointment> appointmentList : map.values()) {
//        for (RegistrationAppointment appointment : appointmentList) {
//          if(appointment.getRegistration().getStudent().getName().equals("Thamires Peixoto de Oliveira")) {
//            System.out.println(appointment.getRegistration().getStudent().getName() + " - " + appointment.getAppointmentDate().getDate());
//          }
//        }
//      }
     
         
//          System.out.println("**************** Lista de Anivers�riantes ******************");
//          Map<String, Person> people = (Map<String, Person>) system.query(new GetPerson());
//          for (Person person : people.values()) {
//        System.out.println(person.getBirthDate() + " - " + person.getName() + " - ");
////        for (Registration registration : registrations.values()) {
////          System.out.println(registration.getStudent().getBirthDate() + " - " + registration.getStudent().getName());
////      }
//      }
//          System.out.println("*************************************************");

         
//          Map<String, ExtractBankItem> extractItens = (Map<String, ExtractBankItem>) system.query(new GetExtractBankItem());
//      for (ExtractBankItem i : extractItens.values()) {
//        System.out.println(i.getId());
//      }
//          system.execute(new RemoveExtractItem("00000000 = 11/04/2007 =              -2.93"));
//          system.execute(new RemoveExtractItem("00000210 = 12/04/2007 =            -150,00"));
//          system.execute(new RemoveExtractItem("00130542 = 18/04/2007 =             400,00"));
//          system.execute(new RemoveExtractItem("00447088 = 11/04/2007 =             -34.91"));
//          system.execute(new RemoveExtractItem("00000221 = 20/04/2007 =            -591.83"));
//          system.execute(new RemoveExtractItem("00447100 = 11/04/2007 =             -34.91"));
    } catch (Exception e) {
      e.printStackTrace();
    }
//        try {
//      Map <String, Registration> registrations = (Map<String, Registration>) system.query(new GetRegistration());
     
//      for (Registration registration : registrations.values()) {
//        for (RegistrationAppointment appointment : registration.getRegistrationAppointment()) {
//          for (Presence presence : appointment.getPresence()) {
//            System.out.println("Matr�cula: " + presence.getDate().getDate());
//          }
//        }
//      }
//      Map<String, List <RegistrationAppointment>> registrationMap = (Map<String, List <RegistrationAppointment>>)  system.query(new GetAllAppointmentMap());
//          for (String idMap : registrationMap.keySet()) {
//        for (RegistrationAppointment registrationAppointment : registrationMap.get(idMap)) {
//          for (Presence presence : registrationAppointment.getPresence()) {
//            System.out.println("Map: " + presence.getDate().getDate());
//          }
//        }
//      }
//    } catch (Exception e) {
//      e.printStackTrace();
//    }
//       
        try {
         
          System.out.println("**************** Lista de Usu�rios ******************");
      List<Person> users = (List<Person>) system.query(new GetUsers());
      for (Person person : users) {
        System.out.println("*******************");
        User personType = (User) person.getPersonType("user");
        System.out.println("Usuario: "+personType.getUserName());
        System.out.println("Senha: "+personType.getPassword());
     
      }
      Map<String, Person> persons = (Map<String, Person>)system.query(new GetStudent());

           System.out.println("**************** Lista de Usu�rios ******************");
         
          
          
View Full Code Here

  private Label statusMessage;
  private Label statusHour;

    @SuppressWarnings("unchecked")
  public void run() {
      GDSystem system = GDSystem.getInstance();
      try {
      Map<String, Object> properties = (Map<String, Object>) system.query(new GetProperty());
      if(properties.get("timezone") == null) {
        system.execute(new SetProperty("timezone", "America/Sao_Paulo"));
      }
      DateTimeZone zone = DateTimeZone.forID(String.valueOf(properties.get("timezone")));
      DateTimeZone.setDefault(zone);
     
      display = (Display.getCurrent() != null)
View Full Code Here

        this.date = date;
        this.description = description;
        this.value = value;
        this.categoryId = categoryId;
        try {
          GDSystem system = GDSystem.getInstance();
            billCategory = (BillCategory) system.query(new GetBillCategory(categoryId));
        } catch (Exception e) {
          logger.warn("N�o foi poss�vel recuperar a categoria do Plano de Contas!", e);
        }
    }
View Full Code Here

                        }
                    });

                    String receive = communicate.receive();
                    if (receive.equals("403")) {
                        GDSystem system = GDSystem.getInstance();
                        GD gd = GD.getInstance();
                        communicate.sendObject(new Autentication((String) gd.get("username"), (String) gd.get("password"), (String) gd.get("serialnumber") ));
                        if(communicate.receive().equals("404")) {
                            Vader vader = (Vader) communicate.receiveObject();
                           
                            system.execute(new AddDarkSide(vader));
                            updateComposite.getDisplay().syncExec(new Runnable() {
                                public void run() {
                                    primeriMessageLabel.setText("Licen�a valida, reiniciando...");
                                   
                                    if(vaderNotifier == null) {
View Full Code Here

  public RegistrationMapControlCenter(CTabFolder parent, int style,
      MainScreen mainScreen) {
    super(parent, style);

    GDSystem system = GDSystem.getInstance();
    registrationMap = system.getRegistratioMap();

    this.mainScreen = mainScreen;

    GD gd = GD.getInstance();
    startWorkTime = gd.getWorktime("start");
View Full Code Here

  private Combo weekDayCombo;
   
    public UpdateReplacementDialog(Shell parent, GDDate date, String idRegistration, boolean isReplacement) {
        super(parent);
        this.date = date;
        GDSystem system = GDSystem.getInstance();
        this.registrationMap = system.getRegistratioMap();
       
        GD gd = GD.getInstance();
        this.startWorkTime = gd.getWorktime("start");
        this.endWorkTime = gd.getWorktime("end");
        this.isReplacement = isReplacement;
       
        try {
            this.registration = (Registration) system.query(new GetRegistration(idRegistration));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of br.com.visualmidia.system.GDSystem

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.