Hello,
I need some help with CASE statements in linq (c#):
osc_products.products_quantity =
CASE
WHEN itempromoflag <> 'N' THEN 100000
WHEN itemcat1 IN ('1','2','31') AND itemsalestatus = 'S' THEN 100000
WHEN itemsalestatus = 'O' THEN 0
ELSE cds_oeinvitem.itemqtyonhand - cds_oeinvitem.itemqtycommitted
END
My start at converting to linq, (I'm still learning):
cdsDBDataContext db = new cdsDBDataContext(); var query = from items in db.cdsItems where items.ItemHandHeldFlag.Equals("Y") && items.ItemQtyOnHand - items.ItemQtyCommitted > 0
select items;
This query updates stock status from production to a commerce site.
Thanks !!!