Exemple #1
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:
            {
                frmEdit            = new frmEditAutor();
                frmEdit.AutoresRow = autorSelect;
                frmEdit.ShowDialog();
                this.autoresTableAdapter.Update(frmEdit.AutoresRow);
            }; break;
            }
            this.autoresTableAdapter.Fill(this.sistemaBibliotecaDBDataSet.Autores);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }