private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var autorSelect = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row as MVCProject.SistemaBibliotecaDBDataSet.AutoresRow; switch (e.ColumnIndex) { case 0: { frmEdit = new frmEditAutor(); frmEdit.AutoresRow = autorSelect; frmEdit.ShowDialog(); this.autoresTableAdapter.Update(frmEdit.AutoresRow); }; break; } this.autoresTableAdapter.Fill(this.sistemaBibliotecaDBDataSet.Autores); }
private void DgvAutores_CellContentClick(object sender, DataGridViewCellEventArgs e) { var selectAutores = ((System.Data.DataRowView) this.dgvAutores.Rows[e.RowIndex].DataBoundItem).Row as MVCProject.SistemaBibliotecaDBDataSet.AutoresRow; switch (e.ColumnIndex) { case 0: { frmEditAutor editAutor = new frmEditAutor(); editAutor.AutorRow = selectAutores; editAutor.ShowDialog(); this.autoresTableAdapter.Update(editAutor.AutorRow); } break; } this.autoresTableAdapter.Fill(sistemaBibliotecaDBDataSet.Autores); }
private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var autorSelect = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row as MVCProject.SistemaBibliotecaHBSISDataSet.AutoresRow; switch (e.ColumnIndex) { //case 1: { this.autoresTableAdapter.DeleteQuery(autorSelect.Id); } break; case 0: { frmEditAutor editUser = new frmEditAutor(); editUser.AutoresRow = autorSelect; editUser.ShowDialog(); this.autoresTableAdapter.Update(autorSelect); } break; } this.autoresTableAdapter.CustomQuery(this.sistemaBibliotecaHBSISDataSet.Autores); }