Beispiel #1
0
        public bool SignIn(string name, string pass)
        {
            var model = UserInfoAccess.GetDataBy(name);

            if (model != null && model.password == pass)
            {
                model.state = Global.State.ONLINE;
                UserInfoAccess.Update(model);
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        public bool updateUserInfo(string username, string password, byte state, bool sex, string nickName, string birthday)
        {
            UserInfo model = new UserInfo()
            {
                username = username,
                password = password,
                state    = state,
                sex      = sex,
                nickName = nickName,
                birthday = DateTime.Parse(birthday)
            };

            return(UserInfoAccess.Update(model));
        }