Qty Control in C#

后端 未结 5 963
-上瘾入骨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:06

    The fist thing i can see is that this in not right

     if (ret == 1)
            {
                lbqty.Text = "Re-order. Remaining stocks: 1";
                dgUpdate();
            }
            else
    

    should be

     if (ret - 1  == 1)
            {
                lbqty.Text = "Re-order. Remaining stocks: 1";
                dgUpdate();
            }
            else
    

    because when the value you read is 1 and you decrease it its 0.

提交回复
热议问题