In checkedchanged event you are not assigning
Discontinued
property value to
True
, but you are using it in
UpdateProduct
method.
So place this line
prod.Discontinued=true;
before calling
UpdateProduct
method in Checked Changed Event
Hope this helps you.