Package com.commander4j.db

Examples of com.commander4j.db.JDBMaterialType


    uomList.addAll(u.getInternalUoms());

    decisionList.add(new JDBMHNDecisions(Common.selectedHostID, Common.sessionID));
    decisionList.addAll(d.getDecisions());

    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(t.getMaterialTypes());

    initGUI();

    ////////
View Full Code Here


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

    JDBMaterial mat = new JDBMaterial(getHostID(), getSessionID());
    JDBMaterialType mattype = new JDBMaterialType(getHostID(), getSessionID());
    JDBMaterialLocation matlocn = new JDBMaterialLocation(getHostID(), getSessionID());
    JDBLocation locn = new JDBLocation(getHostID(), getSessionID());
    JDBMaterialUom matuom = new JDBMaterialUom(getHostID(), getSessionID());
    JDBUom uomdb = new JDBUom(getHostID(), getSessionID());
    JDBInterface inter = new JDBInterface(getHostID(), getSessionID());
    JDBControl ctrl = new JDBControl(getHostID(), getSessionID());

    String defaultBatchStatus = ctrl.getKeyValue("DEFAULT BATCH STATUS");

    inter.getInterfaceProperties("Material Definition", "Input");

    material = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/material").trim());
    setErrorMessage("Material " + material + " updated.");
    materialType = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/materialType").trim());
   
    if (mattype.isValidMaterialType(materialType)==false)
    {
      mattype.create(materialType, materialType);
    }
   
    description = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/description").trim());
    base_uom = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/base_uom").trim());
    base_uom = uomdb.convertUom(inter.getUOMConversion(), base_uom);
View Full Code Here

    uomList.addAll(u.getInternalUoms());

    decisionList.add(new JDBMHNDecisions(Common.selectedHostID, Common.sessionID));
    decisionList.addAll(d.getDecisions());

    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(t.getMaterialTypes());

    initGUI();

    ////////
View Full Code Here

    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());

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

    initGUI();
View Full Code Here

    {
      lmattype = ((JDBMaterialType) jListMaterialTypes.getSelectedValue()).getType();
      int question = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Material_Type_Delete") + " " + lmattype + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
      if (question == 0)
      {
        JDBMaterialType u = new JDBMaterialType(Common.selectedHostID, Common.sessionID);
        u.setType(lmattype);
        u.delete();
        populateList("");
      }
    }
  }
View Full Code Here

      if (ltype_to != null)
      {
        if (ltype_to.equals("") == false)
        {
          ltype_to = ltype_to.toUpperCase();
          JDBMaterialType u = new JDBMaterialType(Common.selectedHostID, Common.sessionID);
          u.setType(ltype_from);
          if (u.renameTo(ltype_to) == false)
          {
            JUtility.errorBeep();
            JOptionPane.showMessageDialog(Common.mainForm, u.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
          }
          populateList(ltype_to);
        }
      }
    }
View Full Code Here

      }
    }
  }

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

  private void populateList(String defaultitem) {

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

    JDBMaterialType tempType = new JDBMaterialType(Common.selectedHostID, Common.sessionID);
    Vector<JDBMaterialType> tempTypeList = tempType.getMaterialTypes();
    int sel = -1;
    for (int j = 0; j < tempTypeList.size(); j++)
    {
      JDBMaterialType t = (JDBMaterialType) tempTypeList.get(j);
      DefComboBoxMod.addElement(t);
      if (t.getType().equals(defaultitem))
      {
        sel = j;
      }
    }
View Full Code Here

    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("");
    slu.setDescription("");
    shelfLifeUomList.add(slu);
View Full Code Here

    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();
    jTextFieldMHN.setText(mhnnumber);
    jDesktopPane1.add(jTextFieldMaterial);
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBMaterialType

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.