private void AddButton_Click(object sender, RoutedEventArgs e) { if (service.AddColumn(this.cdc.ColumnName, this.boardName)) // Successfull adition { BoardWindow win = new BoardWindow(this.service, this.boardName); // return to board window win.Show(); this.Close(); } else if (this.cdc.ColumnName == "" || this.cdc.ColumnName == null) { MessageBox.Show("The column's name is invalid"); } else { MessageBox.Show("This column already exists in the board!"); } }