c# 密码重置

//密码重置
DialogResult dr = MessageBox.Show("是否重置", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dr == DialogResult.Yes)
{
string sql = "update [dbo].[UserM] set [UserPass]=PWDENCRYPT('123') where [UserName]='" + dataGridView1.Rows[ccc].Cells[0].Value.ToString() + "'";
bool t = db.ExecuteSql(sql);
if (t == true)
{
MessageBox.Show("重置成功");
ccc = -1;
}
}

posted @ 2016-08-01 13:34  苏格兰  阅读(263)  评论(0)    收藏  举报