private void Filter_Number_DropDownOpened_1(object sender, EventArgs e)
        {
            //Init object
            Search = new SearchManager();

            //Fill drop down menu
            Filter_Number.ItemsSource = Search.GetAllInvoicesView();

            //Enable select button
            Btn_Select.IsEnabled = true;
        }
Пример #2
0
        /// <summary>
        /// Creates a new search window.
        /// </summary>
        public SearchWindow()
        {
            InitializeComponent();

            #region Init. Class Variables
            //Setup Search Query Manager
            searchQueryManager = new SearchManager();
            #endregion

            //Test Setup
            Invoice_Data.ItemsSource = searchQueryManager.GetAllInvoicesView();
        }
Пример #3
0
        /// <summary>
        /// Clears the invoice data list (DataGrid) when the clear button is clicked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_Clear_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //Reset datagrid
                Invoice_Data.ItemsSource = searchQueryManager.GetAllInvoicesView();

                //Reset all drop down boxes
                Filter_Number.SelectedItem = null;
                Filter_Date.SelectedItem   = null;
                Filter_Total.SelectedItem  = null;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }