예제 #1
0
 private void NextButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         order.BranchID = getBranchSelected();
         order.Time     = DateTime.Now;
         KashrutComboBox.GetBindingExpression(ComboBox.TextProperty).UpdateSource();
         PaymentComboBox.GetBindingExpression(ComboBox.TextProperty).UpdateSource();
         this.creditCardUserControl.NameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         this.creditCardUserControl.NumberTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         this.creditCardUserControl.CVVTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         this.creditCardUserControl.MonthTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         this.creditCardUserControl.YearTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         this.NoteTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
         int orderID = bl.nextOrderID();
         bl.addOrder(order);
         AddDishesToOrderPage p = new AddDishesToOrderPage();
         p.od.OrderID = orderID;
         this.NavigationService.Navigate(p);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
예제 #2
0
        private void NextButton_Click(object sender, RoutedEventArgs e)
        {
            //try
            //{
            order.BranchID = getBranchSelected();
            order.Time     = DateTime.Now;
            KashrutComboBox.GetBindingExpression(ComboBox.TextProperty).UpdateSource();
            PaymentComboBox.GetBindingExpression(ComboBox.TextProperty).UpdateSource();
            this.creditCardUserControl.NameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            this.creditCardUserControl.NumberTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            this.creditCardUserControl.CVVTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            this.creditCardUserControl.MonthTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            this.creditCardUserControl.YearTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            this.NoteTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            int orderID = bl.nextOrderID();

            bl.updateOrder(order.OrderID, order);

            this.NavigationService.GoBack();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message, "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
            //}
        }