日期:2014-05-20 浏览次数:20501 次
/// <summary> /// 修改一条密码 /// </summary> public bool UpdatePassWord(string UserName, string PassWord) { StringBuilder strSql = new StringBuilder(); strSql.Append("update Admin set "); strSql.Append("[PassWord]=@PassWord"); strSql.Append(" where UserName=@UserName"); OleDbParameter[] parameters = { new OleDbParameter("@UserName", OleDbType.VarChar,50), new OleDbParameter("@PassWord", OleDbType.VarChar,50)}; parameters[0].Value = UserName; parameters[1].Value = PassWord; int rows = DBUtility.DbHelperAccess.ExecuteNonQuery(strSql.ToString(), CommandType.Text, parameters); if (rows > 0) { return true; } else { return false; } }