加之前重复检查 [英] Duplicate check before adding

查看:83
本文介绍了加之前重复检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向大家道歉。

和感谢大家。

看来我错过了一个愚蠢的fricking变种,我丝毫没有察觉。
我认为这是我的支票被打破,但没有我错过了在上述方法的变种所以它只是不断地说,是啊,这是真的-.-感谢大家的帮助。

It seems I was missing a stupid fricking var which I didn't even notice. I thought it was my check which was broken but no I missed a var in an above method so it was just constantly saying yea it's true -.- Thanks everyone for helping

推荐答案

在你的程序中,检查电池是否不可以匹配新的值,然后分配真实 isDuplicate 。然后你指定的杜佩测试值到 lblNotRawConsignmentNumber

In your program you check if the cell does not match the new value and then you assign true to isDuplicate. Then you assign the Dupe Test value to the lblNotRawConsignmentNumber

if (lblConsignmentNumber.Text != gvReceivedBoxes.Rows[i].Cells[3].Text)
{
  isDuplicate = true;
  lblNotRawConsignmentNumber.Text = "Dupe Teset";
  break;
}

请尝试以下操作:

try the following:

if (lblConsignmentNumber.Text == gvReceivedBoxes.Rows[i].Cells[3].Text)
{
  isDuplicate = true;
  lblNotRawConsignmentNumber.Text = "Dupe Teset";
  break;
}

这篇关于加之前重复检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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