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)); }
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)); }