private void AddMaterialTypeBtn_Click(object sender, EventArgs e) { IDDItemTypeAdd f = new IDDItemTypeAdd(); f.ShowDialog(); DeleteMaterialTypeBtn.Enabled = (NC.App.DB.Materials.GetList().Count > 1); }