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