private void AdjustQuantity() { if (IsCreating) { var difference = Quantity - _item.Quantity; var userID = CurrentUser != null ? CurrentUser.ID : 1; var wasAdjusted = CanMarkAdjustedForStockPurchase ? WasAdjustedForStockPurchase : false; QuantityAdjustment.UpdateQuantity(difference, _item.ID, userID, Explanation, wasAdjusted); _item.AdjustQuantityByAmount(difference); _item.Quantity = Quantity; ReturnToPreviousScreen(); } else { _adjustment.Explanation = Explanation; _adjustment.WasAdjustedForStockPurchase = WasAdjustedForStockPurchase; _adjustment.SaveUpdates(); ReturnToPreviousScreen(); } }