private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var generoSelect = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row as MVCProject.SistemaBibliotecaDBDataSet.GenerosRow; switch (e.ColumnIndex) { case 0: frmEdicaoGenero editGenero = new frmEdicaoGenero(); editGenero.generosRow = generoSelect; editGenero.ShowDialog(); this.generosTableAdapter.Update(editGenero.generosRow); break; } this.generosTableAdapter.Fill(this.sistemaBibliotecaDBDataSet.Generos); }
private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var Genero = ((System.Data.DataRowView) this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row as MVCProject.BaseDeDadosBibliotecaDataSet.GenerosRow; switch (e.ColumnIndex) { case 0: { frmEdicaoGenero addGenero = new frmEdicaoGenero(); addGenero.generorow = Genero; addGenero.ShowDialog(); this.generosTableAdapter1.Update(addGenero.generorow); } break; } this.generosTableAdapter1.Fill(this.baseDeDadosBibliotecaDataSet.Generos); }