Esempio n. 1
0
 //default constructor
 public customerMainViewModel()
 {
     //initialized
     service = new customerService();
     //list = new ObservableCollection<customer>();
     //list populated
     list = service.getAllCustomers();
     //commands initialized
     signUpCommand = new DelegateCommand(signup, cansignup);
     signInCommand = new DelegateCommand(signin, canSignin);
 }
        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();
        }