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