using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Rp42Ivanova { public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void productBindingNavigatorSaveItem_Click(object sender, EventArgs e) { this.Validate(); this.productBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.rp42IvanovaDataSet); } private void Form3_Load(object sender, EventArgs e) { // TODO: данная строка кода позволяет загрузить данные в таблицу "rp42IvanovaDataSet.product". При необходимости она может быть перемещена или удалена. this.productTableAdapter.Fill(this.rp42IvanovaDataSet.product); } private void button1_Click(object sender, EventArgs e) { productBindingSource.RemoveCurrent(); } private void button2_Click(object sender, EventArgs e) { productBindingSource.AddNew(); } private void button3_Click(object sender, EventArgs e) { this.Validate(); this.productBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.rp42IvanovaDataSet); } private void button1_Click_1(object sender, EventArgs e) { productBindingSource.AddNew(); } private void button2_Click_1(object sender, EventArgs e) { productBindingSource.RemoveCurrent(); DialogResult result = MessageBox.Show("Удалить элемент?", "Подтвердите действие", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { MessageBox.Show("Элемент удален", "Ок"); } else if (result == DialogResult.No) { } } private void button3_Click_1(object sender, EventArgs e) { this.Validate(); this.productBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.rp42IvanovaDataSet); } } }