public async void addProduct(string productName, string manufacturer, Category category, double price, string description = "", int quantity = 0) { var newProduct = new Product(); newProduct.Title = productName; newProduct.Manufacturer = manufacturer; newProduct.Quantity = quantity; newProduct.Description = description; newProduct.Category = category; newProduct.UPC = System.Guid.NewGuid().ToString(); newProduct.LastRecieved = DateTime.Now; newProduct.Price = price; this.DbContext.Products.Add(newProduct); await this.DbContext.SaveChangesAsync(); FormNavigator.CloseForm("addProductForm"); }
private void cancelButton_Click(object sender, EventArgs e) { FormNavigator.CloseForm(this); }