Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Presence


      Person person = registration.getStudent();

      TableItem item = new TableItem(replacementStudentTable, SWT.LEFT);
            item.setText(0, registration.getIdRegistration());
            item.setText(1, person.getName());
            Presence replacementOfPresence = registrationAppointment.getReplacementOfPresence();
            item.setText(2, (replacementOfPresence == null) ? "" : replacementOfPresence.getDate().getFormatedDate() + " " +replacementOfPresence.getDate().getHourOfDay()+"h.");
            item.setText(3, registrationMap.getPresentStatus(registration, date));
    }
    }
View Full Code Here


    systemRegistration.setInitDate(gdDate);
   
    RegistrationAppointment registrationAppointment = new RegistrationAppointment(gdDate, systemRegistration, isReplacement);
//    Presence presence = systemRegistration.getPresence(this.presence.getDate());
    if(presence != null){
      Presence presence = getDatePresence(system, this.presence.getRegistrationAppointment().getRegistration().getIdPerson(), this.presence.getDate());
      presence.setReplacement(registrationAppointment);
      registrationAppointment.setReplacementOfPresence(presence);
    }
    systemRegistration.getRegistrationAppointment().add(registrationAppointment);
   
    /*
 
View Full Code Here

    @Override
    protected void buttonPressed(int event) {
        if(event == OK) {
            try {
              if((repositionButton.getSelection() ? presenceTable.getSelection().length > 0 : registrationTable.getSelection().length > 0)) {
                Presence presence = null;
                Person person = null;
                Registration registration = null;
               
                if(repositionButton.getSelection()){
                  presence = presencesList.get(presenceTable.getSelectionIndex());
                  person = presence.getRegistrationAppointment().getRegistration().getStudent();
                } else {
                  registration = (Registration) system.query(new GetRegistration(registrationTable.getSelection()[0].getText(0)));
                  person = registration.getStudent();
                }
               
View Full Code Here

        if(registration == null)
          return;
     
      RegistrationAppointment appointment = (this.isReplacement ? getReplacement(registration.getRegistrationAppointment()) : getAppointment(registration.getRegistrationAppointment()));
     
      Presence presence = getPresence(appointment);

        if(presence == null || converting) {
          presence = new Presence(isPresent, appointment, presenceGdDate);
          appointment.addPresence(presence);
        } else {
          presence.setPresent(isPresent);
        }
    }
View Full Code Here

  private Presence getPresence(RegistrationAppointment appointment) {
    int i = 0;
    List<Presence> presences = appointment.getPresence();
    for (i = 0; i < presences.size(); i++) {
      Presence presence = presences.get(i);
 
      if(presence.getDate().getDayOfMonth() == presenceGdDate.getDayOfMonth()
          && presence.getDate().getMonth() == presenceGdDate.getMonth() 
          && presence.getDate().getYear() == presenceGdDate.getYear() 
          && presence.getDate().getHourOfDay() == presenceGdDate.getHourOfDay()) {
        return presence;
      }
    }
    return null;
  }
View Full Code Here

TOP

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

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.