Пример #1
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                Tb_Cliente_ProveedorTableAdapter ClienteAdapter = new Tb_Cliente_ProveedorTableAdapter();

                ClienteAdapter.Update(this.dt);

                dt.AcceptChanges();

                this.load();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "btnAceptar_Click");
            }
        }
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            //string  x = this.dgvCliente.DataSource.GetType().ToString();

            //DSEntitiesCliente.Tb_Cliente_ProveedorRow[] filarNuevas = (DSEntitiesCliente.Tb_Cliente_ProveedorRow[])dt.Select("", "", DataViewRowState.Added);
            //DSEntitiesCliente.Tb_Cliente_ProveedorRow[] filarModificadas = (DSEntitiesCliente.Tb_Cliente_ProveedorRow[])dt.Select("", "", DataViewRowState.ModifiedCurrent);

            try
            {
                Tb_Cliente_ProveedorTableAdapter ClienteAdapter = new Tb_Cliente_ProveedorTableAdapter();

                ClienteAdapter.Update(this.dt);

                dt.AcceptChanges();

                this.load();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "btnAceptar_Click");
            }
        }