try
{
IntMember intListID =
new IntMember("ItemID", id, 10, "", 'T', false, 10);
StringMember strSku = null;
if ((hm.get("sku") != null))
{
strSku =
new StringMember("SKU", (String) hm.get("sku"), 10, "", 'T', true);
}
else
{
strSku = new StringMember("SKU", null, 10, "", 'T', true);
}
StringMember strName =
new StringMember("Name", (String) hm.get("Name"), 10, "", 'T', false);
// StringMember strCatagory = new StringMember("Category", (String)hm.get("categoryname"), 10, "", 'T', false);new Float(((Double) hm.get( "cost" )).floatValue())
StringMember strType =
new StringMember("Type", (String) hm.get("type"), 10, "", 'T', false);
FloatMember price = null;
if (hm.get("Price") != null)
{
price =
new FloatMember("Price",
new Float(Float.parseFloat((hm.get("Price")).toString())), 10,
"", 'T', false, 10);
}
else
{
price =
new FloatMember("Price", new Float(0), 10, "", 'T', false, 10);
}
DoubleMember intQty = null;
if (hm.get("OnHand") != null)
{
intQty =
new DoubleMember("OnHand",
new Double(Double.parseDouble((hm.get("OnHand")).toString())),
10, "", 'T', false, 10);
}
else
{
intQty =
new DoubleMember("OnHand", new Double(0), 10, "", 'T', false, 10);
}
StringMember strtaxClass =
new StringMember("TaxClass", (String) hm.get("taxclass"), 10, "",
'T', false);
int taxClassId = ((Number) hm.get("taxclassid")).intValue();
IntMember intTaxClassID = new IntMember("TaxClassID", taxClassId, 10, "", 'T', false, 10);
FloatMember cost =
new FloatMember("Cost",
new Float(Float.parseFloat((hm.get("cost")).toString())), 10, "",
'T', false, 10);
//Added by Shilpa for getting Manufacture and Vendor for item
int manid = 0;
int venid = 0;
if (hm.get("manid") != null)
{
manid = ((Long) hm.get("manid")).intValue();
}
IntMember manufacturerID =
new IntMember("ManufacturerID", manid, 10, "", 'T', false, 10);
if (hm.get("vendorid") != null)
{
venid = ((Long) hm.get("vendorid")).intValue();
}
IntMember vendorID =
new IntMember("VendorID", venid, 10, "", 'T', false, 10);
StringMember strVendor = null;
StringMember strManufacturer = null;
if (hm.get("vendor") != null)
{
strVendor =
new StringMember("Vendor", (String) hm.get("vendor"), 10, "",
'T', false);
}
if (hm.get("manufacturer") != null)
{
strManufacturer =
new StringMember("Manufacturer", (String) hm.get("manufacturer"),
10, "", 'T', false);
}
//Added by shilpa ends here
ItemListElement listElement = new ItemListElement(id);