Package org.openswing.swing.message.receive.java

Examples of org.openswing.swing.message.receive.java.Response


    ArrayList oldList = ((ArrayList[])inputPar)[0];
    ArrayList newList = ((ArrayList[])inputPar)[1];
    try {

      Employees bean = (Employees)JAIOBeanFactory.getInstance().getBean(Employees.class);
      Response answer = bean.updateEmployeeCalendars(((ArrayList[])inputPar)[0],((ArrayList[])inputPar)[1],((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here


    else if (clientLanguageCodeComboBox.getSelectedIndex()==5)
      dbConnVO.setClientLanguageCode("HR");
    else
      dbConnVO.setClientLanguageCode("RU");
    dbConnVO.setAdminPassword(adminPasswdTF.getText().trim());
    Response response = ClientUtils.getData("createConfigFile",dbConnVO);
    if (response.isError()) {
      JOptionPane.showMessageDialog(
          this,
          response.getErrorMessage(),
          "Error",
          JOptionPane.ERROR_MESSAGE
      );
      return false;
    }
View Full Code Here

    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
    map.put(ApplicationConsts.FUNCTION_CODE_SYS06,"ACC06_BUDGET");
    map.put(ApplicationConsts.EXPORT_PARAMS,params);
    Response res = ClientUtils.getData("getJasperReport",map);
    if (!res.isError()) {
      JasperPrint print = (JasperPrint)((VOResponse)res).getVo();
      JRViewer viewer = new JRViewer(print);
      JFrame frame = new JFrame();
      frame.setSize(MDIFrame.getInstance().getSize());
      frame.setContentPane(viewer);
      frame.setTitle(this.getTitle());
      frame.setIconImage(MDIFrame.getInstance().getIconImage());
      frame.setVisible(true);
    } else JOptionPane.showMessageDialog(
        ClientUtils.getParentFrame(this),
        res.getErrorMessage(),
        ClientSettings.getInstance().getResources().getResource("print budget"),
        JOptionPane.ERROR_MESSAGE
      );
  }
View Full Code Here

                                    JOptionPane.YES_NO_OPTION)!=JOptionPane.YES_OPTION)
       return;

      ScheduledActivityVO vo = (ScheduledActivityVO) form.getVOModel().getValueObject();

      Response res = ClientUtils.getData("closeScheduledActivity", vo);
      if (res.isError()) {
        JOptionPane.showMessageDialog(
            ClientUtils.getParentFrame(this),
            ClientSettings.getInstance().getResources().getResource(res.getErrorMessage()),
            ClientSettings.getInstance().getResources().getResource("Error"),
            JOptionPane.ERROR_MESSAGE
        );
      }
      else {
View Full Code Here

  /**
   * Retrieve call-out types and fill in the call-out types combo box.
   */
  private void init() {
    Response res = ClientUtils.getData("loadCallOutTypes",new GridParams());
    Domain d = new Domain("CALL_OUT_TYPES");
    if (!res.isError()) {
      CallOutTypeVO vo = null;
      list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
        vo = (CallOutTypeVO)list.get(i);
        d.addDomainPair(vo.getProgressiveHie02SCH11(),vo.getDescriptionSYS10());
View Full Code Here

      values.add(pk.getCompanyCodeSys01REG04());
      values.add(pk.getProgressiveREG04());
      values.add(serverLanguageId);

      // read from SCH01 table...
      Response res = CustomizeQueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
          sql,
          values,
          attribute2dbField,
          DetailEmployeeVO.class,
          "Y",
          "N",
          null,
          true,
          customizedFields
      );

      if (!res.isError()) {
        DetailEmployeeVO vo = (DetailEmployeeVO)((VOResponse)res).getVo();

        // retrieve first+last name of manager...
        if (vo.getManagerProgressiveReg04SCH01()!=null) {
          pstmt = conn.prepareStatement("select NAME_1,NAME_2 from REG04_SUBJECTS where COMPANY_CODE_SYS01=? and PROGRESSIVE=?");
          pstmt.setString(1,vo.getManagerCompanyCodeSys01SCH01());
          pstmt.setBigDecimal(2,vo.getManagerProgressiveReg04SCH01());
          ResultSet rset = pstmt.executeQuery();
          if (rset.next()) {
            vo.setManagerName_1REG04(rset.getString(1));
            vo.setManagerName_2REG04(rset.getString(2));
          }
          rset.close();
        }

        // retrieve first+last name of assistant...
        if (vo.getAssistantProgressiveReg04SCH01()!=null) {
          pstmt2 = conn.prepareStatement("select NAME_1,NAME_2 from REG04_SUBJECTS where COMPANY_CODE_SYS01=? and PROGRESSIVE=?");
          pstmt2.setString(1,vo.getAssistantCompanyCodeSys01SCH01());
          pstmt2.setBigDecimal(2,vo.getAssistantProgressiveReg04SCH01());
          ResultSet rset = pstmt2.executeQuery();
          if (rset.next()) {
            vo.setAssistantName_1REG04(rset.getString(1));
            vo.setAssistantName_2REG04(rset.getString(2));
          }
          rset.close();
        }
      }


      Response answer = res;

      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOResponse)answer;
    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while fetching employee detail",ex);
      throw new Exception(ex.getMessage());
    }
View Full Code Here

      if (gridParams.getOtherGridParams().get(ApplicationConsts.TASK_CODE_REG07)!=null) {
        sql += " and SCH01_EMPLOYEES.TASK_CODE_REG07='"+gridParams.getOtherGridParams().get(ApplicationConsts.TASK_CODE_REG07)+"'";
      }

      // read from SCH01 table...
      Response answer = QueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
          sql,
          values,
          attribute2dbField,
          GridEmployeeVO.class,
          "Y",
          "N",
          null,
          gridParams,
          50,
          true
      );

      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOListResponse)answer;

    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while fetching employees list",ex);
      throw new Exception(ex.getMessage());
