private void gridLivros_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Insert) { var formCadastro = new CasosDeUso.RegistrarLivro.FormCadastroRegistrarLivro(null); formCadastro.ShowDialog(); CarregarLivros(); } }
private void AlterarLivro() { if (gridLivros.Rows.Count > 0 && gridLivros.CurrentRow != null) { var tlivro = gridLivros.CurrentRow.DataBoundItem as Aplicacao.Descritores.TLivro; var formCadastro = new CasosDeUso.RegistrarLivro.FormCadastroRegistrarLivro(tlivro); formCadastro.ShowDialog(); CarregarLivros(); } }
private void AlterarLivro() { if (gridLivros.Rows.Count > 0 && gridLivros.CurrentRow != null) { var livro = gridLivros.CurrentRow.DataBoundItem as LivroDTO; var formCadastro = new CasosDeUso.RegistrarLivro.FormCadastroRegistrarLivro(livro); formCadastro.ShowDialog(); CarregarLivros(); } }