Examples of GDDate


Examples of br.com.visualmidia.business.GDDate

  }

  private void createUpdateNotifier() {
    if (GD.getInstance().get(THERE_IS_UPDATE_AVALIABLE) == null) {
      GD.getInstance().set(THERE_IS_UPDATE_AVALIABLE, "0");
      GD.getInstance().set("nextUpdateDate", new GDDate());
      GD.getInstance().set(THERE_IS_UPDATE_AVALIABLE, "15");
    }

    // Casos Antigos onde o nextUpdateDate ainda � calendar, transforma em
    // GDDate e continua.31/10/2006
    if (GD.getInstance().get("nextUpdateDate") instanceof Calendar) {
      Calendar updateDate = (Calendar) GD.getInstance().get(
      "nextUpdateDate");

      GD.getInstance().set("nextUpdateDate", new GDDate(updateDate));
    }
    GDDate nextUpdateDate = (GDDate) GD.getInstance().get("nextUpdateDate");
    GDDate today = new GDDate();

    if (nextUpdateDate.beforeOrEqualsDay(today)
        || ((String) GD.getInstance().get(THERE_IS_UPDATE_AVALIABLE))
        .equals("1")) {
      new UpdateNotificator(componentsAreaComposite).start();
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    float payTotal = 0;
    for (int i = 0; i < parcels.size(); i++) {
      Parcel parcel = (Parcel) parcels.get(i);

      GDDate date = new GDDate(parcel.getDate());
      GDDate today = new GDDate();
      GDDate todayPlusOneWeek = new GDDate();
      todayPlusOneWeek.addDays(7);
      GDDate graceDays = new GDDate(parcel.getDate());
      graceDays.addDays(Integer.valueOf(system.getProperty("gracedays")));

      TableItem item = new TableItem(parcelTable, SWT.NONE);
      try {
        if (parcel.isPayed()) {
          item.setImage(new Image(null, (parcel.isRegistrationTax() ? "img/icoRegistrationTaxPay.png" : "img/icoPay.png")));
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

      TableItem parent = new TableItem(registrationTable, SWT.NONE);
      parent.setText(0, registration.getIdRegistration());
      parent.setText(1, registration.getRegistrationDate());
      parent.setText(2, (registration.getInitDate() == null)
          ? ""
              : new GDDate(registration.getInitDate()).getFormatedDate());
      parent.setText(3, (registration.getEndDate() == null)
          ? ""
              : new GDDate(registration.getEndDate()).getFormatedDate());
      parent.setText(4, new Money(registration.getRegistrationValue()).getFormatedValue());
      parent.setText(5, registration.getEmployee().getName());

      List<String> registrationStatus = registration.getEndStatus();
      if (registrationStatus.size() > 0) {
        try {
          status = (RegistrationStatus) system.query(new GetRegistrationStatusByMotive(registrationStatus.get(0)));
          parent.setText(6, status.getCategory() + ": " + registrationStatus.get(0));
        } catch (Exception e) {
          e.printStackTrace();
        }
      }

      parent.setText(7, (registration.getEndEmployee() == null ? "" : registration.getEndEmployee().getName()));

      List<Parcel> parcels = registration.getParcels();
      MergeSortAlgorithm sort = new MergeSortAlgorithm();
      sort.sortParcelByDate(parcels);

      int numberOfNotPayedParcels = 0;
      for (Parcel parcel : parcels) {
        GDDate todayPlusOneWeek = new GDDate();
        todayPlusOneWeek.addDays(7);

        if (!parcel.isPayed()) {
          numberOfNotPayedParcels++;
        }
      }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    public void fillBeginDate(String beginDate) {
      if(beginDate.equals(""|| beginDate.equals("  /  /    ")) {
        beginDateText.setValue(null);
        }else{
          beginDateText.setValue(new GDDate(beginDate).getDate());
        }
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    public void fillDismissedDate(String dismissedDate) {
      if(dismissedDate.equals("") || dismissedDate.equals("  /  /    ")) {
        dismissedDateText.setValue(null);
        }else{
          dismissedDateText.setValue(new GDDate(dismissedDate).getDate());
        }
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    public void fillRegisterDate(String registerDate) {
      if(registerDate.equals(""|| registerDate.equals("  /  /    ")) {
        registerDateText.setValue(null);
        }else{
          registerDateText.setValue(new GDDate(registerDate).getDate());
        }
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

  public void update() {
    Thread updateThread = new Thread() {
            public void run() {
                getDisplay().syncExec(new Runnable() {
                    public void run() {
                      updateTable(filtersGroup.getOptionComboDate(), new GDDate(filtersGroup.getStartPeriod()), new GDDate(filtersGroup.getEndPeriod()), filtersGroup.getSelectionLocalization(), filtersGroup.getNameSearchText());
                    }
                });
            }
        };
        updateThread.start();
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        TableItem[] items = occurrenceTable.getItems();
        List<Occurrence> ocurrenceList = new ArrayList<Occurrence>();
        for (int i = 0; i < items.length; i++) {
            try {
                Person person = (Person) system.query(new GetPersonByName(items[i].getText(1)));
                ocurrenceList.add(new Occurrence(person, new GDDate(items[i].getText(0)), items[i].getText(2)));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return ocurrenceList;
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        });
    }

    private void createEndDateText() {
        endDateText = new DateText(registrationComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        endDateText.setValue(new GDDate().getDate());
       
        FormData data = new FormData();
        data.top = new FormAttachment(endDateLabel, 1);
        data.left = new FormAttachment(initialDateText, 5);
        data.right = new FormAttachment(50, 0);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        createIgnoreDateCheck();
    }

    private void createInitialDateText() {
        initialDateText = new DateText(registrationComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        initialDateText.setValue(new GDDate().getDate());

        FormData data = new FormData();
        data.top = new FormAttachment(inicialDateLabel, 1);
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(25, 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.