Package com.commander4j.db

Examples of com.commander4j.db.JDBPrinterLineMembership


                JDBPrinters c = new JDBPrinters(Common.selectedHostID, Common.sessionID);
                c.setPrinterID(printerID);
                c.setGroupID(groupID);
                if (c.delete())
                {
                  JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
                  plm.removePrinterfromAllLines(printerID,groupID);
                }

                populateList("", "");
              }
            }
View Full Code Here


              {
                JDBPrinters c = new JDBPrinters(Common.selectedHostID, Common.sessionID);
                c.setPrinterID(printerID);
                if (c.delete())
                {
                  JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID,Common.sessionID);
                  plm.removePrinterfromAllLines(printerID);
                }
               
               
                populateList("");
              }
View Full Code Here

  }

  private void populateUnAssignedList(JDBListData i) {
    unassignedModel.removeAllElements();

    JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
    if (i==null)
    {
      plm.setPrinterId("");
      unassignedList.clear();
    }
    else
    {
      plm.setPrinterId(i.toString());
      unassignedList = plm.getPrintersNotAssignedtoLine(plm.getPrinterId());
    }

    if (unassignedList.size() > 0)
    {
      for (int j = 0; j < unassignedList.size(); j++)
View Full Code Here

  }

  private void populateAssignedList(JDBListData i) {
    assignedModel.removeAllElements();

    JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
   
    if (i==null)
    {
      plm.setPrinterId("");
    }
    else
    {
      plm.setPrinterId(i.toString());
    }

    assignedList = plm.getPrintersAssignedtoLine(plm.getPrinterId());

    if (assignedList.size() > 0)
    {
      for (int j = 0; j < assignedList.size(); j++)
      {
View Full Code Here

          jButtonAssign.setEnabled(false);
          jButtonAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListUnAssigned.getSelectedIndex() > -1)
              {
                JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
                for (int j = jListUnAssigned.getMaxSelectionIndex(); j >= jListUnAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListUnAssigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListUnAssigned.getModel().getElementAt(j);

                    if (plm.addPrintertoLine(jListLines.getSelectedValue().toString(), item.toString()))
                    {
                      addToList(assignedList, item, false);
                    }
                  }
                }

                for (int j = jListUnAssigned.getMaxSelectionIndex(); j >= jListUnAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListUnAssigned.isSelectedIndex(j))
                  {
                    Object item = jListUnAssigned.getModel().getElementAt(j);

                      removeFromList(unassignedList, item);

                  }
                }

                refreshJList(jListAssigned, assignedModel, assignedList);
                refreshJList(jListUnAssigned, unassignedModel, unassignedList);

                setButtonState();
              }

            }
          });
        }
        {
          jButtonUnAssign = new JButton4j(Common.icon_arrow_right);
          jDesktopPane1.add(jButtonUnAssign);
          jButtonUnAssign.setBounds(390, 185, 25, 25);
          jButtonUnAssign.setEnabled(false);
          jButtonUnAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListAssigned.getSelectedIndex() > -1)
              {
                JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
                for (int j = jListAssigned.getMaxSelectionIndex(); j >= jListAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListAssigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListAssigned.getModel().getElementAt(j);

                    addToList(unassignedList, item, true);
                  }
                }

                for (int j = jListAssigned.getMaxSelectionIndex(); j >= jListAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListAssigned.isSelectedIndex(j))
                  {
                    Object item = jListAssigned.getModel().getElementAt(j);

                   
                   
                    if (plm.removePrinterfromLine(jListLines.getSelectedValue().toString(), item.toString()))
                    {
                      removeFromList(assignedList, item);
                    }
                  }
                }
View Full Code Here

        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, autolab.getErrorMessage(), "Delete error (" + deleteLabeller + ")", JOptionPane.WARNING_MESSAGE);
        } else
        {
          JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID,Common.sessionID);
          plm.removeAllPrintersfromLine(deleteLabeller);
          buildSQL();
          populateList(deleteLabeller);
        }
      }
    }
View Full Code Here

        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, autolab.getErrorMessage(), "Delete error (" + deleteLine  + " - " + deleteGroup+ ")", JOptionPane.WARNING_MESSAGE, Common.icon_confirm);
        } else
        {
          JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
          plm.removeAllPrintersfromLine(deleteLine,deleteGroup);
          buildSQL();
          populateList(deleteLine);
        }
      }
    }
View Full Code Here

        jDesktopPane1.add(label4j_title_21);
        jButtonAssignPrinter.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (jListUnAssignedPrinters.getSelectedIndex() > -1)
            {
              JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
              for (int j = jListUnAssignedPrinters.getMaxSelectionIndex(); j >= jListUnAssignedPrinters.getMinSelectionIndex(); j--)
              {
                if (jListUnAssignedPrinters.isSelectedIndex(j))
                {
                  JDBListData item = (JDBListData) jListUnAssignedPrinters.getModel().getElementAt(j);

                  if (plm.addPrintertoLine(selectedLine,selectedGroup, item.toString()))
                  {
                    addToPrinterList(assignedList, item, false);
                  }
                }
              }

              for (int j = jListUnAssignedPrinters.getMaxSelectionIndex(); j >= jListUnAssignedPrinters.getMinSelectionIndex(); j--)
              {
                if (jListUnAssignedPrinters.isSelectedIndex(j))
                {
                  Object item = jListUnAssignedPrinters.getModel().getElementAt(j);

                    removeFromPrinterList(unassignedList, item);

                }
              }

              refreshJList(jListAssignedPrinters, assignedModel, assignedList);
              refreshJList(jListUnAssignedPrinters, unassignedModel, unassignedList);

              setButtonState();
            }

          }
        });
       

        jButtonAssignPrinter.setBounds(720, 283, 25, 25);
        jDesktopPane1.add(jButtonAssignPrinter);
        jButtonUnAssignPrinter.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (jListAssignedPrinters.getSelectedIndex() > -1)
            {
              JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
              for (int j = jListAssignedPrinters.getMaxSelectionIndex(); j >= jListAssignedPrinters.getMinSelectionIndex(); j--)
              {
                if (jListAssignedPrinters.isSelectedIndex(j))
                {
                  JDBListData item = (JDBListData) jListAssignedPrinters.getModel().getElementAt(j);

                  addToPrinterList(unassignedList, item, true);
                }
              }

              for (int j = jListAssignedPrinters.getMaxSelectionIndex(); j >= jListAssignedPrinters.getMinSelectionIndex(); j--)
              {
                if (jListAssignedPrinters.isSelectedIndex(j))
                {
                  Object item = jListAssignedPrinters.getModel().getElementAt(j);

                 
                 
                  if (plm.removePrinterfromLine(selectedLine,selectedGroup ,item.toString()))
                  {
                    removeFromPrinterList(assignedList, item);
                  }
                }
              }
View Full Code Here

  }
 
  private void populateUnAssignedPrinterList() {
    unassignedModel.removeAllElements();

    JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);

    unassignedList = plm.getPrintersNotAssignedtoLine(selectedLine,selectedGroup);


    if (unassignedList.size() > 0)
    {
      for (int j = 0; j < unassignedList.size(); j++)
View Full Code Here

  }

  private void populateAssignedPrinterList() {
    assignedModel.removeAllElements();

    JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);

    assignedList = plm.getPrintersAssignedtoLine(selectedLine,selectedGroup);

    if (assignedList.size() > 0)
    {
      for (int j = 0; j < assignedList.size(); j++)
      {
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBPrinterLineMembership

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.