Esempio n. 1
0
        private void UpdateRide_Click(object sender, RoutedEventArgs e)
        {
            int age, dur, height;

            try
            {
                age    = Int32.Parse(AgeBox.Text);
                height = Int32.Parse(heightBox.Text);
                dur    = Int32.Parse(durationBox.Text);
            }
            catch
            {
                MessageBox.Show("Age, Height, and Duration Must Be int");
                return;
            }
            newR.Status              = status.Text;
            newR.ActivityName        = nameBox.Text;
            newR.ActivityDuration    = dur;
            newR.ActivityDescription = descriptionBox.Text;
            newR.MinHeight           = height;
            newR.MinAge              = age;
            newR.Restriction         = RestrictionBox.Text;
            rc.updateRide(r, newR);
            MessageBox.Show("Update Succesful");
            this.Close();
        }