示例#1
0
 private void fromSharePointToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DatabaseConnectionDialog dialog = new DatabaseConnectionDialog();
     dialog.DatabaseType = "SharePoint";
     dialog.DatabaseTypeComboBoxEnabled = false;
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         // TODO: import from sharepoint.
         string connectionString = dialog.ConnectionString;
         ImportFromSharePoint(connectionString);
     }
 }
示例#2
0
 private void ImportFromDatabase(object sender, EventArgs e)
 {
     DatabaseConnectionDialog dialog = new DatabaseConnectionDialog();
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         // TODO: import from database.
         string databaseType = dialog.DatabaseType;
         string connectionString = dialog.ConnectionString;
         if (databaseType == "SharePoint")
         {
             ImportFromSharePoint(connectionString);
         }
         else
         {
             DatabaseReader reader = new DatabaseReader();
             Definitions.Definition definition = reader.ReadDatabase(databaseType, connectionString);
             AppendDefinition(definition);
         }
     }
 }