private void ToolStripButtonAdd_Click(object sender, EventArgs e) { LibIntegral.Integral integral = new LibIntegral.Integral(); IntegralForm carForm = new IntegralForm(integral); if (carForm.ShowDialog() == DialogResult.OK) { IntegralBindingSource.Add(integral); } }
private void ToolStripButtonEdit_Click(object sender, EventArgs e) { LibIntegral.Integral artist = IntegralBindingSource.List[IntegralBindingSource.Position] as LibIntegral.Integral; if (artist != null) { IntegralForm carForm = new IntegralForm(artist); if (carForm.ShowDialog() == DialogResult.OK) { IntegralBindingSource.List[IntegralBindingSource.Position] = artist; } } }