コード例 #1
0
        public void UpdatePlayer(object sender, EventArgs args)
        {
            player.Name              = playerName.Text;
            player.PreviousTeam      = lastTeam.Text;
            player.Age               = short.Parse(age.Text);
            player.College           = cityBirth.Text;
            player.Salary            = double.Parse(salary.Text);
            player.Description       = description.Text;
            player.ThreePointShooter = shootThrees.IsToggled;
            player.PhoneNumber       = phone.Text;
            player.Email             = email.Text;

            //TODO - Update in the database
            AccessDatabase db = new AccessDatabase();

            db.UpdateList(player);

            //TODO - Go back to Previous Page
            App.Current.MainPage = new NavigationPage(new PlayersPage());
        }