private void btnUpdate_Click(object sender, EventArgs e) { selectedAuthor.FirstName = txtFirstName.Text; selectedAuthor.LastName = txtLastName.Text; selectedAuthor.BirthDate = dtBirthday.Value; selectedAuthor.Biography = rtxBiography.Text; authorRepository.Update(selectedAuthor); MessageBox.Show(AuthorMessages.UpdateAuthorMessage()); GetAuthors(); }
private void btnAdd_Click(object sender, EventArgs e) { Author author = new Author(); author.FirstName = txtFirstName.Text; author.LastName = txtLastName.Text; author.BirthDate = dtBirthday.Value; author.Biography = rtxBiography.Text; authorRepository.Add(author); MessageBox.Show(AuthorMessages.AddAuthorMessage()); GetAuthors(); }
private void btnDelete_Click(object sender, EventArgs e) { authorRepository.Delete(selectedAuthor); MessageBox.Show(AuthorMessages.DeleteAuthorMessage()); }