예제 #1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            rentcarEntities db   = new rentcarEntities();
            Cars            save = new Cars
            {
                Car          = Car.Text,
                CarAvailable = Available.Text,
                CarCountry   = Country.Text,
                CarModel     = Model.Text,
                CarYear      = Data.Text,
                VIN          = Vin.Text
            };

            db.Cars.Add(save);
            db.SaveChanges();
            MessageBox.Show("Машина добавлен");
            CarList reg = new CarList();

            this.Hide();
            reg.Show();
        }
예제 #2
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     CarList re = new CarList();
     this.Hide();
     re.Show();
 }