private void addUser_Click(object sender, EventArgs e) { userName = ""; AddUserToBaseForm addUserToBaseForm = new AddUserToBaseForm(); addUserToBaseForm.ShowDialog(); }
private void editData_Click(object sender, EventArgs e) { bookName = ""; userName = ""; if (BooksList.CurrentCell.ContextMenuStrip == changeData) { if (BooksList[0, BooksList.CurrentCell.RowIndex].Value == null) { return; } bookName = BooksList[0, BooksList.CurrentCell.RowIndex].Value.ToString(); AddBookToBaseForm addBookToBaseForm = new AddBookToBaseForm(); addBookToBaseForm.ShowDialog(); } if (UsersList.CurrentCell.ContextMenuStrip == changeData) { if (UsersList[0, UsersList.CurrentCell.RowIndex].Value == null) { return; } userName = UsersList[0, UsersList.CurrentCell.RowIndex].Value.ToString(); AddUserToBaseForm addUserToBaseForm = new AddUserToBaseForm(); addUserToBaseForm.ShowDialog(); } }