Examples of GD


Examples of br.com.visualmidia.GD

    }
   
    @Override
    public boolean performOk() {
        if(this.isControlCreated()) {
            GD gd = GD.getInstance();
           
            gd.set("checkForUpdateEvery", getDays());
           
            if(!((String) GD.getInstance().get("checkForUpdateEvery")).equals(getDays())) {
                GDDate nextUpdateDate = new GDDate();
                nextUpdateDate.addDays(Integer.parseInt(getDays()));
   
                gd.set("nextUpdateDate", nextUpdateDate);
            } else {
                gd.set("nextUpdateDate", gd.get("nextUpdateDate"));
            }
        }
       
        return true;
    }
View Full Code Here

Examples of br.com.visualmidia.GD

    }
   
    @Override
    public boolean performOk() {
        if(this.isControlCreated()) {
            GD gd = GD.getInstance();
           
            gd.set("fine", getFine());
            gd.set("fineContract", getFineForContract());
            gd.set("gracedays", getGraceDays());
            gd.set("interestDeferredPayment", getInterestDeferredPayment());
            gd.set("pontualityDiscount", getPontualityDiscount());
            gd.set("registrationTax", getRegistrationTax());
        }
       
        return true;
    }
View Full Code Here

Examples of br.com.visualmidia.GD

    }
   
    @Override
    public boolean performOk() {
        if(this.isControlCreated()) {
            GD gd = GD.getInstance();
           
            gd.set("username", getUserName());
            gd.set("password", getPassword());
        }
       
        return true;
    }
View Full Code Here

