Package com.commander4j.db

Examples of com.commander4j.db.JDBPallet


    list_despatch.ensureIndexIsVisible(sel);
  }

  private void populateUnassignedList(PreparedStatement criteria, String defaultitem)
  {
    JDBPallet pallet = new JDBPallet(Common.selectedHostID, Common.sessionID);

    DefaultComboBoxModel<String> DefComboBoxMod = new DefaultComboBoxModel<String>();

    unassignedList.clear();

    unassignedList.addAll(pallet.getPalletList(criteria));

    @SuppressWarnings("unused")
    int sel = unassignedList.size() - 1;

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


    if (rowCount >= 0)
    {
      int[] rows = jTable1.getSelectedRows();

      JDBPallet temp = new JDBPallet(Common.selectedHostID, Common.sessionID);
      JDBControl ctrl = new JDBControl(Common.selectedHostID, Common.sessionID);
      JDBMHNDecisions decis = new JDBMHNDecisions(Common.selectedHostID, Common.sessionID);

      int n = JOptionPane.showConfirmDialog(Common.mainForm, "Assign selected SSCC's to Master Hold Notice [" + mhnnumber + "  ?", "Confirm", JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
      if (n == 0)
      {

        String initalDecision = ctrl.getKeyValueWithDefault("MHN INITIAL DECISION", "Pending", "Decision for pallets added to MHN");
        String initialStatus = "";
        if (decis.getDecisionProperties(initalDecision) == true)
        {
          initialStatus = decis.getStatus();
        }
        else
        {
          initialStatus = "";
        }

        for (int l = 0; l < rows.length; l++)
        {
          String sscc = jTable1.getValueAt(rows[l], JDBMHNPalletTableModelAssign.SSCC_Col).toString();
          temp.getPalletProperties(sscc);
          temp.updateMHNNumber(mhnnumber);
          temp.updateMHNDecision(initalDecision);
          if (initialStatus.equals("") == false)
          {
            temp.updateStatus(initialStatus);
          }
          jStatusText.setText("SSCC "+sscc+" added to MHN "+mhnnumber);
          Rectangle progressRect = jStatusText.getBounds()
          progressRect.x = 0
          progressRect.y = 0
View Full Code Here

    list_despatch.ensureIndexIsVisible(sel);
  }

  private void populateUnassignedList(PreparedStatement criteria, String defaultitem)
  {
    JDBPallet pallet = new JDBPallet(Common.selectedHostID, Common.sessionID);

    DefaultComboBoxModel DefComboBoxMod = new DefaultComboBoxModel();

    unassignedList.clear();

    unassignedList.addAll(pallet.getPalletList(criteria));

    @SuppressWarnings("unused")
    int sel = unassignedList.size() - 1;

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

    try
    {
      if (cache.containsKey(row)==false)
      {
        mResultSet.absolute(row + 1);
        final JDBPallet prow = new JDBPallet(Common.selectedHostID, Common.sessionID);
        prow.getPropertiesfromResultSet(mResultSet);
        cache.put(row, prow);
      }

      switch (col)
      {
View Full Code Here

    {
      lsscc = jTable1.getValueAt(row, 0).toString();
      int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_SSCC_Delete") + " " + lsscc + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION);
      if (n == 0)
      {
        JDBPallet m = new JDBPallet(Common.selectedHostID, Common.sessionID);
        m.setSSCC(lsscc);
        m.getPalletProperties();

        boolean result = m.delete();
        if (result == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, m.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE);
        } else
        {
          buildSQL();
          populateList();
        }
View Full Code Here

    populateList();
  }

  private void exportExcel(String mode)
  {
    JDBPallet pallet = new JDBPallet(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    export.setExcelRowLimit(jCheckBoxLimit, jSpinnerLimit);
    if (mode.equals("multi") == true)
    {
      PreparedStatement temp = buildSQLr();
      export.saveAs("pallet.xls", pallet.getPalletDataResultSet(temp), Common.mainForm);
    } else
    {
      int row = jTable1.getSelectedRow();
      if (row >= 0)
      {
        PreparedStatement temp = buildSQL1Record();
        export.saveAs("pallet.xls", pallet.getPalletDataResultSet(temp), Common.mainForm);
      }
    }
  }
View Full Code Here

    }
  }

  private void populateList()
  {
    JDBPallet pallet = new JDBPallet(Common.selectedHostID, Common.sessionID);

    JDBPalletTableModel palletTable = new JDBPalletTableModel(pallet.getPalletDataResultSet(listStatement));

    TableRowSorter<JDBPalletTableModel> sorter = new TableRowSorter<JDBPalletTableModel>(palletTable);

    jTable1.setRowSorter(sorter);
View Full Code Here

  }

  public Boolean processMessage(GenericMessageHeader gmh) {
    Boolean result = true;

    JDBPallet pal = new JDBPallet(getHostID(), getSessionID());
    String sscc = "123456789012345678";
    String status = "";
    int occur = 1;
    int notfound = 0;
    int updated = 0;
    int notupdated = 0;

    while (sscc.length() > 0)

    {
      sscc = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/palletStatusChange/sscc[" + String.valueOf(occur) + "]").trim());
      status = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/palletStatusChange/status[" + String.valueOf(occur) + "]").trim());

      if (sscc.length() > 0)
      {

        if (pal.getPalletProperties(sscc) == true)
        {
          Long txn = pal.updateStatus(status);
          if (txn>0)
          {
            // if there has been a change to the status create an outbound message here
            OutgoingPalletStatusChange opsc = new OutgoingPalletStatusChange(getHostID(), getSessionID());
            opsc.submit(txn);
View Full Code Here

    {
      lsscc = jTable1.getValueAt(row, 0).toString();
      int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_SSCC_Delete") + " " + lsscc + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
      if (n == 0)
      {
        JDBPallet m = new JDBPallet(Common.selectedHostID, Common.sessionID);
        m.setSSCC(lsscc);
        m.getPalletProperties();

        boolean result = m.delete();
        if (result == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, m.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
        } else
        {
          buildSQL();
          populateList();
        }
View Full Code Here

    populateList();
  }

  private void exportExcel(String mode)
  {
    JDBPallet pallet = new JDBPallet(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    export.setExcelRowLimit(jCheckBoxLimit, jSpinnerLimit);
    if (mode.equals("multi") == true)
    {
      PreparedStatement temp = buildSQLr();
      export.saveAs("pallet.xls", pallet.getPalletDataResultSet(temp), Common.mainForm);
    } else
    {
      int row = jTable1.getSelectedRow();
      if (row >= 0)
      {
        PreparedStatement temp = buildSQL1Record();
        export.saveAs("pallet.xls", pallet.getPalletDataResultSet(temp), Common.mainForm);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBPallet

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.