Exemplo n.º 1
0
        /// <summary>
        /// Set-up for changing to a new table
        /// </summary>
        private void Setup()
        {
            tableName      = cmbTable.SelectedItem.ToString();
            editingSidebar = null;

            columns = DBMethods.MetaRequests.GetColumnDataFromTable(tableName);

            // Allow the user to search through all columns or a specific column for the table
            List <string> colSearch = new List <string> {
                "All Columns"
            };

            colSearch.AddRange(columns.Select(c => c.Name));

            if (editingSidebar != null)
            {
                editingSidebar.Close();
            }

            editingSidebar     = new DataEditingSidebar(columns, tableName, this);
            lblSidebar.Content = editingSidebar.Content;

            if (!(filterableDataGrid is null))
            {
                filterableDataGrid.Close();
            }
            filterableDataGrid = new FilterableDataGrid(columns, this);
            filterableDataGrid.SetMaxHeight(700);
            lblSearchData.Content = filterableDataGrid.Content;
        }
Exemplo n.º 2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (editingSidebar != null)
     {
         editingSidebar.Close();
     }
 }