private void button18_Click(object sender, System.EventArgs e) { AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall(); if (antivirusForm.ShowDialog() == DialogResult.OK) { IDS ids = new IDS() { Name = antivirusForm.NameObject, Price = antivirusForm.PriceObject, Support = antivirusForm.SuppotObject, ClassId = antivirusForm.ClassObject }; _baseWorker.AddObject(ids, "IDS"); RefreshIdes(); } }
private void button17_Click(object sender, System.EventArgs e) { IDS oldIds = idsListBox.SelectedItem as IDS; if (oldIds == null) { return; } AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall(oldIds); if (antivirusForm.ShowDialog() == DialogResult.OK) { IDS newIds = new IDS() { Name = antivirusForm.NameObject, Price = antivirusForm.PriceObject, Support = antivirusForm.SuppotObject, ClassId = antivirusForm.ClassObject }; _baseWorker.ChangeObject(oldIds, newIds, "IDS"); RefreshIdes(); } }