private void gameGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            GAME game = gameGrid.SelectedItem as GAME;
            int  ID   = game.Id;

            txtId.Text = ID.ToString();
        }
Exemple #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(tbTitle.Text))
            {
                service.GamesService gservice = new service.GamesService();
                GAME game = new GAME()
                {
                    Title    = tbTitle.Text,
                    Console  = cbConsole.Text,
                    Genre    = cbGenre.Text,
                    Complete = false
                };

                gservice.AddGame(game);

                MessageBox.Show("Your game was added to the Database!");
            }
            else
            {
                MessageBox.Show("Please enter a title");
            }
        }