Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Account


       
        TableItem[] items = accountsTable.getItems();
        for (TableItem item : items) {
            if(item.getChecked()) {
                try {
                    Account account = (Account) system.query(new GetAccountByName(item.getText()));
                    accountsMap.put(account.getId(), account);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
View Full Code Here


      text = new PaymentMoney().getType();
    }else{
      if(operation.getPaymentType().getType().equals("Dep�sito em Conta")){
        try {
          PaymentBankAccountPayed paymentBank = (PaymentBankAccountPayed) operation.getPaymentType();
          Account account = (Account) system.query(new GetAccounts(paymentBank.getAccountId()));
          text = "Dep�sito na conta "+account.getName();
        } catch (Exception e) {
          logger.error("GetAccounts Exception: ",e);
        }
      }else{
        text = operation.getPaymentType().getType();
View Full Code Here

    this.limit = limit;
  }

  @Override
  protected Object executeAndQuery(PrevalentSystem system) {
    Account account = system.getAccounts().get(accountId);
    account.setName(accountName);
   
    if(bankAgencyAddress != null) {
      account.setAgencyAddress(bankAgencyAddress);
      account.setAgencyManager(bankAgencyManager);
      account.setAgencyPhone(bankAgencyPhone);
      account.setResponsableName(responsableAccountName);
      account.setLimit(limit);
    }
    return account;
  }
View Full Code Here

                    List<Account> accounts = (List<Account>) system.query(new GetBankAccountsByNumber(accountNumber));
                    if(accounts.size() > 1){
                      ChooseAccountImportExtractBankItemDialog dialog = new ChooseAccountImportExtractBankItemDialog(mainScreen.getShell(), accounts);
                      dialog.open();
                      if(dialog.getReturnCode() == TitleAreaDialog.OK){
                        Account account = (Account) system.query(new GetAccountByName(dialog.getAccountName()));
                        accountId = Integer.parseInt(account.getId());
                      }else{
                        isCancel = true;
                      }
                    } else if (accounts.size() == 1) {
                      Account account = accounts.get(0);
                      accountId = Integer.parseInt(account.getId());
                    } else {
                      MessageBox box = new MessageBox(getDisplay().getShells()[0], IMessageProvider.WARNING);
                      box.setText("Alerta Gerente Digital!");
                      box.setMessage("A conta "+accountNumber+" n�o est� cadastrada no Gerente Digital.");
                      box.open();
View Full Code Here

            public void handleEvent(Event arg0) {
                TableItem[] itens = accountsTable.getSelection();
                if (itens.length > 0) {
                  try {
                    String nameAccount = accountsTable.getSelection()[0].getText(1);
            Account account = (Account) system.query(new GetAccountByName(nameAccount));
            new AccountDialog(getParent().getShell(), getMySelf(), account).open();
          } catch (Exception e) {
            logger.error("GetAccountByName Exception: ", e);
          }
                }else{
                    setErrorMessage("Voc� deve selecionar uma conta para editar.");
                }
            }
        });

        data = new FormData();
        data.top = new FormAttachment(addAccountButton, 5);
        data.right = new FormAttachment(100, -10);
        data.width = 80;
        editAccountButton.setLayoutData(data);

        transferAccountButton = new Button(area.getComponentsComposite(), SWT.PUSH);
        transferAccountButton.setText("Transfer�ncia");
        transferAccountButton.setEnabled(system.hasAccess("Transfer�ncia de Contas"));
        transferAccountButton.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                try {
                    TableItem[] itens = accountsTable.getSelection();
                    if (itens.length > 0) {
                        Account account = (Account) system.query(new GetAccountByName(accountsTable.getSelection()[0].getText(1)));
                        if(account.isActive())
                            new TransferBetweenAccountsDialog(getParent().getShell(), getMySelf(), accountsTable.getSelection()[0].getText(0)).open();
                        else
                            setErrorMessage("Voc� deve selecionar uma conta ativa.");
                    }else{
                        setErrorMessage("Selecione uma conta para efetuar uma transfer�ncia.");
                    }
                } catch (Exception e) {
                    logger.error("GetAccountByName exception: ", e);
                }
            }
        });

        data = new FormData();
        data.top = new FormAttachment(editAccountButton, 5);
        data.right = new FormAttachment(100, -10);
        data.width = 80;
        transferAccountButton.setLayoutData(data);
       
        extractAccountButton = new Button(area.getComponentsComposite(), SWT.PUSH);
        extractAccountButton.setText("Movimenta��o");
        extractAccountButton.setEnabled(system.hasAccess("Movimenta��o de Contas"));
       
        extractAccountButton.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                try {
                    Account account = (Account) system.query(new GetAccountByName(accountsTable.getSelection()[0].getText(1)));
                    GDWindowControl.getInstance().openFlowBankAccountControlCenter(account);
                } catch (Exception e) {
                    logger.error("GetAccountByName Exception: ",e);
                }
            }
View Full Code Here

        });
       
        accountsTable.addListener(SWT.Selection, new Listener(){
            public void handleEvent(Event arg0) {
                try {
                    Account selectedAccount = (Account) system.query(new GetAccountByName(accountsTable.getSelection()[0].getText(1)));
                    extractAccountButton.setEnabled((selectedAccount.isBankAccount()));
                } catch (Exception e) {
                   logger.error("GetAccountByName Exception: ",e);
                }
            }
        });
View Full Code Here

   
    @SuppressWarnings("unchecked")
  public void setChecked(TableItem item) {
        try {
          Person userLogged = system.getLogged();
          Account accountThisUser = null;
          Map <String, Account> accounts = (Map<String, Account>) system.query(new GetAccounts());
          for (Account account : accounts.values()) {
            if(!account.isBankAccount()){
              if(account.getPerson().getId().equals(userLogged.getId())){
                accountThisUser = account;
View Full Code Here

      private void createParcelsMap(Person person, Parcel parcel, int index, int numberOfParcel, boolean isActive, String idRegistration) {
          float value;
          String numberOfParcelStr = "";

          value = new Money(parcel.getPayValue()).getFloatValue();
          Account account = null;
      try {
        account = (Account) system.query(new GetAccountByPersonId(parcel.getIdPersonReceived()));
      } catch (Exception e1) {
        e1.printStackTrace();
      }
View Full Code Here

    private List<Account> getChecked(List<Account> accounts) {
        List<Account> checkedAccount = new ArrayList<Account>();
        for (int x = 0; x < accountTable.getItemCount(); x++) {
            TableItem item = accountTable.getItem(x);
            if (item.getChecked()) {
                Account acount = accounts.get(x);
                checkedAccount.add(acount);
            }
        }
        return checkedAccount;
    }
View Full Code Here

    protected void buttonPressed(int buttonId) {
        if (buttonId == OK) {
            try {
                if (account == null) {
                    if ((!amountText.getText().equals("")) && (!accountNameText.getText().equals(""))) {
                        Account newAccount = null;
                        if (bankAccountRadio.getSelection()) {
                            String numberofAccount = (numberOfAccountText.getText() == null)
                                    ? ""
                                    : numberOfAccountText.getText();
                            String responsableName = (responsableAccountNameText.getText() == null)
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.