public void Execute(object parameter)
            {
                if (specifiedImport.storedTypesCB.SelectedItem.ToString() != "Add new Type" || specifiedImport.newBankTextbox.Text.ToString() != "")
                {
                    List <string> currentFile = new List <string>();
                    currentFile.Add(currentFileName);
                    new ImportReadIn("Stock", currentFile, specifiedImport.mainWindow, true);
                    if (SpecifiedImportStock.folderPath.Count < specifiedImport.getCurrentFileIndex())
                    {
                        specifiedImport.incrementNumberofFile();
                        string   nextFileName     = SpecifiedImportStock.folderPath[specifiedImport.getCurrentFileIndex()];
                        string[] splittedFileName = nextFileName.Split('\\');
                        int      lastSplitIndex   = nextFileName.Length - 1;
                        specifiedImport.currentFileLabel.Content = "File: " + splittedFileName[lastSplitIndex];
                        set_box_values_to_zero();

                        /*
                         * StoredColumnChecker columnChecker = new StoredColumnChecker();
                         * columnChecker.getDataTableFromSql(specifiedImport.mainWindow);
                         * columnChecker.setAnalyseWorksheet(nextFileName);
                         * columnChecker.setMostMatchesRow(columnChecker.findMostMatchingRow());
                         * columnChecker.setSpecifiedImportPageTextBoxes();
                         */
                    }
                }
                else//didn't typed in the new banks name
                {
                    MessageBox.Show("Type in the new Bank name first, to the TextBox under the Type ComboBox!");
                    specifiedImport.newBankTextbox.Focus();
                }
            }
Example #2
0
            public void Execute(object parameter)
            {
                List <string> currentFile = new List <string>();

                currentFile.Add(currentFileName);
                new ImportReadIn("Stock", currentFile, specifiedImport.mainWindow, true);
                if (SpecifiedImportStock.folderPath.Count < specifiedImport.getCurrentFileIndex())
                {
                    specifiedImport.incrementNumberofFile();
                    string   nextFileName     = SpecifiedImportStock.folderPath[specifiedImport.getCurrentFileIndex()];
                    string[] splittedFileName = nextFileName.Split('\\');
                    int      lastSplitIndex   = nextFileName.Length - 1;
                    specifiedImport.currentFileLabel.Content = "File: " + splittedFileName[lastSplitIndex];
                    set_box_values_to_zero();

                    /*
                     * StoredColumnChecker columnChecker = new StoredColumnChecker();
                     * columnChecker.getDataTableFromSql(specifiedImport.mainWindow);
                     * columnChecker.setAnalyseWorksheet(nextFileName);
                     * columnChecker.setMostMatchesRow(columnChecker.findMostMatchingRow());
                     * columnChecker.setSpecifiedImportPageTextBoxes();
                     */
                }
            }