private void salesPrecreation() { if (comboCustomer.SelectedItem.ToString() == "Not Registered") { MessageBox.Show("Enter Customer"); } else { SalesTransaction Sales = new SalesTransaction(); Guid ID = Guid.NewGuid(); Sales.SalesTrID = ID.ToString(); if (comboType.SelectedItem.ToString() == "Delivery") { Sales.Delivery = createDelivery(); } Sales.Type = comboType.SelectedItem.ToString(); Sales.DiscCode = "NON"; Sales.Products = emp.loadCartProduct(flowLayoutPanelCheckoutItems); Sales.TotalPrice = Convert.ToInt32(txtTotal.Text); Sales.ManPrice = emp.calculateManTotal(Sales.Products); Sales.Customer = currentCust; foreach (Product i in Sales.Products) { Console.WriteLine(i.Name + " " + i.Qty); } FormOrderConfirmation form = new FormOrderConfirmation(Sales, dateTimePicker1.Value); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { clear(); } } }
private void btnFav_Click(object sender, EventArgs e) { buttonActive(btnFav); //populateProducts("Fav"); FormOrderConfirmation m = new FormOrderConfirmation(); m.ShowDialog(); }