private void AddFacilityButton_Click(object sender, EventArgs e) { IDDFacilityAdd f = new IDDFacilityAdd(); f.ShowDialog(); DeleteFacilityButton.Enabled = (NC.App.DB.Facilities.GetList().Count > 1); }