private void button2_Click(object sender, EventArgs e) { ShowAllBrands f = new ShowAllBrands(); f.Show(); this.Hide(); }
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(); }