110,566
社区成员
发帖
与我相关
我的任务
分享
private void button1_Click(object sender, EventArgs e)
{
//验证提交
OleDbConnection con = DB.creatOleCon();
con.Open();
OleDbCommand cmd1 = DB.creatOleComd("select * from xtbgznr where 文件编号='" + textBox2.Text + "'", con);
if (!UserInfo.judgeUserid(con, cmd1) || UserInfo.文件编号 == textBox2.Text.Trim())
{
MessageBox.Show("此文件不存在!");
}
else
{
string update = string.Format("update xtbgznr set 工作内容='{0}',文件编号='{1}'where 文件编号='{2}'", richTextBox1.Text, textBox2.Text, UserInfo.文件编号);
OleDbCommand cmd = DB.creatOleComd(update, con);
if (DB.Insert(cmd))
{
MessageBox.Show("添加成功!");
}
else
{
MessageBox.Show("添加失败!");
}
}
}