/** * @return * @throws BasicException */ @Override public Object createValue() throws BasicException { return new Object[] { id, prodid, prodref, prodname, location, Formats.DOUBLE.parseValue(m_jMinimum.getText()), Formats.DOUBLE.parseValue(m_jMaximum.getText()), Formats.DOUBLE.parseValue(m_jQuantity.getText()) }; }
/** @param value */ @Override public void writeValueEdit(Object value) { Object[] myprod = (Object[]) value; id = myprod[0]; prodid = myprod[1]; prodref = myprod[2]; prodname = myprod[3]; location = myprod[4]; m_jTitle.setText( Formats.STRING.formatValue(myprod[2]) + " - " + Formats.STRING.formatValue(myprod[3])); m_jQuantity.setText(Formats.DOUBLE.formatValue(myprod[7])); m_jMinimum.setText(Formats.DOUBLE.formatValue(myprod[5])); m_jMaximum.setText(Formats.DOUBLE.formatValue(myprod[6])); m_jMinimum.setEnabled(true); m_jMaximum.setEnabled(true); }
public void writeValueDelete(Object value) { Object[] diary = (Object[]) value; m_sID = (String) diary[0]; m_jdate.setText(Formats.TIMESTAMP.formatValue(diary[1])); m_ReasonModel.setSelectedKey(diary[2]); m_LocationsModel.setSelectedKey(diary[3]); productid = (String) diary[4]; productref = (String) diary[8]; productcode = (String) diary[9]; productname = (String) diary[10]; m_jreference.setText(productref); m_jcodebar.setText(productcode); jproduct.setText(productname); attsetid = (String) diary[11]; attsetinstid = (String) diary[5]; attsetinstdesc = (String) diary[12]; jattributes.setText(attsetinstdesc); m_junits.setText(Formats.DOUBLE.formatValue(signum((Double) diary[6], (Integer) diary[2]))); m_jprice.setText(Formats.CURRENCY.formatValue(diary[7])); m_jdate.setEnabled(false); m_jbtndate.setEnabled(false); m_jreason.setEnabled(false); m_jreference.setEnabled(false); m_jEnter1.setEnabled(false); m_jcodebar.setEnabled(false); m_jEnter.setEnabled(false); m_jLocation.setEnabled(false); jproduct.setEnabled(false); jEditProduct.setEnabled(false); jattributes.setEnabled(false); jEditAttributes.setEnabled(false); m_junits.setEnabled(false); m_jprice.setEnabled(false); m_cat.setComponentEnabled(false); }
public void writeValueEdit(Object value) { // MSL SupplierInfoExt suppl; // -- MSL Object[] diary = (Object[]) value; m_sID = (String) diary[0]; m_jdate.setText(Formats.TIMESTAMP.formatValue(diary[1])); m_ReasonModel.setSelectedKey(diary[2]); m_LocationsModel.setSelectedKey(diary[3]); productid = (String) diary[4]; productref = (String) diary[8]; productcode = (String) diary[9]; productname = (String) diary[10]; m_jreference.setText(productref); m_jcodebar.setText(productcode); jproduct.setText(productname); attsetid = (String) diary[11]; attsetinstid = (String) diary[5]; attsetinstdesc = (String) diary[12]; jattributes.setText(attsetinstdesc); m_junits.setText(Formats.DOUBLE.formatValue(signum((Double) diary[6], (Integer) diary[2]))); m_jprice.setText(Formats.CURRENCY.formatValue(diary[7])); m_jdate.setEnabled(false); m_jbtndate.setEnabled(false); m_jreason.setEnabled(false); m_jreference.setEnabled(false); m_jEnter1.setEnabled(false); m_jcodebar.setEnabled(false); m_jEnter.setEnabled(false); m_jLocation.setEnabled(false); jproduct.setEnabled(true); jEditProduct.setEnabled(true); jattributes.setEnabled(false); jEditAttributes.setEnabled(false); m_junits.setEnabled(false); m_jprice.setEnabled(false); m_cat.setComponentEnabled(false); // MSL supplierid = (String) diary[13]; if (supplierid != null) { try { suppl = m_dlSuppliers.loadSupplierExt(supplierid); m_jSupplierId.setText(suppl.getName()); } catch (BasicException e) { m_jSupplierId.setText(null); } } else { m_jSupplierId.setText(null); } }
@Override public Object getValueAt(int row, int column) { InventoryLine i = m_rows.get(row); switch (column) { case 0: return "<html>" + i.getProductName() + (i.getProductAttSetInstDesc() == null ? "" : "<br>" + i.getProductAttSetInstDesc()); case 1: return "x" + Formats.DOUBLE.formatValue(i.getMultiply()); case 2: return Formats.CURRENCY.formatValue(i.getPrice()); default: return null; } }
/** * @return * @throws BasicException */ @Override public Object createValue() throws BasicException { return new Object[] { m_sID, Formats.TIMESTAMP.parseValue(m_jdate.getText()), m_ReasonModel.getSelectedKey(), m_LocationsModel.getSelectedKey(), productid, attsetinstid, samesignum( (Double) Formats.DOUBLE.parseValue(m_junits.getText()), (Integer) m_ReasonModel.getSelectedKey()), Formats.CURRENCY.parseValue(m_jprice.getText()), m_App.getAppUserView().getUser().getName(), productref, productcode, productname, attsetid, attsetinstdesc }; }
public Object createValue() throws BasicException { // MSL : add supplierid return new Object[] { m_sID, Formats.TIMESTAMP.parseValue(m_jdate.getText()), m_ReasonModel.getSelectedKey(), m_LocationsModel.getSelectedKey(), productid, attsetinstid, samesignum( (Double) Formats.DOUBLE.parseValue(m_junits.getText()), (Integer) m_ReasonModel.getSelectedKey()), Formats.CURRENCY.parseValue(m_jprice.getText()), productref, productcode, productname, attsetid, attsetinstdesc, supplierid }; }
public String printArticlesCount() { return Formats.DOUBLE.formatValue(new Double(getArticlesCount())); }