static void Main() { Inventory.AddPart(new Inhouse("Tire", 15, 10, 1, 25, 465)); Inventory.AddPart(new Outsourced("Seat", 15, 8, 1, 25, "Davids Seats")); Inventory.AddProduct(new Product("Blue Bike", 5, 100, 1, 10)); Inventory.AddProduct(new Product("Red bike", 5, 100, 1, 10)); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainScreen()); }
private void ProdSaveBtn_Click(object sender, EventArgs e) { String Name = NameTextBox.Text; int Instock = int.Parse(InStockTextBox.Text); decimal Price = Decimal.Parse(PriceTextBox.Text); int Min = int.Parse(MinTextBox.Text); int Max = int.Parse(MaxTextBox.Text); Inventory.AddProduct(new Product(Name, Instock, Price, Min, Max)); Form.ActiveForm.Close(); }