Package com.commander4j.db

Examples of com.commander4j.db.JDBUserReport


    btn4jRefresh.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e)
      {
        if (jListUserReports.isSelectionEmpty() == false)
        {
          JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
          populateListUserReports(reportid.getReportID());
        } else
        {
          populateListUserReports("");
        }

      }
    });
    btn4jRefresh.setText(lang.get("btn_Refresh"));
    btn4jRefresh.setMnemonic('0');

    btn4jRun.setBounds(20, 156, 126, 29);
    panelButtons.add(btn4jRun);
    btn4jRun.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0)
      {
        if (jListUserReports.isSelectionEmpty() == false)
        {
          JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
          reportid.getUserReportProperties();
          if (reportid.isParamDateRequired())
          {
            reportid.setParamFromDate(JUtility.getTimestampFromDate(domDateFrom.getDate()));
            reportid.setParamToDate(JUtility.getTimestampFromDate(domDateTo.getDate()));
          }
          label4j_statusBar.setText("Please wait....");
          if (reportid.runReport() == false)
          {
            JUtility.errorBeep();
            label4j_statusBar.setText(reportid.getErrorMessage());
            JOptionPane.showMessageDialog(Common.mainForm, reportid.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
          } else
          {
            label4j_statusBar.setText("Created : " + reportid.getExportFilename());
          }
        }
      }
    });
    btn4jRun.setText(lang.get("btn_Run"));
View Full Code Here


  private void copyReport()
  {
    if (jListUserReports.isSelectionEmpty() == false)
    {
      JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
      String newid = JOptionPane.showInputDialog(Common.mainForm, "Copy report [" + reportid.getReportID() + "] to NEW Report ID");
      if (newid != null)
      {
        if (newid.equals("") == false)
        {
          newid = newid.toUpperCase();
          reportid.getUserReportProperties();
          reportid.setReportID(newid);
          reportid.create(newid);
          reportid.update();
          populateListUserReports(newid);
        }
      }
    }
  }
View Full Code Here

  {
    if (Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_REPORT_EDIT"))
    {
      if (jListUserReports.isSelectionEmpty() == false)
      {
        JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
        JLaunchMenu.runForm("FRM_ADMIN_USER_REPORT_PROP", reportid.getReportID());
      }
    }
  }
View Full Code Here

  private void deleteReport()
  {
    if (jListUserReports.isSelectionEmpty() == false)
    {
      JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
      int n = JOptionPane.showConfirmDialog(Common.mainForm, "Delete User Report " + reportid.getReportID() + " ?", "Confirm", JOptionPane.YES_NO_OPTION);
      if (n == 0)
      {

        reportid.delete();
        populateListUserReports("");
      }
    }
  }
View Full Code Here

  }

  private void addReport()
  {

    JDBUserReport rpt = new JDBUserReport(Common.selectedHostID, Common.sessionID);

    String reportId = JOptionPane.showInputDialog(Common.mainForm, "Enter new Report ID");
    if (reportId != null)
    {
      if (reportId.equals("") == false)
      {
        reportId = reportId.toUpperCase();
        rpt.setReportID(reportId);
        if (rpt.create(reportId) == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, rpt.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        } else
        {

          JLaunchMenu.runForm("FRM_ADMIN_USER_REPORT_PROP", reportId);
        }
View Full Code Here

  private void setButtonState()
  {
    if (jListUserReports.getSelectedIndex() > -1)
    {
      JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();

      domDateFrom.setEnabled(reportid.isParamDateRequired());
      domDateTo.setEnabled(reportid.isParamDateRequired());
      button_CalendardomDateFrom.setEnabled(reportid.isParamDateRequired());
      button_CalendardomDateTo.setEnabled(reportid.isParamDateRequired());
      jListShifts.setEnabled(reportid.isParamDateRequired());
      button4j_Backwards.setEnabled(reportid.isParamDateRequired());
      button4j_Forwards.setEnabled(reportid.isParamDateRequired());

      btn4jAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_REPORT_ADD"));
      btn4jEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_REPORT_EDIT"));
      btn4jDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_REPORT_DELETE"));
      btn4jRun.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_REPORT_RUN"));
View Full Code Here

  private void populateListUserReports(String defaultitem)
  {
    DefaultComboBoxModel defComboBoxMod = new DefaultComboBoxModel();

    JDBUserReport tempUserReport = new JDBUserReport(Common.selectedHostID, Common.sessionID);

    LinkedList<JDBListData> tempUserReportList = new LinkedList<JDBListData>();

    tempUserReportList = tempUserReport.getUserReportIds();

    int sel = -1;
    for (int j = 0; j < tempUserReportList.size(); j++)
    {
      defComboBoxMod.addElement(tempUserReportList.get(j));
View Full Code Here

    setPasswordVerify("");
  }

  private void init() {
    userGroupMembership = new JDBUserGroupMembership(getHostID(), getSessionID());
    userReport = new JDBUserReport(getHostID(), getSessionID());

    dbPasswordExpiryCalendar = Calendar.getInstance();
    dbPasswordExpiryCalendar.add(Calendar.DATE, -1 * Common.user_password_expiry_days);
    dbPasswordExpiryDate = dbPasswordExpiryCalendar.getTime();

View Full Code Here

    btn4jRefresh.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e)
      {
        if (jListUserReports.isSelectionEmpty() == false)
        {
          JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
          populateListUserReports(reportid.getReportID());
        } else
        {
          populateListUserReports("");
        }

      }
    });
    btn4jRefresh.setText(lang.get("btn_Refresh"));
    btn4jRefresh.setMnemonic('0');

    btn4jRun.setBounds(20, 156, 126, 29);
    panelButtons.add(btn4jRun);
    btn4jRun.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0)
      {
        if (jListUserReports.isSelectionEmpty() == false)
        {
          JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
          reportid.getUserReportProperties();
          if (reportid.isParamDateRequired())
          {
            reportid.setParamFromDate(JUtility.getTimestampFromDate(domDateFrom.getDate()));
            reportid.setParamToDate(JUtility.getTimestampFromDate(domDateTo.getDate()));
          }
          label4j_statusBar.setText("Please wait....");
          if (reportid.runReport() == false)
          {
            JUtility.errorBeep();
            label4j_statusBar.setText(reportid.getErrorMessage());
            JOptionPane.showMessageDialog(Common.mainForm, reportid.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
          } else
          {
            label4j_statusBar.setText("Created : " + reportid.getExportFilename());
          }
        }
      }
    });
    btn4jRun.setText(lang.get("btn_Run"));
View Full Code Here

  private void copyReport()
  {
    if (jListUserReports.isSelectionEmpty() == false)
    {
      JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
      String newid = JOptionPane.showInputDialog(Common.mainForm, "Copy report [" + reportid.getReportID() + "] to NEW Report ID");
      if (newid != null)
      {
        if (newid.equals("") == false)
        {
          newid = newid.toUpperCase();
          reportid.getUserReportProperties();
          reportid.setReportID(newid);
          reportid.create(newid);
          reportid.update();
          populateListUserReports(newid);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBUserReport

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.