Examples of br.com.visualmidia.GD

  private JRBasePrintLine line;
  private JRDesignStyle titleStyle;
   
    @SuppressWarnings("unchecked")
  public JasperPrint getJasperPrint(int type, GDDate initialDate, GDDate finalDate) throws JRException {
        GD gd = GD.getInstance();
       
        Map<String, Registration> registrations = new HashMap<String, Registration>();
        GDDate today = new GDDate();
       
        String letterText = "";
        if(type == 1) {
            letterText = "\n\nA "+ gd.get("namefancy") + ",  para  poder  estar" +
            "  sempre  oferecendo  a  melhor qualidade  de  ensino  para  seu  aprendizado  e   prepar�-lo  para  que" +
            "  seja  o  melhor  no  Mercado de Trabalho, conta muito com Voc�. \n\nEm vista disto, estamos comunicando que," +
            " at� a data  da emiss�o  deste  comunicado,  nossos cadastros n�o acusam o pagamento de sua mensalidade." +
            " \n\nPor favor, entre em contato conosco, o mais breve poss�vel, para posterior pagamento ou satisfa��o a respeito." +
            "\n\nCertos de sua compreens�o.\n\nAtenciosamente,";
        } else if(type == 2) {
            letterText = "\n\nConstatamos que  sua mensalidade ainda continua em aberto, lamentamos a n�o observa��o do nosso contrato." +
            "\n\n N�s fazemos quest�o de t�-lo como nosso cliente, por isso, estamos abertos a negociar a mensalidade em atraso." +
            "\n\nPara que n�o ocorra eventuais transtornos e evitar que nosso Advogado tome a frente da negocia��o, inclusive," +
            " as medidas legais cab�veis com rela��o ao seu Contrato (o qual voc� possui uma via) e Nota Promiss�ria que est� em nosso poder," +
            " pedimos o seu comparecimento em at� 4 dias para solu��o.\n\nCertos de sua compreens�o.";
        } else if(type == 3) {
            letterText = "Informamos, que face o n�o atendimento em decorr�ncia das diversas tentativas, para receber seu d�bito com a nossa escola," +
                    " seu Contrato e Nota Promiss�ria est�o em posse de nossos Advogados e ser� dada entrada do seu nome ao SPC, sendo que todas as despesas" +
                    " processuais ficar�o por sua conta, ocasionando aborrecimentos para sua pessoa. " +
                    "\n\nDiante tal situa��o e com a finalidade de evitar a continuidade no processo, nossos Advogados prop�e a sua presen�a em nossa escola " +
                    "dentro do prazo de 10 dias a partir do recebimento desta no hor�rio de atendimento de segunda � sexta das 08:00h �s 17h; e aos s�bados das" +
                    " 08:00h �s 12:00h para que seja estudado uma �ltima negocia��o que possa ser vi�vel para voc�.";
        }
       
        //JasperPrint
        jasperPrint = new JasperPrint();
        jasperPrint.setName("Aniversariantes");
        jasperPrint.setOrientation(JasperReport.ORIENTATION_PORTRAIT);
        jasperPrint.setPageWidth(convert(210));
        jasperPrint.setPageHeight(convert(297));
       
        //Fonts
        titleStyle = new JRDesignStyle();
        titleStyle.setName("Arial_Title");
        titleStyle.setDefault(true);
        titleStyle.setBold(true);
        titleStyle.setFontName("Arial");
        titleStyle.setFontSize(18);
        titleStyle.setPdfFontName("Helvetica");
        titleStyle.setPdfEncoding("Cp1252");
        titleStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(titleStyle);
       
        normalStyle = new JRDesignStyle();
        normalStyle.setName("Arial_Normal");
        normalStyle.setDefault(true);
        normalStyle.setFontName("Arial");
        normalStyle.setFontSize(12);
        normalStyle.setPdfFontName("Helvetica");
        normalStyle.setPdfEncoding("Cp1252");
        normalStyle.setLineSpacing((byte)(2));
        normalStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(normalStyle);
       
        JRDesignStyle bodyStyle = new JRDesignStyle();
        bodyStyle.setName("Arial_Body");
        bodyStyle.setDefault(true);
        bodyStyle.setFontName("Arial");
        bodyStyle.setFontSize(15);
        bodyStyle.setPdfFontName("Helvetica");
        bodyStyle.setPdfEncoding("Cp1252");
        bodyStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(bodyStyle);
       
        miniStyle = new JRDesignStyle();
        miniStyle.setName("Arial_Mini");
        miniStyle.setDefault(true);
        miniStyle.setFontName("Arial");
        miniStyle.setFontSize(10);
        miniStyle.setPdfFontName("Helvetica");
        miniStyle.setPdfEncoding("Cp1252");
        miniStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(miniStyle);
       
        boldStyle = new JRDesignStyle();
        boldStyle.setName("Arial_Bold");
        boldStyle.setDefault(true);
        boldStyle.setFontName("Arial");
        boldStyle.setFontSize(12);
        boldStyle.setBold(true);
        boldStyle.setPdfFontName("Helvetica");
        boldStyle.setPdfEncoding("Cp1252");
        boldStyle.setPdfEmbedded(false);
        jasperPrint.addStyle(boldStyle);

       
        try {
          Student student = null;
            String name = "";
          JRPrintPage page = new JRBasePrintPage();
           
            registrations = (Map<String, Registration>) system.query(new GetRegistration());
            List<Registration> registrationList = new ArrayList<Registration>(registrations.values());
           
            MergeSortAlgorithm sortAlgorithm = new MergeSortAlgorithm();
            sortAlgorithm.sortRegistrationByName(registrationList);
           
            for (Registration registration : registrationList) {
                final List<Parcel> parcels = registration.getParcels();
                for (Parcel parcel : parcels) {
                    final GDDate parcelDate = new GDDate(parcel.getDate());
                    if(!parcel.isPayed() && parcelDate.beforeOrEqualsDay(today) && parcelDate.beforeOrEqualsDay(finalDate) && parcelDate.afterOrEqualsDay(initialDate)){
                       final GDDate birthDate = new GDDate(registration.getStudent().getBirthDate());
                       String gender = ((Person) system.query(new GetPerson(registration.getIdPerson()))).getGender().toString();
                       if(ResponsableValidator.checkStudentUnderAge(birthDate.getFormatedDate())){
                            student = (Student) registration.getStudent().getPersonType("student");
                            name = "Prezado(a) "+student.getResponsableName()+",\n" +
                                "referente "+(gender.equals("Masculino")?"ao aluno ":"� aluna ") + registration.getStudent().getName()+"\n"+
                                "com parcela vencida no dia "+parcelDate.getFormatedDate();
                        } else {
                            name = "Prezad"+(gender.equals("Masculino")?"o ":"a ")+registration.getStudent().getName()+",\n" +
                                    "com parcela vencida no dia "+parcelDate.getFormatedDate();
                        }
                       posX = convert(10);
                       posY = 0;
                       page = new JRBasePrintPage();
                      
                       page.addElement(printMiniText("Remetente: ", posX, posY+10, 60, 12));
                       page.addElement(printImage("corporateLogo.jpg", posX+60, posY+10, 77, 40));
                       page.addElement(printLeftText((String) gd.get("street") + ", " + (String) gd.get("streetnumber"), posX, posY+55, 240, 12));
                       page.addElement(printLeftText((String) gd.get("zipcode") + " - " + gd.get("city") + " - " + gd.get("state"), posX, posY+67, 240, 12));
                       page.addElement(drawVerticalLine(posX+240, posY, 84));
                      
                       page.addElement(printMiniText("Destinat�rio: ", posX+245, posY+10, 60, 12));
                       page.addElement(printLeftText((ResponsableValidator.checkStudentUnderAge(birthDate.getFormatedDate()) ? student.getResponsableName() : registration.getStudent().getName()), posX+245, posY+30, 290, 12));
                       String address = registration.getStudent().getStreet() + ", " + registration.getStudent().getStreetNumber() + (registration.getStudent().getStreetComplement().equals("") ? "" : " - " + registration.getStudent().getStreetComplement());
                       page.addElement(printLeftText(address, posX+245, posY+42, 290, 12));
                       page.addElement(printLeftText(registration.getStudent().getNeighborhood(), posX+245, posY+54, 290, 12));
                       page.addElement(printLeftText(registration.getStudent().getCep() + " - " + registration.getStudent().getCity() + " - " + registration.getStudent().getState(), posX+245, posY+66, 290, 12));
                      
                       posY += 84;
                      
                       page.addElement(drawHorizontalDottedLine(0, posY, convert(210)));
                      
                       posY += 10;
                      
                       page.addElement(printImage("juridicobkg.gif", convert(10), posY, 535, 700));
                       page.addElement(printRightText(gd.get("city") + ", " + new SimpleDateFormat("dd").format(new GDDate().getDate()) + " de " + new SimpleDateFormat("MMMM").format(new GDDate().getDate()) + " de " + new SimpleDateFormat("yyyy").format(new GDDate().getDate()) + ".", convert(10), posY+60, 535));
                      
                       posY += 50;
                      
                       if(type == 1) {
                         page.addElement(printJustifyText(name + letterText, convert(10)+10, posY, 515, 390));
                         page.addElement(printHorizontalLine(convert(10)+320, posY+430, 190));
                         page.addElement(printBoldText("Depto de Cr�dito e Cobran�a", convert(10)+320, posY+430, 190, 18));
                         page.addElement(printMiniText("Obs.: Caso j� tenha efetuado o\n pagamento, desconsidere este aviso.", convert(10)+8, posY+535, 200, 40));
                       } else if(type == 2) {
                         page.addElement(printJustifyText(name + letterText, convert(10)+10, posY, 515, 390));
                         page.addElement(printHorizontalLine(convert(10)+320, posY+430, 190));
                         page.addElement(printBoldText("Depto de Cr�dito e Cobran�a", convert(10)+320, posY+430, 190, 18));
                       } else if(type == 3) {
                         page.addElement(printNormalText(name, convert(10)+10, posY+5, 515, 50));
                         page.addElement(printBoldText("C O M U N I C A D O \nO F I C I A L", convert(10)+10, posY+65, 515, 36));
                         page.addElement(printJustifyText(letterText, convert(10)+10, posY+110, 515, 350));
                         page.addElement(printHorizontalLine(convert(10)+320, posY+500, 190));
                         page.addElement(printBoldText("Depto de Cr�dito e Cobran�a", convert(10)+320, posY+500, 190, 18));
                         page.addElement(printRectangle(convert(10)+25, posY+370, 485, 85, 5));
                         page.addElement(printLeftBoldText("1� Via Aluno\n2� Via Advogado (anexado ao  processo)\n\n(� indispens�vel a apresenta��o desta para confirmar a negocia��o)", convert(10)+35, posY+380, 415, 65));
                       }
                      
                       page.addElement(printMiniText(gd.get("namefancy") + "\n" +
                           gd.get("street") + ", "  +gd.get("streetnumber") + "\n" +
                           "Tel.:" + gd.get("firstphone") + "\n" + gd.get("email"), convert(10)+315, posY+525, 215, 60));
                       jasperPrint.addPage(page);
                       page = new JRBasePrintPage();
                    }
                }
            }           
View Full Code Here

Examples of br.com.visualmidia.GD

                    });

                    String receive = communicate.receive();
                    if (receive.equals("403")) {
                        GDSystem system = GDSystem.getInstance();
                        GD gd = GD.getInstance();
                        communicate.sendObject(new Autentication((String) gd.get("username"), (String) gd.get("password"), (String) gd.get("serialnumber") ));
                        if(communicate.receive().equals("404")) {
                            Vader vader = (Vader) communicate.receiveObject();
                           
                            system.execute(new AddDarkSide(vader));
                            updateComposite.getDisplay().syncExec(new Runnable() {
View Full Code Here

Examples of br.com.visualmidia.GD

    GDSystem system = GDSystem.getInstance();
    registrationMap = system.getRegistratioMap();

    this.mainScreen = mainScreen;

    GD gd = GD.getInstance();
    startWorkTime = gd.getWorktime("start");
    endWorkTime = gd.getWorktime("end");
  }
View Full Code Here

Examples of br.com.visualmidia.GD

    public RegistrationMapReport() {
        period.add("Manh�");
        period.add("Tarde");
        period.add("Noite");
       
        GD gd = GD.getInstance();
        this.startWorkTime = gd.getWorktime("start");
        this.endWorkTime = gd.getWorktime("end");
        this.workDays = gd.getWorkDays();
       
    }
View Full Code Here

Examples of br.com.visualmidia.GD

        super(parent);
        this.date = date;
        GDSystem system = GDSystem.getInstance();
        this.registrationMap = system.getRegistratioMap();
       
        GD gd = GD.getInstance();
        this.startWorkTime = gd.getWorktime("start");
        this.endWorkTime = gd.getWorktime("end");
        this.isReplacement = isReplacement;
       
        try {
            this.registration = (Registration) system.query(new GetRegistration(idRegistration));
        } catch (Exception e) {
View Full Code Here

Examples of br.com.visualmidia.GD

      weekDays.add("Quinta");
      weekDays.add("Sexta");
      weekDays.add("S�bado");
      weekDays.add("Domingo");
     
      GD gd = GD.getInstance();
        int startWorkTime = gd.getWorktime("start");
        int endWorkTime = gd.getWorktime("end");
      RegistrationMap registrationMap = system.getRegistratioMap();
      for (int i = 1; i <= weekDays.size() ; i++) {
      for (int hour = startWorkTime; hour <= endWorkTime; hour++) {
        GDDate date = new GDDate();
        date.setWeekDay(i);
View Full Code Here

Examples of br.com.visualmidia.GD

          changedDays.addAll(scheduleItem.getChangedDays());
          if(numberOfComputers == 0){
            numberOfComputers = classRoom.getComputers().size();
          }
        } else if(numberOfComputers > 0){
        GD gd = GD.getInstance();
        int startWorkTime = gd.getWorktime("start");
        int endWorkTime = gd.getWorktime("end");
       
        for (int contWeekDay = 1; contWeekDay <= 7; contWeekDay++) {
          for (int hour = startWorkTime; hour <= endWorkTime; hour++) {
            String item = hour + "-" + contWeekDay;
           
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.