Package com.commander4j.db

Examples of com.commander4j.db.JDBUom


  {
    super();
    setIconifiable(true);
    getContentPane().setLayout(null);

    uomList.add(new JDBUom(Common.selectedHostID, Common.sessionID));
    uomList.addAll(u.getInternalUoms());

    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(t.getMaterialTypes());
View Full Code Here


  }

  public JInternalFramePalletProperties() {
    super();
    uomList.add(new JDBUom("", ""));
    uomList.addAll(uom.getInternalUoms());

    initGUI();
    final JHelp help = new JHelp();
    help.enableHelpOnButton(jButtonHelp, JUtility.getHelpSetIDforModule("FRM_ADMIN_MATERIAL_EDIT"));
View Full Code Here

          jButtonAdd.setBounds(483, 7, 126, 32);
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_UOM_ADD"));
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBMaterialUom m = new JDBMaterialUom(Common.selectedHostID, Common.sessionID);
              JDBUom u = new JDBUom(Common.selectedHostID, Common.sessionID);
              luom = (String) JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Material_UOM_Input"), null, JOptionPane.QUESTION_MESSAGE,Common.icon_confirm, null, null);
              if (luom != null)
              {
                if (luom.equals("") == false)
                {
                  luom = luom.toUpperCase();
                  u.setInternalUom(luom);
                  if (u.isValidInternalUom())
                  {
                    m.setMaterial(lmaterial);
                    m.setUom(luom);
                    if (m.isValidMaterialUom() == false)
                    {
View Full Code Here

    super();
   
    moduleList.add(null);
    moduleList.addAll(mod.getModuleIdsByType("USER"));
   
    uomList.add(new JDBUom("", ""));
    uomList.addAll(uom.getInternalUoms());
    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(materialtype.getMaterialTypes());
    JShelfLifeUom slu = new JShelfLifeUom();
    slu.setUom("");
View Full Code Here

    super();

    this.mhnnumber = mhnnumber;
    this.callingForm = callingForm;

    uomList.add(new JDBUom(Common.selectedHostID, Common.sessionID));
    uomList.addAll(u.getInternalUoms());
    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(t.getMaterialTypes());

    initGUI();
View Full Code Here

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

    JDBProcessOrder po = new JDBProcessOrder(getHostID(), getSessionID());
    JDBCustomer cst = new JDBCustomer(getHostID(), getSessionID());
    JDBUom uomdb = new JDBUom(getHostID(), getSessionID());
    JDBInterface inter = new JDBInterface(getHostID(), getSessionID());

    inter.getInterfaceProperties("Process Order", "Input");

    orderNo = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/orderNo").trim();
    material = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/material").trim();
    description = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/description").trim();
    status = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/status").trim();
    location = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/location").trim();
    dueDate = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/dueDate").trim();
    receipeId = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/receipeId").trim();
    requiredQuantity = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/requiredQuantity").trim();

    requiredUom = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/requiredUom").trim();
    requiredUom = uomdb.convertUom(inter.getUOMConversion(), requiredUom);

    defaultPalletStatus = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/defaultPalletStatus").trim();
    requiredResource = gmh.getXMLDocument().findXPath("//message/messageData/processOrder/requiredResource").trim();
   
    inspectionID = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/processOrder/inspectionID").trim());
View Full Code Here

    Boolean result = false;
    String path = "";
    JDBInterfaceLog il = new JDBInterfaceLog(getHostID(), getSessionID());
    GenericMessageHeader gmh = new GenericMessageHeader();
    JDBInterface inter = new JDBInterface(getHostID(), getSessionID());
    JDBUom uom = new JDBUom(getHostID(), getSessionID());
    JDBMaterial mat = new JDBMaterial(getHostID(), getSessionID());
    JDBControl ctrl = new JDBControl(getHostID(), getSessionID());

    String expiryMode;
    expiryMode = ctrl.getKeyValue("EXPIRY DATE MODE");

    inter.getInterfaceProperties("Production Declaration", "Output");
    String device = inter.getDevice();

    JDBPalletHistory palhist = new JDBPalletHistory(getHostID(), getSessionID());
    ResultSet rs = palhist.getInterfacingData(transactionRef, "PROD DEC", "CONFIRM", Long.valueOf(1), "SSCC", "asc");
    try
    {
      if (rs.next())
      {
        palhist.getPropertiesfromResultSet(rs);

        try
        {
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();

          Document document = builder.newDocument();

          Element message = (Element) document.createElement("message");

          Element hostUniqueID = addElement(document, "hostRef", Common.hostList.getHost(getHostID()).getUniqueID());
          message.appendChild(hostUniqueID);

          Element messageRef = addElement(document, "messageRef", String.valueOf(transactionRef));
          message.appendChild(messageRef);

          Element messageType = addElement(document, "interfaceType", "Production Declaration");
          message.appendChild(messageType);

          Element messageInformation = addElement(document, "messageInformation", "SSCC=" + palhist.getPallet().getSSCC());
          message.appendChild(messageInformation);

          Element messageDirection = addElement(document, "interfaceDirection", "Output");
          message.appendChild(messageDirection);

          Element messageDate = addElement(document, "messageDate", JUtility.getISOTimeStampStringFormat(JUtility.getSQLDateTime()));
          message.appendChild(messageDate);

          Element productionDeclaration = (Element) document.createElement("productionDeclaration");

          Element sscc = addElement(document, "SSCC", palhist.getPallet().getSSCC());
          productionDeclaration.appendChild(sscc);

          Element processOrder = addElement(document, "processOrder", palhist.getPallet().getProcessOrder());
          productionDeclaration.appendChild(processOrder);

          Element recipe = addElement(document, "recipe", palhist.getPallet().getProcessOrderObj(false).getRecipe());
          productionDeclaration.appendChild(recipe);

          Element required_resource = addElement(document, "requiredResource", palhist.getPallet().getProcessOrderObj(false).getRequiredResource());
          productionDeclaration.appendChild(required_resource);
         
          Element material = addElement(document, "material", palhist.getPallet().getMaterial());
          productionDeclaration.appendChild(material);

          if (mat.getMaterialProperties(palhist.getPallet().getMaterial()) == true)
          {
            Element description = addElement(document, "description", mat.getDescription());
            productionDeclaration.appendChild(description);
            Element old_code = addElement(document,"old_code",mat.getOldMaterial());
            productionDeclaration.appendChild(old_code);
          }
          else
          {
            Element description = addElement(document, "description", "");
            productionDeclaration.appendChild(description);
            Element old_code = addElement(document,"old_code","");
            productionDeclaration.appendChild(old_code);
          }

          Element ean = addElement(document, "ean", palhist.getPallet().getEAN());
          productionDeclaration.appendChild(ean);

          Element variant = addElement(document, "variant", palhist.getPallet().getVariant());
          productionDeclaration.appendChild(variant);

          Element status = addElement(document, "status", palhist.getPallet().getStatus());
          productionDeclaration.appendChild(status);

          Element batch = addElement(document, "batch", palhist.getPallet().getBatchNumber());
          productionDeclaration.appendChild(batch);

          Element batchStatus = addElement(document, "batchStatus", palhist.getPallet().getMaterialBatchStatus());
          productionDeclaration.appendChild(batchStatus);

          Element expiryDateMode = addElement(document, "expiry_Mode", expiryMode);
          productionDeclaration.appendChild(expiryDateMode);

          if (expiryMode.equals("BATCH") == true)
          {
            Element expiryDate = addElement(document, "expiryDate", JUtility.getISOTimeStampStringFormat(palhist.getPallet().getMaterialBatchExpiryDate()));
            productionDeclaration.appendChild(expiryDate);
          }
          else
          {
            Element expiryDate = addElement(document, "expiryDate", JUtility.getISOTimeStampStringFormat(palhist.getPallet().getBatchExpiry()));
            productionDeclaration.appendChild(expiryDate);
          }

          Element location = addElement(document, "location", palhist.getPallet().getLocationID());
          productionDeclaration.appendChild(location);

          Element name = addElement(document, "name", palhist.getPallet().getLocationObj().getDescription());
          productionDeclaration.appendChild(name);

          Element gln = addElement(document, "gln", palhist.getPallet().getLocationObj().getGLN());
          productionDeclaration.appendChild(gln);

          Element plant = addElement(document, "plant", palhist.getPallet().getLocationObj().getPlant());
          productionDeclaration.appendChild(plant);

          Element warehouse = addElement(document, "warehouse", palhist.getPallet().getLocationObj().getWarehouse());
          productionDeclaration.appendChild(warehouse);

          Element storageLocation = addElement(document, "storageLocation", palhist.getPallet().getLocationObj().getStorageLocation());
          productionDeclaration.appendChild(storageLocation);

          Element storageSection = addElement(document, "storageSection", palhist.getPallet().getLocationObj().getStorageSection());
          productionDeclaration.appendChild(storageSection);

          Element storageBin = addElement(document, "storageBin", palhist.getPallet().getLocationObj().getStorageBin());
          productionDeclaration.appendChild(storageBin);

          Element storageType = addElement(document, "storageType", palhist.getPallet().getLocationObj().getStorageType());
          productionDeclaration.appendChild(storageType);

          Element productionQuantity = addElement(document, "productionQuantity", String.valueOf(palhist.getPallet().getQuantity()));
          productionDeclaration.appendChild(productionQuantity);

          String paluom = palhist.getPallet().getUom();
          paluom = uom.convertUom(inter.getUOMConversion(), paluom);

          Element productionUOM = addElement(document, "productionUOM", paluom);
          productionDeclaration.appendChild(productionUOM);

          Element productionConfirmed = addElement(document, "confirmed", palhist.getPallet().getConfirmed());
View Full Code Here

  private JScrollPane jScrollPane1;
  private String luomid;
  private JDBLanguage lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

  private void addrecord() {
    JDBUom u = new JDBUom(Common.selectedHostID, Common.sessionID);
    luomid = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_UOM_Add"));
    if (luomid != null)
    {
      if (luomid.equals("") == false)
      {
        luomid = luomid.toUpperCase();
        if (u.create(luomid, "", "", "") == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, u.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
        }
        else
        {
          JLaunchMenu.runForm("FRM_ADMIN_UOM_EDIT", luomid);
        }
View Full Code Here

  private void populateList(String defaultitem) {

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

    JDBUom tempUom = new JDBUom(Common.selectedHostID, Common.sessionID);

    LinkedList<JDBUom> tempUomList = tempUom.getInternalUoms();
    int sel = -1;
    for (int j = 0; j < tempUomList.size(); j++)
    {
      JDBUom t = (JDBUom) tempUomList.get(j);
      DefComboBoxMod.addElement(t);
      if (t.getInternalUom().equals(defaultitem))
      {
        sel = j;
      }
    }
View Full Code Here

    {
      luomid = ((JDBUom) jListUoms.getSelectedValue()).getInternalUom();
      int question = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_UOM_Delete") + " " + luomid + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
      if (question == 0)
      {
        JDBUom u = new JDBUom(Common.selectedHostID, Common.sessionID);
        u.setInternalUom(luomid);
        u.delete();
        populateList("");
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBUom

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.