Example #1
0
 private void importDataTypeButton_Click(object sender, EventArgs e)
 {
     if (this.importDataTypeSelect.SelectedItem.ToString() == "MongoDB and Excel")
     {
         if (this.loadExcelTextBox.Text == "" && this.loadMongoDBTextBox.Text == "")
         {
             MessageBox.Show("Choose MongoDB connection string and Excel file first!");
         }
         else if (this.loadExcelTextBox.Text == "")
         {
             MessageBox.Show("Choose Excel file first!");
         }
         else if (this.loadMongoDBTextBox.Text == "")
         {
             MessageBox.Show("Choose MongoDB connection string first!");
         }
         else
         {
             UIEngine.ImportExcelAndMongoData(this.loadMongoDBTextBox.Text, this.loadExcelTextBox.Text);
         }
     }
     else if (this.importDataTypeSelect.SelectedItem.ToString() == "XML")
     {
         if (this.loadXMLTextbox.Text == "")
         {
             MessageBox.Show("Choose XML file first!");
         }
         else if (this.loadMongoDBTextBox.Text == "")
         {
             MessageBox.Show("Choose MongoDB connection string first!");
         }
         else
         {
             UIEngine.ImportXMLToMongoAndSQLServer(this.loadMongoDBTextBox.Text, this.loadXMLTextbox.Text);
         }
     }
 }