Пример #1
0
        public void ChangePassword(int id, string oldpwd, string newpwd)
        {
            T_UserDAL userDAL = new T_UserDAL();
            T_User    user    = userDAL.Get(id);

            if (user == null)
            {
                throw new Exception("不存在的UserId");
            }
            if (GetMD5(oldpwd) != user.Password)
            {
                throw new Exception("旧密码错误");
            }
            user.Password = GetMD5(newpwd);
            userDAL.Update(user);
        }
Пример #2
0
 /// <summary>
 /// 根据主键修改 T_User 表数据
 /// </summary>
 /// <param name=info>T_User 实体对象</param>
 public bool Update(T_User info)
 {
     return(dal.Update(info));
 }