Esempio n. 1
0
        private void AddRide_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;
            }
            rc.addRide(nameBox.Text, descriptionBox.Text, dur, age, height, RestrictionBox.Text);
            MessageBox.Show("Add Succesful");
            this.Close();
        }