Пример #1
0
        public string modifypassword(string userid, string olduserpwd, string newuserpwd)
        {
            int           num;
            DataProviders providers = new DataProviders();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@userid", SqlDbType.VarChar, 0x10), new SqlParameter("@olduserpwd", SqlDbType.VarChar, 0x10), new SqlParameter("@newuserpwd", SqlDbType.VarChar, 0x10) };
            parameters[0].Value = userid;
            parameters[1].Value = olduserpwd;
            parameters[2].Value = newuserpwd;
            switch (providers.RunProcedure("Web_ModifyPassword", parameters, out num))
            {
            case 0:
                return("恭喜您,密碼修改成功,請牢記新密碼。");

            case 1:
                return("對不起,您的用戶名或密碼錯誤!");
            }
            return("系統級錯誤,請聯繫管理員!");
        }
Пример #2
0
        public string forgetpassword(string userid, string key, string email)
        {
            int           num;
            DataProviders providers = new DataProviders();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@userid", SqlDbType.VarChar, 0x10), new SqlParameter("@key", SqlDbType.VarChar, 20), new SqlParameter("@email", SqlDbType.VarChar, 50) };
            parameters[0].Value = userid;
            parameters[1].Value = key;
            parameters[2].Value = email;
            switch (providers.RunProcedure("Web_ForgetPassword", parameters, out num))
            {
            case 0:
                return("恭喜您,密碼找回成功,新密碼為123456,請速修改。");

            case 1:
                return("對不起,您的用戶名、二級密碼或E-MAIL錯誤!");
            }
            return("系統級錯誤,請聯繫管理員!");
        }
Пример #3
0
        public string register(string userid, string userpwd, string key, string sex, string email, string commend, string regip, int webgold)
        {
            int           num;
            DataProviders providers = new DataProviders();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@userid", SqlDbType.VarChar, 20), new SqlParameter("@userpwd", SqlDbType.VarChar, 20), new SqlParameter("@key", SqlDbType.VarChar, 20), new SqlParameter("@sex", SqlDbType.VarChar, 50), new SqlParameter("@email", SqlDbType.VarChar, 50), new SqlParameter("@commend", SqlDbType.VarChar, 50), new SqlParameter("@regip", SqlDbType.VarChar, 50), new SqlParameter("@webgold", SqlDbType.Int, 4) };
            parameters[0].Value = userid;
            parameters[1].Value = userpwd;
            parameters[2].Value = key;
            parameters[3].Value = sex;
            parameters[4].Value = email;
            parameters[5].Value = commend;
            parameters[6].Value = regip;
            parameters[7].Value = webgold;
            switch (providers.RunProcedure("Web_Register", parameters, out num))
            {
            case 0:
                return("恭喜您,帳號註冊成功, 需要使用網站功能請先登陸");

            case 1:
                return("對不起,此用戶已經被註冊!");
            }
            return("系統級錯誤,請聯繫管理員!");
        }