标题:你试着改成这样看行不行
只看楼主
xxjzx
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-5-16
 问题点数:0 回复次数:0 
你试着改成这样看行不行
if (this.textBox2.Text == null)
{
MessageBox.Show("用户名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.textBox2.Focus();
}
else if (this.textBox4.Text == null)
{
MessageBox.Show("水表名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.textBox4.Focus();
}
else
{
mybase.getcom("update sbxx set dwmc='" + this.textBox2.Text.Trim() + "',sbmc='" + this.textBox4.Text.Trim()
+ "',yhlx='" + this.comboBox2.Text.Trim() + "',sblx='" + this.comboBox1.Text.Trim()
+ "',Phone='" + this.textBox3.Text.Trim() + "',dizhi='" + this.textBox5.Text.Trim()
+ "',zzs='" + this.comboBox3.Text.Trim() + "' where dwbh = '" + this.textBox1.Text.Trim() + "' and sbbh='" + this.textBox6.Text.Trim() + "'");
this.button1_Click(sender, e);
MessageBox.Show("水表用户信息修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
2007-10-23 11:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-180039-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.430965 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved