private void UpdateProductButton_Click(object sender, EventArgs e) { try { ProductsData ed = new ProductsData(); SqlProductRepository products = new SqlProductRepository(connectionString); products.UpdateProduct(Convert.ToInt32(ProductIdTextbox.Text), SKUTextbox.Text, ProductNameTextbox.Text, Convert.ToInt32(ProductTypeIDTextbox.Text), Convert.ToInt32(QuantityTextbox.Text), DescriptionTextbox.Text, PriceTextbox.Text, RatingTextbox.Text); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }