private void AddArea_Click(object sender, System.EventArgs e) { Area area = new Area( ); area.Parent = TestTreeView.GetNodeFromIndex(TestTreeView.SelectedNodeIndex).ID; area.Name = AreaNameToAdd.Text; dbConnection.AddArea(area); PopulateTreeview( ); AreaInfoPanel.Visible = false; TestEditPanel.Visible = false; }