请问在sql命令语句中where条件后的studentid=" + sid;是什么意思?
privatevoid非活动ToolStripMenuItem_Click(objectsender,EventArgse){if(lvStudent.SelectedI...
private void 非活动ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lvStudent.SelectedItems.Count > 0)
{
int sid = Convert.ToInt32(lvStudent.SelectedItems[0].Tag);
string sql = "update student set userstateid=0 where studentid=" + sid;
DialogResult dr = MessageBox.Show("是否确认删除?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
//执行修改
int count = ZSG(sql);
if (count > 0)
{
//直接从界面上修改,修改当前选中项指定列的值
lvStudent.SelectedItems[0].SubItems[3].Text = "非活动";
}
else
MessageBox.Show("修改失败。。。");
}
}
else
MessageBox.Show("请选择项。。。");
} 展开
{
if (lvStudent.SelectedItems.Count > 0)
{
int sid = Convert.ToInt32(lvStudent.SelectedItems[0].Tag);
string sql = "update student set userstateid=0 where studentid=" + sid;
DialogResult dr = MessageBox.Show("是否确认删除?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
//执行修改
int count = ZSG(sql);
if (count > 0)
{
//直接从界面上修改,修改当前选中项指定列的值
lvStudent.SelectedItems[0].SubItems[3].Text = "非活动";
}
else
MessageBox.Show("修改失败。。。");
}
}
else
MessageBox.Show("请选择项。。。");
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询