private void button1_Click(object sender, EventArgs e) { Product Pr = new Product() { Shop = (Shops)Enum.Parse(typeof(Shops), ShopList.Text), Category = ItemGroup.Text, Name = ProductName.Text.Trim(), PriceUnit = PriceUnit.Text, Price = Price.Text.Trim(), Id = 0 }; AddController.AddProducts(Pr); }