Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.RegistrationStatus


   
    protected void buttonPressed(int buttonId) {
        if (buttonId == OK) {
            if(!comboTree.getText().equals("")) {
              try {
                RegistrationStatus status = (RegistrationStatus) system.query(new GetRegistrationStatusByMotive(comboTree.getText()));
               
                MessageBox messageBox = new MessageBox(getShell(), SWT.ICON_QUESTION|SWT.YES|SWT.NO|SWT.CANCEL);
                messageBox.setMessage("Deseja excluir as parcelas em aberto?");
                messageBox.setText("Alerta Gerente Digital!");
                int result = messageBox.open();
               
                if(result != SWT.CANCEL) {
                  try {
                    //Adicionado o �ltimo parametro indicando se o usu�rio clicou em sim ou n�o
                    system.execute(new EndRegistration(registrationId, comboTree.getText(), getCourseList(), new GDDate(), Integer.parseInt((String) gd.get("fineContract")), system.getLogged(), (status.getCategory().equals("Desistiu") ? false : !(result == SWT.YES)), result == SWT.YES ? true : false));
            } catch (TransactionDateException e) {
              setErrorMessage(MessageConstants.TRANSACTION_DATE_EXCEPTION);
            }
                }
               
View Full Code Here


    }
       
    private boolean checkStatus(String status, List<String> statusList){
        for (String statusTemp : statusList) {
            try {
                RegistrationStatus registrationStatus = (RegistrationStatus) system.query(new GetRegistrationStatusByMotive(statusTemp));
                if (registrationStatus.getCategory().equals(status)) {
                    return true;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
View Full Code Here

        this.category = category;
        this.motives = motives;
    }

    public void execute(PrevalentSystem system) throws BusinessException {
        system.getRegistrationStatus().put(category, new RegistrationStatus(category, motives));
    }
View Full Code Here

      registration.setActive(false);
      registration.setEndDate(gdDateEndDate);
      registration.addStatus(registrationStatus);
      registration.setEndRegistrationEmployee(system.getPeople().get(employeeId));
      RegistrationStatus status = getRegistrationStatus(system);

      if(!noChangeParcels){
        List<Parcel> parcels = registration.getParcels();
        GDDate dateLastParcel = new GDDate();
        int i = 0;
      while (parcels.get(i).isPayed()) {
        i++;
      }
      Parcel lastParcel = parcels.get(i);
             
      dateLastParcel.setDayOfMonth((int) new GDDate(lastParcel.getDate()).getDayOfMonth());
      dateLastParcel.setMonthOfYear((int) new GDDate().getMonth());
        // Foi adicionado pois verifica se o usuario clicou em SIM ou NAO para remover parcelas existentes
        if (option){
          registration.setParcels(removeParcelsWhenRegistrationIsEnded(gdDateEndDate.getCalendar(), registration.getParcels(), system));
          //if (registration.getParcels().size()>0){
            dateLastParcel = new GDDate(registration.getParcel(registration.getParcels().size()-1).getDate());
            dateLastParcel.addMonth(1);
        //  }
         
        }
        if(status.getCategory().equals("Desistiu")) {
//          GDDate date;
//          if (registration.getParcels().size()==0){
//            date = new GDDate();
//          }else{
//            date = new GDDate(registration.getParcels().get(i).getDate());
View Full Code Here

TOP

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

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.