예제 #1
0
        public void Update(string username, User user)
        {
            var parms = new Dictionary<string, string>();
            parms.Add("@TableName", "users");
            parms.Add("@User", "user");
            parms.Add("@UserName", username);

            _db.Update("users", user.ToDictionary(), "@User = '******'", parms);
        }
예제 #2
0
        public void Update(string username, User user)
        {
            var parms = new Dictionary <string, string>();

            parms.Add("@TableName", "users");
            parms.Add("@User", "user");
            parms.Add("@UserName", username);

            _db.Update("users", user.ToDictionary(), "@User = '******'", parms);
        }
예제 #3
0
        private User NewUser(string username)
        {
            var user = new User(username);

            user.FirstSeen = DateTime.Now;
            var stream = _twitch.GetTwitchStream(Chat.MainChannel.Substring(1));

            if (stream != null)
            {
                user.FirstGame = stream.game;
            }

            var data = user.ToDictionary();

            data.Add("user", user.Name);
            _db.Insert("users", data);

            return(user);
        }
예제 #4
0
        private User NewUser(string username)
        {
            var user = new User(username);
            user.FirstSeen = DateTime.Now;
            var stream = _twitch.GetTwitchStream(Chat.MainChannel.Substring(1));
            if (stream != null) user.FirstGame = stream.game;

            var data = user.ToDictionary();
            data.Add("user", user.Name);
            _db.Insert("users", data);

            return user;
        }