Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Bliss 176 posts 234 karma points c-trib
    Jan 25, 2012 @ 13:27
    Matt Bliss
    0

    Getting stock level in C# throwing an error.

    I'm using the following line of C# code:

    int stock = Decimal.ToInt32(NodeStock.GetStock(node.Id).GetValueOrDefault());

    to get the stock level (I've used this in another project and it works fine) but in this project it is returning the following error:

    System.MissingMethodException: Method not found: 'System.Nullable`1 TeaCommerce.Data.NodeStock.GetStock(Int32)'. 

    What am I missing?

  • Matt Bliss 176 posts 234 karma points c-trib
    Jan 25, 2012 @ 18:08
    Matt Bliss
    0

    My mistake, I'd updated the version of TeaCommerce on the install, but the project file referenced a previous version of the dll and the new version of the function now takes two parameters.

Please Sign in or register to post replies

Write your reply to:

Draft