Qty Control in C#

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

    The problem is that you don't check for the case where ret == -1. Changing your second if-statement to if(ret < 1) should fix your issue.

    Also, directly after the line cmd.ExecuteNonQuery(); add ret--; to sync the ret variable with the value that is now in the database.

提交回复
热议问题