为什么结果会改变其他所有的调用? [英] Why are the results changing every other call??

查看:68
本文介绍了为什么结果会改变其他所有的调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这里我们使用if语句并且第一次工作正常

here we using if statement and it's work fine for first time


然后当我输入条形码并按下再次输入它将直接转到else语句它的意思显示我在其他声明中看到的错误消息,我认为它不是重复整个声明作为新进程因为我确定从条件它是真的和
它不应该去其他声明,但在第三次,当我尝试输入条形码并检查条件,它的工作正常,如第一次,然后在第二次显示我错误

then when i enter barcode and pressed enter again it's going direct to else statement it's mean shown me error message under as we see on else statement and i think it's not repeat whole statement as new process because i'm sure from condition it's true and it shouldn't go to else statement but in third time when i try enter barcode and check from condition it's work fine like first time and then in forth time show me error again


为什么每秒都会显示错误消息

why error message shown on every second try

推荐答案

嗨Mohammed mqi,

Hi Mohammed mqi,

根据您的描述和相关代码,我建议您在应用程序上检查以下方法,该方法返回第二次尝试时没有任何记录的数据表。

According to your description and related code, I would suggest that you check the following method on your application, which return datatable that does not have any records at second try.

此外,您可以检查名为&textbsp1.Text的变量是否在第二次尝试时具有值。

In addition, you could check if the variable named textBox1.Text has value at second try.

 dt = pro.GetProdcutBar(textBox1.Text);

祝你好运,

张龙 


这篇关于为什么结果会改变其他所有的调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