Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var form = new frmAddBook();

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Client.BooksDatabase.Add(form.AddingBook);
            }
        }
Beispiel #2
0
 private void button5_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow Row in dgvBooks.SelectedRows)
     {
         var form = new frmAddBook(Client.BooksDatabase[Row.Index]);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Client.BooksDatabase[Row.Index] = form.AddingBook;
         }
     }
 }