Beispiel #1
0
        /// <summary>
        /// Retrieves the ID of the OrderHeader selected in the datagrid
        /// Passes that id to the new AddOrderView page
        /// Closes the current page
        /// </summary>

        private void BtnSelect_Click(object sender, RoutedEventArgs e)
        {
            int          dgSelectedHeaderId = allOrderHeaders.ElementAt(dgMainMenu.SelectedIndex).Id;
            AddOrderView pageobj            = new AddOrderView(dgSelectedHeaderId);

            pageobj.Show();
            Close();
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new order header (by using LogicLayer class)
        /// Retrieves the id from that new order header
        /// Passes that id to the new AddOrderView page
        /// Closes the current page
        /// </summary>

        private void Btn_AddPage_Click(object sender, RoutedEventArgs e)
        {
            int          orderHeaderId = layer.CreateNewOrderHeader();
            AddOrderView pageobj       = new AddOrderView(orderHeaderId);

            pageobj.Show();
            Close();
        }
Beispiel #3
0
 /// <summary>
 /// NavigateBack() is a function that navigates back to the main page
 /// </summary>
 private void NavigateBack()
 {
     AddOrderView newView = new AddOrderView(orderHeaderId);
     newView.Show();
     Close();
 }