You can update inventory as below after sell happen.
Call below method for each item of cart after sells completion means from thank you page.
public void UpdateInventory(string skuID, int count)
string query = "UPDATE inventory SET itemCount = (itemCount - " + count.ToString() + ") WHERE skuID = '" + skuID + "'";
For updation of inventory when item is added to the system use below method.
public void RefreshInventory(Product product)
Hope this will help you.
For more specific answer you need to post code snippet as well, which you have tried.