Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Student


        resultTable.removeAll();
        SortComparator comparator = new SortComparator();
        Collections.sort(list, comparator);

        for (Person person : list) {
            Student student = (Student) person.getPersonType("student");
            String id = person.getId();
            String name = person.getName();
            String observation = student.getAttendanceObservation();

            TableItem item = new TableItem(resultTable, SWT.NULL);
            item.setText(0, id);
            item.setText(1, name);
            item.setText(2, observation);
View Full Code Here


        boldStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(boldStyle);

       
        try {
          Student student = null;
            String name = "";
          JRPrintPage page = new JRBasePrintPage();
           
            registrations = (Map<String, Registration>) system.query(new GetRegistration());
            List<Registration> registrationList = new ArrayList<Registration>(registrations.values());
           
            MergeSortAlgorithm sortAlgorithm = new MergeSortAlgorithm();
            sortAlgorithm.sortRegistrationByName(registrationList);
           
            for (Registration registration : registrationList) {
                final List<Parcel> parcels = registration.getParcels();
                for (Parcel parcel : parcels) {
                    final GDDate parcelDate = new GDDate(parcel.getDate());
                    if(!parcel.isPayed() && parcelDate.beforeOrEqualsDay(today) && parcelDate.beforeOrEqualsDay(finalDate) && parcelDate.afterOrEqualsDay(initialDate)){
                       final GDDate birthDate = new GDDate(registration.getStudent().getBirthDate());
                       String gender = ((Person) system.query(new GetPerson(registration.getIdPerson()))).getGender().toString();
                       if(ResponsableValidator.checkStudentUnderAge(birthDate.getFormatedDate())){
                            student = (Student) registration.getStudent().getPersonType("student");
                            name = "Prezado(a) "+student.getResponsableName()+",\n" +
                                "referente "+(gender.equals("Masculino")?"ao aluno ":"� aluna ") + registration.getStudent().getName()+"\n"+
                                "com parcela vencida no dia "+parcelDate.getFormatedDate();
                        } else {
                            name = "Prezad"+(gender.equals("Masculino")?"o ":"a ")+registration.getStudent().getName()+",\n" +
                                    "com parcela vencida no dia "+parcelDate.getFormatedDate();
                        }
                       posX = convert(10);
                       posY = 0;
                       page = new JRBasePrintPage();
                      
                       page.addElement(printMiniText("Remetente: ", posX, posY+10, 60, 12));
                       page.addElement(printImage("corporateLogo.jpg", posX+60, posY+10, 77, 40));
                       page.addElement(printLeftText((String) gd.get("street") + ", " + (String) gd.get("streetnumber"), posX, posY+55, 240, 12));
                       page.addElement(printLeftText((String) gd.get("zipcode") + " - " + gd.get("city") + " - " + gd.get("state"), posX, posY+67, 240, 12));
                       page.addElement(drawVerticalLine(posX+240, posY, 84));
                      
                       page.addElement(printMiniText("Destinat�rio: ", posX+245, posY+10, 60, 12));
                       page.addElement(printLeftText((ResponsableValidator.checkStudentUnderAge(birthDate.getFormatedDate()) ? student.getResponsableName() : registration.getStudent().getName()), posX+245, posY+30, 290, 12));
                       String address = registration.getStudent().getStreet() + ", " + registration.getStudent().getStreetNumber() + (registration.getStudent().getStreetComplement().equals("") ? "" : " - " + registration.getStudent().getStreetComplement());
                       page.addElement(printLeftText(address, posX+245, posY+42, 290, 12));
                       page.addElement(printLeftText(registration.getStudent().getNeighborhood(), posX+245, posY+54, 290, 12));
                       page.addElement(printLeftText(registration.getStudent().getCep() + " - " + registration.getStudent().getCity() + " - " + registration.getStudent().getState(), posX+245, posY+66, 290, 12));
                      
View Full Code Here

    }
    }
  private String getNameForPrint(Registration registration) {
    String nameForPrint;
    if (ResponsableValidator.checkStudentUnderAge(new GDDate(registration.getStudent().getBirthDate()).getFormatedDate())) {
            Student student = (Student) registration.getStudent().getPersonType("student");
            nameForPrint = student.getResponsableName() + " (" + registration.getStudent().getName() + ")";
        } else {
            nameForPrint = registration.getStudent().getName();
        }
    return nameForPrint;
  }
View Full Code Here

        page.addElement(insertBoldText("Juros de " + gd.get("interestDeferredPayment") + "% ao dia", posX+100, posY+27, 165));
        String valueDiscount = new Money(billet.getParcel().getValueAfterParcelDateExpiration()-billet.getParcel().getValueBeforeParcelDateExpiration()).getFormatedValue();
        page.addElement(insertBoldText((billet.getParcel().isRegistrationTax() ? "Valor � ser pago referente a taxa de matr�cula" : "At� Vencimento:          Desconto pontualidade: " + valueDiscount), posX+3, posY+50, 250));
        String responsableName = "";
        if (ResponsableValidator.checkStudentUnderAge(new GDDate(billet.getPerson().getBirthDate()).getFormatedDate())) {
            Student student = (Student) billet.getPerson().getPersonType("student");
            responsableName = student.getResponsableName();
        } else {
            responsableName = billet.getPerson().getName();
        }
        String instructions = "Esta cobran�a � enviada a todos os alunos devidamente matriculados " +
        "conforme condi��es de Contrato de Presta��o de Servi�os assinado por " + responsableName + ", " +
View Full Code Here

    }

    private String getNamePrint(Registration registration) {
        String nameForPrint;
        if (ResponsableValidator.checkStudentUnderAge(new GDDate(registration.getStudent().getBirthDate()).getFormatedDate())) {
            Student student = (Student) registration.getStudent().getPersonType("student");
            nameForPrint = student.getResponsableName() + " (" + registration.getStudent().getName() + ")";
        } else {
            nameForPrint = registration.getStudent().getName();
        }
        return nameForPrint;
    }
View Full Code Here

      if (idRegistration != null) {

        registration = (Registration) system.query(new GetRegistration(idRegistration));
        Person person = registration.getStudent();
        Student student = (Student) person.getPersonType("student");

        contractName = "Contrato de " + person.getName();
        nameStudent = registration.getStudent().getName();
        genderStudent = registration.getStudent().getGender();
        birthDateStudent = registration.getStudent().getBirthDate();
        civilStateStudent = registration.getStudent().getCivilState();
        rgStudent = registration.getStudent().getRg();
        cpfStudent = registration.getStudent().getCpf();
        adressStudent = registration.getStudent().getStreet();
        numberadressStudent = registration.getStudent().getStreetNumber();
        complementadressStudent = registration.getStudent().getStreetComplement();
        eighborhoodStudent = registration.getStudent().getNeighborhood();
        cepStudent = registration.getStudent().getCep();
        cityStudent = registration.getStudent().getCity();
        stateStudent = registration.getStudent().getState();
        phoneStudent = registration.getStudent().getPhone();
        cellPhoneStudent = registration.getStudent().getCellPhone();
        emailStudent = registration.getStudent().getEmail();

        courses = new StringBuffer();
        for (RegistrationItem registrationItem : registration.getRegistrationItems()) {
          if (registrationItem.getCourse().getCoursesInThisPackage().size() > 0) {
            for (Course course : registrationItem.getCourse().getCoursesInThisPackage()) {
              courses.append(course.getDescription());
              courses.append(", ");
            }
          } else {
            courses.append(registrationItem.getCourse().getDescription());
            courses.append(", ");
          }
        }
        courses.delete(courses.length() > 2 ? courses.length() - 2 : courses.length(), courses.length());

        registrationDuration = String.valueOf(registration.getDuration());
        registrationInitDate = registration.getInitDate() != null ? registration.getInitDate().getFormatedDate() : "N�o cadastrada";
       

        registrationValue = new Money(registration.getRegistrationValue()).getFormatedValue();
       
        float registrationTaxValue = 0;
        float totalParcelsValueWithDiscount = 0;
        Parcel firstParcelRegistration = null;
        firstParcelRegistration = ( registration.getParcel(0).isRegistrationTax() ? registration.getParcel(1) : registration.getParcel(0) );
        int numberParcels= 0;
        for (Parcel parcel : registration.getParcels()) {
          if (parcel.isRegistrationTax()) {
            registrationTaxValue = parcel.getValueAfterParcelDateExpiration();
          } else {
            totalParcelsValueWithDiscount += parcel.getValueBeforeParcelDateExpiration();
            numberParcels++;
          }
        }
        numberOfParcels = String.valueOf(numberParcels);

        registrationTax = new Money(registrationTaxValue).getFormatedValue();
        registrationValueWithTotalDiscount = new Money(totalParcelsValueWithDiscount).getFormatedValue();
        registrationPontualityDiscount = registration.getPontualityDiscount().getFormatedValue();
        registrationDateOfTheFirstParcel = firstParcelRegistration.getDate();
        registrationParcelsValueBeforeDate = new Money(firstParcelRegistration.getValueBeforeParcelDateExpiration()).getFormatedValue();
        registrationParcelsValueAfterDate = new Money(firstParcelRegistration.getValueAfterParcelDateExpiration()).getFormatedValue();
        registrationDateOfTheNextParcels = String.valueOf(firstParcelRegistration.getDate().substring(0, 2));

        attendancaEmployeeName = registration.getEmployee().getName();
        attendancedate = registration.getRegistrationDate();
        attendanceHowDoYouKnow = student.getHowDoYouKnowVisualMidia();

        if (checkStudentUnderAge(birthDateStudent)) {
          nameResponsable = student.getResponsableName();
          rgResponsable = student.getResponsableRG();
          cpfResponsable = student.getResponsableCPF();
          kinshipResponsable = student.getResponsableRelation();
          phoneResponsable = student.getResponsablePhone();
          // responsableString = ", neste ato representado por " +
          // nameResponsable + ", R.G. " + rgResponsable + ", CPF " +
          // cpfResponsable;
        } else {
          nameResponsable = nameStudent;
View Full Code Here

  }
 
  private String getNameForPrint(Registration registration) {
    String nameForPrint;
    if (ResponsableValidator.checkStudentUnderAge(new GDDate(registration.getStudent().getBirthDate()).getFormatedDate())) {
      Student student = (Student) registration.getStudent().getPersonType("student");
      nameForPrint = student.getResponsableName() + " (" + registration.getStudent().getName() + ")";
    } else {
      nameForPrint = registration.getStudent().getName();
    }
    return nameForPrint;
  }
View Full Code Here

        String valueDiscount = new Money(billet.getParcel().getValueAfterParcelDateExpiration()-billet.getParcel().getValueBeforeParcelDateExpiration()).getFormatedValue();
        String responsableName = "";
        String studentname = "";
        studentname = billet.getPerson().getName();
        if (ResponsableValidator.checkStudentUnderAge(new GDDate(billet.getPerson().getBirthDate()).getFormatedDate())) {
          Student student = (Student) billet.getPerson().getPersonType("student");
          responsableName = student.getResponsableName();
        } else {
          responsableName = billet.getPerson().getName();
        }

        page.addElement(drawRectangle(posX, posY, 145, 185, 0));
View Full Code Here

          item.setText(16, person.getRg());
          item.setText(17, person.getState());
          item.setText(18, person.getStreet());
          item.setText(19, person.getStreetComplement());
          item.setText(20, person.getStreetNumber() + "");
          Student student = ((Student) person
              .getPersonType("student"));
          item.setText(21, student.getAttendanceDate());
          item.setText(22, student.getAttendanceObservation());
          item.setText(23, student.getAttendanceResponsable());
          item.setText(24, student.getCompany());
          item.setText(25, student.getCompanyPhone());
          item.setText(26, student.getHowDoYouKnowVisualMidia());
          item.setText(27, student.getReasonToDoTheCurse());
          item.setText(28, student.getResponsableCPF());
          item.setText(29, student.getResponsableName());
          item.setText(30, student.getResponsablePhone());
          item.setText(31, student.getResponsableRelation());
          item.setText(32, student.getResponsableRG());
          item.setText(33, student.getSchool());
          item.setText(34, student.getSchoolLevel());
          item.setText(35, student.getAttendanceRegister().getName());
        }

      }
    } catch (Exception e) {
      logger.error("GetUsers Error: ", e);
View Full Code Here

      if (system.getStudentsSchools().get(k).equals(school)) {
        break;
      }
    }

    Student student = new Student(
        (k != system.getStudentsSchools().size()) ? system
            .getStudentsSchools().get(k) : "", system
            .getSchoolLevel().get(j), system
            .getHowDoYouKnowVisualmidia().get(i),
        reasonToDoTheCurse, company, companyPhone, responsableName,
        responsableRelation, responsableCPF, responsableRG,
        responsablePhone, attendanceResponsable, attendanceDate,
        attendanceObservation, system.getPeople().get(
            attendenceRegisterId));
    student.setOcorrences(ocurrenceList);

    if (person.getPersonType("student") != null)
      person.removePersonType("student");

    person.setPersonType("student", student);
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.Student

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.