private void BTN_UPD_Click(object sender, EventArgs e) { ADD_Preparat adp = new ADD_Preparat(); preparatDGVBindingSource.AddNew(); adp.preparatBindingSource.DataSource = preparatDGVBindingSource; adp.preparatBindingSource.Position = preparatDGVBindingSource.Position; if (adp.ShowDialog() == DialogResult.OK) { preparatDGVTableAdapter.Update(myDBDataSet.preparatDGV); preparatDGVTableAdapter.Fill(myDBDataSet.preparatDGV); } }
private void button1_Click(object sender, EventArgs e) { ADD_Preparat ads = new ADD_Preparat(); preparatBindingSource.AddNew(); ads.preparatBindingSource.DataSource = preparatBindingSource; ads.preparatBindingSource.Position = preparatBindingSource.Position; if (ads.ShowDialog() == DialogResult.OK) { preparatTableAdapter.Update(myDBDataSet.Preparat); this.preparatTableAdapter.Fill(this.myDBDataSet.Preparat); } }