Hi,
I have a requirement to check the live available quantity in our WMS system and only show attributes for items that are in stock. I am having trouble getting the productId from inside of the ProductAddributeValue class. I would like to have the productId available in the following method:
public bool LoadFromDataRow(DataRow row)
productAttributeValueId = (int)row["productAttributeValueId"];
attributeValue = (string)row["value"];
priceAdjustment = Utils.Round((decimal)row["priceAdjustment"]);
Looking for something like this.
lookUpProduct = product.productid
Then I can run a method to set the quantity somthing like this:
quantity = myMethod.GetOnhand(lookUpProduct,attributeId);
// quantity = DBHelper.ToNullableInt(row["quantity"]);
imageId = DBHelper.ToNullableInt(row["imageId"]);
string cf = row["CustomFields"] as string;
CustomFields = new List<CustomField>();
if (!string.IsNullOrEmpty(cf))</span>
CustomFields = Utils.FromXml<List<CustomField>>(cf);
Return true;
}
Thanks,
Tom Usselman
|