private void BTN_add1_Click(object sender, EventArgs e) { ADD_svyaz sv = new ADD_svyaz(); discountDGVBindingSource.AddNew(); sv.discountBindingSource.DataSource = discountDGVBindingSource; sv.discountBindingSource.Position = discountDGVBindingSource.Position; if (sv.ShowDialog() == DialogResult.OK){ discountDGVTableAdapter.Update(myDBDataSet.DiscountDGV); this.discountDGVTableAdapter.Fill(this.myDBDataSet.DiscountDGV);} }
private void BTN_upd1_Click(object sender, EventArgs e) { ADD_svyaz sv = new ADD_svyaz(); sv.discountBindingSource.DataSource = discountDGVBindingSource; sv.discountBindingSource.Position = discountDGVBindingSource.Position; if (sv.ShowDialog() == DialogResult.OK) { discountDGVTableAdapter.Update(myDBDataSet.DiscountDGV); this.discountDGVTableAdapter.Fill(this.myDBDataSet.DiscountDGV); } }