Esempio n. 1
0
        public static int UpdateUserBalance(float balance, string id)
        {
            GameUserModel user = new GameUserModel
            {
                Balance = balance
            };
            string sql = @"update dbo.GameUsers set Balance += @Balance where UserId ='" + id + "';";

            return(SqlDataAccess.UpdateUser(sql, user));
        }
Esempio n. 2
0
        public static int UpdateUser(string fname, string lname, int age, string id)
        {
            GameUserModel user = new GameUserModel
            {
                Fname = fname,
                Lname = lname,
                Age   = age
            };
            string sql = @"update dbo.GameUsers set fname = @Fname, lname = @Lname, Age = @Age where UserId ='" + id + "';";

            return(SqlDataAccess.UpdateUser(sql, user));
        }