Exemple #1
0
 private void createDatabase(TreeOfConnections connections)
 {
     //Creating database
     try
     {
         DBCreator db = new DBCreator(connections, databaseName);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Error while creating database", MessageBoxButtons.OK);
         return;
     }
     registerdatabaseCreated(databaseName);
 }
 private void buttonNextStep_Click(object sender, EventArgs e)
 {
     if (textBoxDatabaseName.Text.Trim() == "")
     {
         MessageBox.Show("Session name can not be blank!", "Invalid session name", MessageBoxButtons.OK);
         return;
     }
     try
     {
         if (DBCreator.doesDatabaseExists("RPGH" + textBoxDatabaseName.Text))
         {
             MessageBox.Show("Session already exists! Use diffrent name!", "Bad session name", MessageBoxButtons.OK);
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error was encountered! Erron message: " + ex.Message, "Error in connecting to server", MessageBoxButtons.OK);
         return;
     }
     registerNextStepCreation(textBoxDatabaseName.Text);
 }