Esempio n. 1
0
        public DataSet GetPlayersData() //return all players data
        {
            string            query = @"SELECT [PlayerID], [PName], [CNIC], [GamesPlayed], [GamesWon], [GamesLost] FROM [CCUBE].[dbo].[Players]";
            ConnectToDatabase c     = new ConnectToDatabase();

            c.ConnectToDB();
            return(c.ExceuteQuerySet(query));
        }
Esempio n. 2
0
        public int registerUser(string name, string cnic)
        {
            ConnectToDatabase c = new ConnectToDatabase();

            c.ConnectToDB();
            string query = @" INSERT INTO Players (PName, CNIC) VALUES('" + name + "','" + cnic + "')";

            return(c.UpdateQuery(query));
        }