Пример #1
0
        private void tsbtnCadastrar_Click(object sender, EventArgs e)
        {
            //iniciar o formulario de cadastrar livro
            Frm_Cadastrar_Livros objCadastrar_Livros = new Frm_Cadastrar_Livros();

            objCadastrar_Livros.ShowDialog();
        }
Пример #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            // Pegando o código da linha selecionada.
            int codigo = Convert.ToInt32(dgv_Livros.CurrentRow.Cells[0].Value.ToString());
            Frm_Cadastrar_Livros objCadastrarLivros = new Frm_Cadastrar_Livros(codigo);

            objCadastrarLivros.ShowDialog();
            dgv_Livros.Rows.Clear();
            btnEditar.Enabled  = false;
            btnExcluir.Enabled = false;
        }