/// <summary>
 /// 注册账户
 /// </summary>
 /// <param name="userinfo">注册账户实体</param>
 /// <returns>是否注册成功</returns>
 public bool AddUserInfo(UserInfo userinfo)
 {
     try
     {
         UserInfoDal userinfoDal = new UserInfoDal();
         return(userinfoDal.AddUser(userinfo));
     }
     catch (System.Exception ex)
     {
         throw new Exception.BllException(ex.Message);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 判断是否注册成功
        /// </summary>
        /// <param name="name">注册账号</param>
        /// <param name="pwd">注册密码</param>
        /// <returns>返回ture成功返回false失败</returns>
        public static bool AddUser(string name, string pwd)
        {
            int a = UserInfoDal.AddUser(name, pwd);

            if (a == 0)
            {
                return(false);
            }
            else if (a > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }