Ejemplo n.º 1
0
 protected void getGameData()
 {
     using (GameContext db = new GameContext())
     {
         var gameData = (from eachGame in db.GameTables select eachGame);
         GameGridView.DataSource = gameData.ToList();
         GameGridView.DataBind();
     }
 }
        protected void ConnectionToDB()
        {
            using (VJKMConnection db = new VJKMConnection())
            {
                var gameEdit = (from allgames in db.Games
                                select allgames);

                // bind the result to the GridView
                GameGridView.DataSource = gameEdit.AsQueryable().ToList();
                GameGridView.DataBind();
            }
        }
Ejemplo n.º 3
0
    private void getGame()
    {
        List <SqlParameter> spParams = new List <SqlParameter>();

        spParams.Add(new SqlParameter("@gameName", searchText.Value));
        spParams.Add(new SqlParameter("@stdName", searchText.Value));
        DataSet ds = new DataSet();

        ds = DBHelper.ExecuteBySPName("GameReportSearch", spParams.ToArray());
        GameGridView.DataSource = ds.Tables[0];
        GameGridView.DataBind();
    }
Ejemplo n.º 4
0
        /**
         * <summary>
         * This method gets the games data from the DB
         * </summary>
         *
         * @method Getgame1
         * @returns {void}
         */
        protected void GetGames()
        {
            // connect to EF
            using (ProjectConnection db = new ProjectConnection())
            {
                // query the game Table using EF and LINQ
                var Games = (from allgames in db.MAIN_GAME
                             select allgames);

                // bind the result to the GridView
                GameGridView.DataSource = Games.AsQueryable().ToList();
                GameGridView.DataBind();
            }
        }
Ejemplo n.º 5
0
        // This Method gets the games data from the database

        // @method Getguesttrack

        // @return (void)


        protected void GetGame()
        {
            //connect to the EF
            using (DefaultConnection db = new DefaultConnection())
            {
                //Query the game results
                var Games = (from allGames in db.Game
                             select allGames);



                GameGridView.DataSource = Games.ToList();
                GameGridView.DataBind();
            }
        }
Ejemplo n.º 6
0
        protected void GetGame()
        {
            string sortString = Session["SortColumn"].ToString() + " " + Session["SortDirection"].ToString();

            // connect to EF
            using (GameDefaultConnection db = new GameDefaultConnection())
            {
                // query the Students Table using EF and LINQ
                var g1 = (from allGames in db.Games
                          select allGames);

                // bind the result to the GridView
                GameGridView.DataSource = g1.AsQueryable().OrderBy(sortString).ToList();
                GameGridView.DataBind();
            }
        }