Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            ShowAllBrands f = new ShowAllBrands();

            f.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void Add_Click(object sender, EventArgs e)
        {
            String n = name.Text;

            Model1 db = new Model1();

            db.brands.Add(new brand {
                id = db.brands.Count(), name = n
            });

            db.SaveChanges();

            ShowAllBrands f = new ShowAllBrands();

            f.Show();
            this.Hide();
        }