Ejemplo n.º 1
0
        void UpdateTable(int docType)
        {
            List <DocTable> docReal = DatabaseHandler.GetDocTableDocuments(docPoint, docType);

            docReal.AddIndexes();
            typeToTable[docType].ItemsSource = docReal;
        }
Ejemplo n.º 2
0
        void PopulateTable(int docType, Expander expander)
        {
            if (expander.Content != null)
            {
                return;
            }

            expander.Expanded -= (object sender, RoutedEventArgs e) => PopulateTable(docType, expander);
            List <DocTable> docReal = DatabaseHandler.GetDocTableDocuments(id, docType);

            docReal.AddIndexes();

            DataGrid table = Util.CreateDatagrid(id);

            if (id != -1)
            {
                table.PreviewMouseUp += Table_MouseDown;
                table.MouseDown      += Table_MouseDown;
            }
            table.MouseDoubleClick += Table_MouseDoubleClick;

            sources.Add(table, docReal);

            table.ItemsSource = docReal;
            expander.Content  = table;
            typeToTable.Add(docType, table);
            tableToType.Add(table, docType);
        }
Ejemplo n.º 3
0
        void PopulateTable(int docType, Expander expander)
        {
            if (expander.Content != null)
            {
                return;
            }

            expander.Expanded -= (object sender, RoutedEventArgs e) => PopulateTable(docType, expander);

            List <DocTable> docReal = DatabaseHandler.GetDocTableDocuments(docPoint, docType);
            DataGrid        table   = Util.CreateDatagrid();

            docReal.AddIndexes();

            table.ItemsSource       = docReal;
            table.MouseDoubleClick += (object sender, MouseButtonEventArgs e) => Table_MouseDoubleClick(docType, (DocTable)table.CurrentItem);

            expander.Content = table;
            typeToTable.Add(docType, table);
        }