Qty Control in C#

后端 未结 5 965
-上瘾入骨i
-上瘾入骨i 2021-01-27 07:50

pstrjds, From the code you have provided I am trying to implement that code and the msdn link you provided couple of days ago. I am not sure how to put it together but I am see

5条回答
  •  天涯浪人
    2021-01-27 08:15

    I think this is your problem - you make ret - 1 while processing and then

    txtQty.Text = "Remaining stocks: " + (ret - 1).ToString();
    lbqty.Text = "Remaining stocks: " + (ret - 1).ToString();
    

    that shows one less item. Try making it:

    txtQty.Text = "Remaining stocks: " + ret.ToString();
    lbqty.Text = "Remaining stocks: " + ret.ToString();
    

提交回复
热议问题