private void editMenuItem_Click(Object sender, EventArgs e) { EditForm ef = new EditForm(); int curentRow = bookGridView.CurrentCell.RowIndex; Console.WriteLine(curentRow); if (curentRow >= 0 && curentRow < books.Count) { Book book = books[curentRow]; ef.setData(book); } ef.Show(); }
private void addMenuItem_Click(Object sender, EventArgs e) { EditForm ef = new EditForm(); ef.Show(); Program.container.loadBookAndView(); }