Package com.commander4j.db

Examples of com.commander4j.db.JDBUser


    setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);

  }

  private void resetLists() {
    JDBUser tempUser = new JDBUser(Common.selectedHostID, Common.sessionID);
    tempUser.setUserId(lUserId);

    assignedUserList.clear();
    assignedUserList = tempUser.getUserGroupsAssigned();
    populateAssignedList();

    unAssignedUserList.clear();
    unAssignedUserList = tempUser.getUserGroupsUnAssigned();
    populateUnAssignedList();

    jButtonUndo.setEnabled(false);
    jButtonSave.setEnabled(false);
  }
View Full Code Here


          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(150, 357, 105, 32);
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBUser u = new JDBUser(Common.selectedHostID, Common.sessionID);

              u.setUserId(lUserId);
              for (int j = 0; j < unAssignedUserList.size(); j++)
              {
                u.removefromGroup(unAssignedUserList.get(j).toString());
              }
              for (int j = 0; j < assignedUserList.size(); j++)
              {
                u.addtoGroup(assignedUserList.get(j).toString());
              }
              jButtonUndo.setEnabled(false);
              jButtonSave.setEnabled(false);
            }
          });
View Full Code Here

    populateList("");
  }

  private void addrecord() {
    JDBUser u = new JDBUser(Common.selectedHostID, Common.sessionID);

    luser_id = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_User_Create"));
    if (luser_id != null)
    {
      if (luser_id.equals("") == false)
      {
        luser_id = luser_id.toUpperCase();
        if (u.create(luser_id, "password", "", true, true, false, "EN", false, "") == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, u.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
        }
        else
        {

          JLaunchMenu.runForm("FRM_ADMIN_USER_EDIT", luser_id);
View Full Code Here

      if (luser_id.equals(Common.userList.getUser(Common.sessionID).getUserId()) == false)
      {
        int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_User_Delete")+" " + luser_id, lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
        if (n == 0)
        {
          JDBUser u = new JDBUser(Common.selectedHostID, Common.sessionID);
          u.setUserId(luser_id);
          u.delete();
          populateList("");
        }
      }
      else
      {
View Full Code Here

      if (luser_id_to != null)
      {
        if (luser_id_to.equals("") == false)
        {
          luser_id_to = luser_id_to.toUpperCase();
          JDBUser u = new JDBUser(Common.selectedHostID, Common.sessionID);
          u.setUserId(luser_id_from);
          if (u.renameTo(luser_id_to) == false)
          {
            JUtility.errorBeep();
            JOptionPane.showMessageDialog(Common.mainForm, u.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
          }
          populateList(luser_id_to);
        }
      }
    }
View Full Code Here

  }

  private void populateList(String defaultitem) {
    DefaultComboBoxModel<JDBListData> DefComboBoxMod = new DefaultComboBoxModel<JDBListData>();

    JDBUser tempUser = new JDBUser(Common.selectedHostID, Common.sessionID);
    LinkedList<JDBListData> tempUserList = tempUser.getUserIds();

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

    JLaunchReport.runReport("RPT_USERS",null,"",null,"");
  }

  private void lock() {
    luser_id = ((JDBListData) jListUsers.getSelectedValue()).toString();
    JDBUser user = new JDBUser(Common.selectedHostID, Common.sessionID);
    user.getUserProperties(luser_id);
    user.setAccountLocked("Y");
    user.update();
    populateList(luser_id);
  }
View Full Code Here

    populateList(luser_id);
  }

  private void unlock() {
    luser_id = ((JDBListData) jListUsers.getSelectedValue()).toString();
    JDBUser user = new JDBUser(Common.selectedHostID, Common.sessionID);
    user.getUserProperties(luser_id);
    user.setAccountLocked("N");
    user.update();
    populateList(luser_id);
  }
View Full Code Here

      JLaunchMenu.runForm("FRM_ADMIN_USER_EDIT", luser_id);
    }
  }

  private void excel() {
    JDBUser user = new JDBUser(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    export.saveAs("users.xls", user.getUserDataResultSet(), Common.mainForm);
  }
View Full Code Here

  public JDialogLogin(Frame parent)
  {

    super(parent, "Login", true);
    setModal(true);
    user = new JDBUser(Common.selectedHostID, Common.sessionID);

    setTitle("Login (" + Common.hostList.getHost(Common.selectedHostID).getSiteDescription() + ")");

    JLabel lname = new JLabel("User name");
    lname.setFont(Common.font_std);
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBUser

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.