Exemplo n.º 1
0
 private void AddNewAuthor(object sender, BookRelatedEventArgs e)
 {
     if (!LibraryDataIO.Instance.Authors.Any(author => author.FullName == e.Author.FullName))
     {
         LibraryDataIO.Instance.AddAuthor(e.Author);
         authorForm?.Close();
         adminForm.RefreshAuthors();
     }
     else
     {
         MessageBox.Show("Author already exists!");
     }
 }