Examples of GDDate


Examples of br.com.visualmidia.business.GDDate

    private void setUpdateAvaliableToNone() {
        GD.getInstance().set("ThereIsUpdateAvaliable", "0");
    }

    private void setNextUpdateDate() {
        GDDate nextUpdateDate = new GDDate();
        nextUpdateDate.addDays(Integer.parseInt((String) GD.getInstance().get("checkForUpdateEvery")));

        GD.getInstance().set("nextUpdateDate", nextUpdateDate);
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        Label periodLabel = new Label(composite, SWT.NULL);
        periodLabel.setText("Per�odo:");
        periodLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        periodLabel.setEnabled(true);

        GDDate today = new GDDate();
        startPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        startPeriodText.setValue(today.getDate());
        startPeriodText.setEnabled(false);

        final Label atLabel = new Label(composite, SWT.NULL);
        atLabel.setText("�");
        atLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        atLabel.setEnabled(true);

        endPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        endPeriodText.setValue(today.getDate());
        endPeriodText.setEnabled(false);
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        Button filter = new Button(composite, SWT.FLAT);
        filter.setText("Filtrar");

        filter.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
              if(new GDDate(startPeriodText.getText()).afterDay(new GDDate(endPeriodText.getText()))){
                checkControlCenter.setErrorMessage("A data inicial deve ser menor que a data final.");
                startPeriodText.setFocus();
                } else {
                  updateFilters();
                }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    @SuppressWarnings("unchecked")
  protected void updateFilters() {
        if ((startPeriodText.getText().equals("")) || (endPeriodText.getText().equals(""))) {
            checkControlCenter.setErrorMessage("Per�odo Incorreto.");
        } else {
            GDDate startDate = new GDDate(startPeriodText.getText());
            GDDate endDate = new GDDate(endPeriodText.getText());

            if (endDate.beforeDay(startDate)) {
                checkControlCenter.setErrorMessage("Per�odo Incorreto.");
            } else {
                checkControlCenter.setErrorMessage("");
                checkControlCenter.updateTable(combo.getText(), startDate, endDate, getSelectionLocalization(), nameSearchText.getText());
            }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        }
      } else {
        try {
          String id = (editAccountId == null) ? (String) system.query(new GetIncomingId()) : editAccountId;
          String categoryId = billPlan.get(billPlanCombo.getText()).getId();
          system.execute(new AddIncoming(id, descriptionText.getText(), new GDDate(nextPaymentDateText.getText()), frequencyCombo
              .getSelectionIndex(), Integer.parseInt(numberOfOcurrenciesText.getText()), new Money(
                  (valueText.getText().equals("") ? VALUE_0_00 : valueText.getText())), (fixedValue.getSelectionIndex() == 0) ? true
                      : false, categoryId, observation.getText()));
        } catch (TransactionDateException e) {
          MessageBox box = new MessageBox(parent.getShell(), IMessageProvider.INFORMATION);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    buttonsComposite.setLayout(new GridLayout(10, false));

    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    buttonsComposite.setLayoutData(gridData);

    GDDate date = new GDDate();

    final DateText fromDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
    date.setFirstDayOfMonth();
    fromDateText.setValue(date.getDate());
    gridData = new GridData();
    gridData.widthHint = 80;
    fromDateText.setLayoutData(gridData);

    Label label = new Label(buttonsComposite, SWT.NONE);
    label.setText("  �  ");

    final DateText toDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
    date.setLastDayOfMonth();
    toDateText.setValue(date.getDate());
    toDateText.setLayoutData(gridData);

    createModifyValidatorDateText(fromDateText, toDateText);

    Button filterByDate = new Button(buttonsComposite, SWT.NONE);
    filterByDate.setText("Filtrar");
    filterByDate.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if (checkIffromDateIsAftertoDate(fromDateText.getText(), toDateText.getText())){
          setErrorMessage("A data Inicial deve ser menor que a data Final!");
        }else{
          setErrorMessage("");
          incomingTable.setFromDate(new GDDate(fromDateText.getText()));
          incomingTable.setToDate(new GDDate(toDateText.getText()));
          incomingTable.updateTable();
        }
      }
    });

    Label separator = new Label(buttonsComposite, SWT.NONE);
    separator.setText("  |   ");

    Button incomingAccount = new Button(buttonsComposite, SWT.NONE);
    incomingAccount.setText("Receber conta");
    incomingAccount.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        TableItem[] item = incomingTable.getAccountTableTree().getSelection();
        String idBill = item[0].getText(0);
        GDDate paymentDayBill = new GDDate(item[0].getText(1));
        if (incomingTable.getAccountTableTree().getSelectionCount() > 0) {
          try {
            Incoming incoming = (Incoming) system.query(new GetIncoming(idBill));
            if (incoming.getNextPaymentDate().beforeDay(paymentDayBill)) {
              MessageBox messageBox = new MessageBox(mainScreen.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    data.bottom = new FormAttachment(100, -6);
    buttonsComposite.setLayoutData(data);
  }

  private void createIncomingTable(Composite composite) {
    fromDate = new GDDate();
    fromDate.setFirstDayOfMonth();
    toDate = new GDDate();
    toDate.setLastDayOfMonth();

    incomingTable = new IncomingTable(composite, SWT.NONE, this, fromDate, toDate);

    FormData data = new FormData();
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    buttonsComposite.setLayout(new GridLayout(10, false));

    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    buttonsComposite.setLayoutData(gridData);

    GDDate date = new GDDate();

    final DateText fromDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
    date.setFirstDayOfMonth();
    fromDateText.setValue(date.getDate());
    gridData = new GridData();
    gridData.widthHint = 80;
    fromDateText.setLayoutData(gridData);

    Label label = new Label(buttonsComposite, SWT.NONE);
    label.setText("  �  ");

    final DateText toDateText = new DateText(buttonsComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
    date.setLastDayOfMonth();
    toDateText.setValue(date.getDate());
    toDateText.setLayoutData(gridData);

    createModifyValidatorDateText(fromDateText, toDateText);

    Button filterByDate = new Button(buttonsComposite, SWT.NONE);
    filterByDate.setText("Filtrar");
    filterByDate.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if (checkIffromDateIsAftertoDate(fromDateText.getText(), toDateText.getText())){
          setErrorMessage("A data Inicial deve ser menor que a data Final!");
        }else{
          setErrorMessage("");
          expendituresTable.setFromDate(new GDDate(fromDateText.getText()));
          expendituresTable.setToDate(new GDDate(toDateText.getText()));
          expendituresTable.updateTable();
        }
      }
    });

    Label separator = new Label(buttonsComposite, SWT.NONE);
    separator.setText("  |   ");

    Button payAccount = new Button(buttonsComposite, SWT.NONE);
    payAccount.setText("Pagar conta");
    payAccount.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if (expendituresTable.getAccountTableTree().getSelectionCount() > 0) {
          TableItem[] item = expendituresTable.getAccountTableTree().getSelection();
          String idBill = item[0].getText(0);
          GDDate paymentDayBill = new GDDate(item[0].getText(1));
          try {
            Expenditure expenditure = (Expenditure) system.query(new GetExpenditures(idBill));
            if (expenditure.getNextPaymentDate().beforeDay(paymentDayBill)) {
              MessageBox messageBox = new MessageBox(mainScreen.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
              messageBox.setMessage("Existem Parcelas anteriores em aberto.\nDeseja efetuar o pagamento da parcela vencida?");
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

      }
    });
  }

  private boolean checkIffromDateIsAftertoDate(String fromDate, String toDate) {
    if (new GDDate(fromDate).afterDay(new GDDate(toDate))) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    fixedValue.clearSelection();
    observation.setText("");
  }

  private void createExpendituresTable(Composite composite) {
    fromDate = new GDDate();
    fromDate.setFirstDayOfMonth();
    toDate = new GDDate();
    toDate.setLastDayOfMonth();

    expendituresTable = new ExpendituresTable(composite, SWT.NONE, this, fromDate, toDate);

    FormData data = new FormData();
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.