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 ******************");