Beispiel #1
0
        private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var userSelect = ((System.Data.DataRowView)
                              this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row

                             as MVCProject.SistemaBibliotecaDBADataSet.AutoresRow;

            switch (e.ColumnIndex)
            {
            case 0:
            {
                // DELETE

                this.autoresTableAdapter.DeleteQuery(userSelect.Id);
            }
            break;

            case 1:
            {
                frmEdicaoAutor edicaoAut = new frmEdicaoAutor();
                edicaoAut.autoresRow = userSelect;
                edicaoAut.autoresRow = userSelect;
                edicaoAut.ShowDialog();


                this.autoresTableAdapter.Update(edicaoAut.autoresRow);
            }
            break;
            }
            this.autoresTableAdapter.CustomQuery(sistemaBibliotecaDBDataSet.Autores);
        }
Beispiel #2
0
        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:
                frmEdicaoAutor editAutor = new frmEdicaoAutor();
                editAutor.AutoresRow = autorSelect;
                editAutor.ShowDialog();

                this.autoresTableAdapter.Update(editAutor.AutoresRow);
                break;
            }

            this.autoresTableAdapter.Fill(this.sistemaBibliotecaDBDataSet.Autores);
        }
Beispiel #3
0
        private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var AutorSel = ((System.Data.DataRowView)
                            this.dataGridView1.Rows[e.RowIndex].DataBoundItem).Row
                           as MVCProject.BaseDeDadosBibliotecaDataSet.AutoresRow;

            switch (e.ColumnIndex)
            {
            case 0:
            {
                frmEdicaoAutor addAutor = new frmEdicaoAutor();
                addAutor.autoresRow = AutorSel;
                addAutor.ShowDialog();

                this.autoresTableAdapter1.Update(addAutor.autoresRow);
            }
            break;
            }
            this.autoresTableAdapter1.Fill(this.baseDeDadosBibliotecaDataSet.Autores);
        }