예제 #1
0
        public void SavePlayer(object sender, EventArgs args)
        {
            //TODO - Create validation
            Player player = new Player();

            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;

            //Saving in the database
            AccessDatabase dbAccess = new AccessDatabase();

            dbAccess.EnterPlayer(player);

            App.Current.MainPage = new NavigationPage(new SelectPlayerPage());
        }