예제 #1
0
        private void btnAlterar_Click(object sender, EventArgs e)
        {
            try
            {
                tb_autor autor = dgvAutor.CurrentRow.DataBoundItem as tb_autor;

                frmCadastroAutor frm = new frmCadastroAutor();
                frm.PreencherCampos(autor.id_autor);
                ((frmPrincipal)this.ParentForm).CarregarPanel(frm);
            }
            catch (Exception)
            {
                MessageBox.Show($"Você deve selecionar um livro para visualizar!", "Biblioteca",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            frmCadastroAutor frm = new frmCadastroAutor();

            ((frmPrincipal)this.ParentForm).CarregarPanel(frm);
        }