private void btnAdicionar_Click(object sender, EventArgs e) { FormLivro form = new FormLivro(); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(this); Fill(""); }
private void btnEditar_Click(object sender, EventArgs e) { if (dgvAcervo.CurrentCell != null) { int row = dgvAcervo.CurrentCell.RowIndex; IDatabase bd = new BDDicionario(); Livro result = bd.Read(long.Parse(dgvAcervo.Rows[row].Cells[0].Value.ToString())); FormLivro form = new FormLivro(true, result); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(this); Fill(""); } }