Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Account


                    expenditure.setActive(false);
                   
                    Money money = new Money(linkedOperation.getOperation().getValue());
                    GDDate date = new GDDate(linkedOperation.getOperation().getDateTime());
                   
                    Account account = system.accounts.get(accountId);
                   
                    Operation operation = new Operation(id, account, expenditure.getCategoryId(), date, expenditure. getDescription(), money.getFloatValue());
                    system.operations.put(id, operation);
                   
                    bill.skip();
View Full Code Here


        }
        id = String.valueOf(Integer.parseInt(id) + 1);
      }
       
        if(personId == null) {
            account = new Account(id, name, openDate, numberofAccount, responsableName, dateOfOpen, bankId, bankName, agencyName, agencyAddress, agencyphone, agencyManager, limit);
        } else {
            account = new Account(id, name, openDate, system.getPeople().get(personId));
        }
        account.setAmount(initialAmount);
        system.getAccounts().put(id, account);
       
        return account;
View Full Code Here

        paymentExpenditureAccountCombo.setLayoutData(data);
       
        paymentExpenditureAccountCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        try {
          Account account = (Account) system.query(new GetAccountByName(paymentExpenditureAccountCombo.getText()));
          paymentTypeCombo.update(account);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
View Full Code Here

            Money paidTotal = getPaidTotal();
           
            try {
              if(!paymentExpenditureAccountCombo.getText().equals("Selecione uma conta...")) {
                if(paidDate.isToday()) {
                  Account accountDestiny = (Account) system.query(new GetAccountByName(paymentExpenditureAccountCombo.getText()));
                  if((system.getRegisterMachine() != null ? paymentExpenditureAccountCombo.getText().equals(system.getRegisterMachine().getName()) : false) || accountDestiny.isBankAccount()){
                    if(accountDestiny.isBankAccount()) {
                      if((accountDestiny.getLimit().getFloatValue() + accountDestiny.getAmount().getFloatValue()) >= paidTotal.getFloatValue()) {
                        new MoneyTransaction().expendituresPayment(getExpenditureId(), getAccountId(), paidDate, paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                        GDWindowControl.getInstance().updateControlCenter();
                        close();
                      } else {
                        setErrorMessage("N�o existe saldo suficiente para efetuar a transa��o.");
                      }
                    } else {
                      new MoneyTransaction().expendituresPayment(getExpenditureId(), getAccountId(), paidDate, paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                      GDWindowControl.getInstance().updateControlCenter();
                      close();
                    }
                  } else {
                    ConfirmUserAndPasswordDialog dialog = new ConfirmUserAndPasswordDialog(getShell(), ((User)accountDestiny.getPerson().getPersonType("user")));
                        dialog.open();
                       
                        if(dialog.isCheckPassword()) {
                          new MoneyTransaction().expendituresPayment(getExpenditureId(), getAccountId(), paidDate, paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                          GDWindowControl.getInstance().updateControlCenter();
                            close();
                        }
                  }
                } else {
                  if(MessageDialog.openQuestion(getShell(), "Data invalida!", "A data '"+ paymentExpenditureDateText.getText() +"' � uma data diferente da atual, deseja efetuar a opera��o mesmo assim?")){
                    Account accountDestiny = (Account) system.query(new GetAccountByName(paymentExpenditureAccountCombo.getText()));
                    if((system.getRegisterMachine() != null ? paymentExpenditureAccountCombo.getText().equals(system.getRegisterMachine().getName()) : false) || accountDestiny.isBankAccount()){
                      new MoneyTransaction().expendituresPayment(getExpenditureId(), getAccountId(), paidDate, paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                      close();
                    } else {
                      ConfirmUserAndPasswordDialog dialog = new ConfirmUserAndPasswordDialog(getShell(), ((User)accountDestiny.getPerson().getPersonType("user")));
                          dialog.open();
                         
                          if(dialog.isCheckPassword()) {
                            new MoneyTransaction().expendituresPayment(getExpenditureId(), getAccountId(), paidDate, paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                              close();
View Full Code Here

    this.accountId = accountId;
  }

  @Override
  protected void execute(PrevalentSystem system) throws BusinessException {
    Account account = (Account) system.accounts.get(accountId);
    account.setAmount(new Money(amount));
  }
View Full Code Here

        paymentAccountCombo.setLayoutData(data);
       
        paymentAccountCombo.addListener(SWT.Modify, new Listener(){
            public void handleEvent(Event arg0) {
                try {
                    Account account = (Account) system.query(new GetAccountByName(paymentAccountCombo.getText()));
                    passwordText.setEnabled((account.getPerson() == null)? (false) : (true));
                    if(account.getPerson() == null){
                        passwordText.setEnabled(false);
                    }else{
                        passwordText.setEnabled(true);
                        User user = (User) account.getPerson().getPersonType("user");
                        personPassword = user.getPassword();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
View Full Code Here

TOP

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

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.