Package com.commander4j.db

Examples of com.commander4j.db.JDBMaterialBatch


      String temp = "";
      Date d = jSpinnerProductionDate.getDate();
      Calendar caldate = Calendar.getInstance();
      caldate.setTime(d);

      JDBMaterialBatch mb = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
      temp = mb.getDefaultBatchNumber(batchFormat, caldate, processorder);

      if (temp.equalsIgnoreCase(jTextFieldBatch.getText()) == false)
      {
        if (jCheckBoxBatch.isSelected() == false)
        {
          jTextFieldBatch.setText(mb.getDefaultBatchNumber(batchFormat, caldate, processorder));
        }
      }

      if (jCheckBoxExpiry.isSelected() == false)
      {
View Full Code Here


    buildSQL();
    populateList();
  }

  private void excel() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    buildSQL();
    export.saveAs("material_batch.xls", materialBatch.getMaterialBatchDataResultSet(listStatement), Common.mainForm);
  }
View Full Code Here

          lbatch = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Material_Batch_Input"));
          if (lbatch != null)
          {
            if (lbatch.equals("") == false)
            {
              JDBMaterialBatch matbat = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
              if (matbat.isValidMaterialBatch(lmaterial, lbatch) == false)
              {
                JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_BATCH_EDIT", lmaterial, lbatch);
              }
              else
              {
View Full Code Here

    query.bindParams();
    listStatement = query.getPreparedStatement();
  }

  private void populateList() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JDBMaterialBatchTableModel materialBatchTable = new JDBMaterialBatchTableModel(materialBatch.getMaterialBatchDataResultSet(listStatement));
    TableRowSorter<JDBMaterialBatchTableModel> sorter = new TableRowSorter<JDBMaterialBatchTableModel>(materialBatchTable);

    jTable1.setRowSorter(sorter);
    jTable1.setModel(materialBatchTable);
View Full Code Here

    buildSQL();
    populateList();
  }

  private void excel() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    buildSQL();
    export.saveAs("material_batch.xls", materialBatch.getMaterialBatchDataResultSet(listStatement), Common.mainForm);
  }
View Full Code Here

          lbatch = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Material_Batch_Input"));
          if (lbatch != null)
          {
            if (lbatch.equals("") == false)
            {
              JDBMaterialBatch matbat = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
              if (matbat.isValidMaterialBatch(lmaterial, lbatch) == false)
              {
                JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_BATCH_EDIT", lmaterial, lbatch);
              }
              else
              {
View Full Code Here

    query.bindParams();
    listStatement = query.getPreparedStatement();
  }

  private void populateList() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JDBMaterialBatchTableModel materialBatchTable = new JDBMaterialBatchTableModel(materialBatch.getMaterialBatchDataResultSet(listStatement));
    TableRowSorter<JDBMaterialBatchTableModel> sorter = new TableRowSorter<JDBMaterialBatchTableModel>(materialBatchTable);

    jTable1.setRowSorter(sorter);
    jTable1.setModel(materialBatchTable);
View Full Code Here

      String temp = "";
      Date d = jSpinnerProductionDate.getDate();
      Calendar caldate = Calendar.getInstance();
      caldate.setTime(d);

      JDBMaterialBatch mb = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
      temp = mb.getDefaultBatchNumber(batchFormat, caldate, processorder);

      if (temp.equalsIgnoreCase(jTextFieldBatchPrefix.getText()) == false)
      {
        if (jCheckBoxBatchPrefixOverride.isSelected() == false)
        {
          jTextFieldBatchPrefix.setText(mb.getDefaultBatchNumber(batchFormat, caldate, processorder));
        }
      }

      if (jCheckBoxExpiryOverride.isSelected() == false)
      {
View Full Code Here

      String temp = "";
      Date d = jSpinnerProductionDate.getDate();
      Calendar caldate = Calendar.getInstance();
      caldate.setTime(d);

      JDBMaterialBatch mb = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
      temp = mb.getDefaultBatchNumber(batchFormat, caldate, processorder);

      if (temp.equalsIgnoreCase(jTextFieldBatch.getText()) == false)
      {
        if (jCheckBoxBatch.isSelected() == false)
        {
          jTextFieldBatch.setText(mb.getDefaultBatchNumber(batchFormat, caldate, processorder));
        }
      }

      if (jCheckBoxExpiry.isSelected() == false)
      {
View Full Code Here

  }

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

    JDBMaterialBatch batch = new JDBMaterialBatch(getHostID(), getSessionID());
    String material = "12345";
    String batchStr = "";
    String status = "";
    int occur = 1;

    while (material.length() > 0)

    {
      material = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/material[" + String.valueOf(occur) + "]").trim());
      batchStr = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/batch[" + String.valueOf(occur) + "]").trim());
      status = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/status[" + String.valueOf(occur) + "]").trim());

      if (material.length() > 0)
      {

        if (batch.getMaterialBatchProperties(material, batchStr) == true)
        {
          batch.setStatus(status);
          batch.update();
          result = true;
          setErrorMessage(String.valueOf(occur) + " Batch(s) updated");
        }
        else
        {
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBMaterialBatch

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.