Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = 0;
            gnum(ref id,"id");
            if (!IsPostBack)
            {
                MemberDal mb = new MemberDal();
                MemberInfo info = new MemberInfo();
                info = mb.view(id);
                username.Value = info.username;
                truename.Value = info.truename;
                birth.Value = info.birth;
                if (info.sex)
                    sex1.Checked = true;
                else
                    sex2.Checked = true;

                email.Value = info.email;
                telphone.Value = info.telphone;
                mobile.Value = info.mobile;
                qq.Value = info.qq;
                address.Value = info.address;
                nickname.Value = info.nickname;
            }

        }
Exemple #2
0
        /// <summary>
        /// µÇ½Óû§ÐÅÏ¢
        /// </summary>
        /// <returns></returns>
        public MemberInfo get()
        {
            if (islogin())
            {
                MemberDal dal = new MemberDal();

                return dal.view(getCookie("username"));
            }
            else
                return new MemberInfo();
        }
Exemple #3
0
        /// <summary>
        /// 怫
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public bool login(string username, string password)
        {
            MemberInfo info = new MemberInfo();
            info.username = username;
            info.password = password;
            MemberDal bal = new MemberDal();
            if (bal.login(info))
            {
                MemberInfo info1 = bal.view(username);
                if (info1.nickname != "" && info.username != null)
                    setCookie("nickname", Server.UrlEncode(info1.nickname));
                else
                    setCookie("nickname", username);

                setCookie("username", username);

                setCookie("password", md5(password));
                return true;
            }
            else
                return false;
        }