private void orderDetailsForm_Load(object sender, EventArgs e) { dietService dietserv = new dietService(); string[] info = new string[2]; info = dietserv.getDietType(sumOrderLabel10.userSummaryData); sumOrderLabel10.userSummaryData = info[0]; sumOrderLabel11.userSummaryData = info[1]; }
private void button1_Click(object sender, EventArgs e) { customerService customerserv = new customerService(); int customerID = customerserv.addCustomerToBase(getCustomerInformation()); paymentService paymentserv = new paymentService(); int paymentID = paymentserv.addCardToBase(getCardInformation()); dietService dietserv = new dietService(); int dietID = dietserv.getDietObj(sumOrderLabel10.userSummaryData); //int dietID = dietserv.getDietID(sumOrderLabel10.userSummaryData); //Order order = new Order(getCustomerInformation(), getCardInformation(), dietObj); orderService orderserv = new orderService(); orderID = orderserv.addOrderToBase(customerID, dietID, paymentID); this.Close(); PurchasedOrderForm purchasedorderform = new PurchasedOrderForm(); purchasedorderform.Show(); }