View Full Code Here

    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      bean.setConn(conn);

      // update REG04 table...
      Response res = bean.update(oldVO,newVO,t1,serverLanguageId,username);
      if (res.isError()) {
        throw new Exception(res.getErrorMessage());
      }

      HashSet pkAttrs = new HashSet();
      pkAttrs.add("companyCodeSys01SCH01");
      pkAttrs.add("progressiveReg04SCH01");

      HashMap attribute2dbField = new HashMap();
      attribute2dbField.put("companyCodeSys01SCH01","COMPANY_CODE_SYS01");
      attribute2dbField.put("progressiveReg04SCH01","PROGRESSIVE_REG04");
      attribute2dbField.put("employeeCodeSCH01","EMPLOYEE_CODE");
      attribute2dbField.put("phoneNumberSCH01","PHONE_NUMBER");
      attribute2dbField.put("officeSCH01","OFFICE");
      attribute2dbField.put("taskCodeReg07SCH01","TASK_CODE_REG07");
      attribute2dbField.put("divisionSCH01","DIVISION");
      attribute2dbField.put("emailAddressSCH01","EMAIL_ADDRESS");
      attribute2dbField.put("managerProgressiveReg04SCH01","MANAGER_PROGRESSIVE_REG04");
      attribute2dbField.put("assistantProgressiveReg04SCH01","ASSISTANT_PROGRESSIVE_REG04");
      attribute2dbField.put("salarySCH01","SALARY");
      attribute2dbField.put("levelSCH01","LEV");
      attribute2dbField.put("enabledSCH01","ENABLED");
      attribute2dbField.put("engagedDateSCH01","ENGAGED_DATE");
      attribute2dbField.put("dismissalDateSCH01","DISMISSAL_DATE");
      attribute2dbField.put("managerCompanyCodeSys01SCH01","COMPANY_CODE_SYS01_MAN_SCH01");
      attribute2dbField.put("assistantCompanyCodeSys01SCH01","COMPANY_CODE_SYS01_ASS_SCH01");


      res = new CustomizeQueryUtil().updateTable(
          conn,
          new UserSessionParameters(username),
          pkAttrs,
          oldVO,
          newVO,
          "SCH01_EMPLOYEES",
          attribute2dbField,
          "Y",
          "N",
          null,
          true,
          customizedFields
      );
      if (res.isError()) {
        throw new Exception(res.getErrorMessage());
      }

      return new VOResponse(newVO);
    }
    catch (Throwable ex) {
View Full Code Here


      GridParams gridParams = new GridParams();

      // read from SCH01 table...
      Response answer = QueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
          sql,
          values,
          attribute2dbField,
          GridEmployeeVO.class,
          "Y",
          "N",
          null,
          gridParams,
          true
      );

      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOListResponse)answer;

    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while validating employee code",ex);
      try {
View Full Code Here

      attribute2dbField.put("dismissalDateSCH01","DISMISSAL_DATE");
      attribute2dbField.put("managerCompanyCodeSys01SCH01","COMPANY_CODE_SYS01_MAN_SCH01");
      attribute2dbField.put("assistantCompanyCodeSys01SCH01","COMPANY_CODE_SYS01_ASS_SCH01");

      // insert into SCH01...
      Response res = CustomizeQueryUtil.insertTable(
          conn,
          new UserSessionParameters(username),
          vo,
          "SCH01_EMPLOYEES",
          attribute2dbField,
          "Y",
          "N",
          null,
          true,
          customizedFields
      );

      Response answer = new VOResponse(vo);


      // retrieve default company calendar settings...
      Response calRes = loadPars.loadCompanyParams(vo.getCompanyCodeSys01SCH01(),serverLanguageId,username);
      if (calRes.isError()) {
        throw new Exception(calRes.getErrorMessage());
      }
      CompanyParametersVO compCalVO = (CompanyParametersVO)((VOResponse)calRes).getVo();
      Calendar cal = Calendar.getInstance();
      cal.set(cal.DAY_OF_MONTH,1);
      cal.set(cal.MONTH,0);
      cal.set(cal.YEAR,0);
      cal.set(cal.HOUR_OF_DAY,8);
      cal.set(cal.MINUTE,0);
      cal.set(cal.SECOND,0);
      cal.set(cal.MILLISECOND,0);
      Timestamp morningStartHour = compCalVO.getMorningStartHourSCH02();
      if (morningStartHour==null)
        morningStartHour = new java.sql.Timestamp(cal.getTimeInMillis());
      Timestamp morningEndHour = compCalVO.getMorningStartHourSCH02();
      cal.set(cal.HOUR_OF_DAY,12);
      if (morningEndHour==null)
        morningEndHour = new java.sql.Timestamp(cal.getTimeInMillis());
      cal.set(cal.HOUR_OF_DAY,13);
      Timestamp afternoonStartHour = compCalVO.getMorningStartHourSCH02();
      if (afternoonStartHour==null)
        afternoonStartHour= new java.sql.Timestamp(cal.getTimeInMillis());
      cal.set(cal.HOUR_OF_DAY,17);
      Timestamp afternoonEndHour = compCalVO.getMorningStartHourSCH02();
      if (afternoonEndHour==null)
        afternoonEndHour = new java.sql.Timestamp(cal.getTimeInMillis());


      // insert employee calendar, according to the company calendar default settings...
      EmployeeCalendarVO calVO = new EmployeeCalendarVO();
      calVO.setCompanyCodeSys01SCH02(vo.getCompanyCodeSys01SCH01());
      calVO.setProgressiveReg04SCH02(vo.getProgressiveReg04SCH01());
      calVO.setMorningStartHourSCH02(DateUtils.setTime(morningStartHour));
      calVO.setMorningEndHourSCH02(DateUtils.setTime(morningEndHour));
      calVO.setAfternoonStartHourSCH02(DateUtils.setTime(afternoonStartHour));
      calVO.setAfternoonEndHourSCH02(DateUtils.setTime(afternoonEndHour));

      calVO.setDayOfWeekSCH02(String.valueOf(Calendar.MONDAY));
      ArrayList list = new ArrayList();
      list.add(calVO);


      calRes = calbean.insertEmployeeCalendars(list,serverLanguageId,username);
      if (calRes.isError()) {
          throw new Exception(calRes.getErrorMessage());
      }

      calVO.setDayOfWeekSCH02(String.valueOf(Calendar.TUESDAY));
      list.clear();
      list.add(calVO);
      calRes = calbean.insertEmployeeCalendars(list,serverLanguageId,username);
      if (calRes.isError()) {
        throw new Exception(calRes.getErrorMessage());
      }

      calVO.setDayOfWeekSCH02(String.valueOf(Calendar.WEDNESDAY));
      list.clear();
      list.add(calVO);
      calRes = calbean.insertEmployeeCalendars(list,serverLanguageId,username);
      if (calRes.isError()) {
        throw new Exception(calRes.getErrorMessage());
      }

      calVO.setDayOfWeekSCH02(String.valueOf(Calendar.THURSDAY));
      list.clear();
      list.add(calVO);
      calRes = calbean.insertEmployeeCalendars(list,serverLanguageId,username);
      if (calRes.isError()) {
        throw new Exception(calRes.getErrorMessage());
      }

      calVO.setDayOfWeekSCH02(String.valueOf(Calendar.FRIDAY));
      list.clear();
      list.add(calVO);
      calRes = calbean.insertEmployeeCalendars(list,serverLanguageId,username);
      if (calRes.isError()) {
        throw new Exception(calRes.getErrorMessage());
      }

      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOResponse)answer;
    }
    catch (Throwable ex) {
View Full Code Here

TOP

Related Classes of org.openswing.swing.message.receive.java.Response

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.