示例#1
0
文件: frmAutores.cs 项目: Torug0/GitC
        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);
        }
示例#2
0
文件: frmAutores.cs 项目: Foca87/GitC
        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);
        }
示例#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);
        }