private void search_Click(object sender, EventArgs e) { AuthorInsertUpdateSearchForm authorInsertUpdateSearch = new AuthorInsertUpdateSearchForm(this); authorInsertUpdateSearch.changeEnableInsert(false); authorInsertUpdateSearch.changeEnableUpdate(false); authorInsertUpdateSearch.changeEnableDateTimePicker(false); authorInsertUpdateSearch.ShowDialog(); }
private void update_Click(object sender, EventArgs e) { AuthorInsertUpdateSearchForm authorInsertUpdateSearchForm = new AuthorInsertUpdateSearchForm(this); authorInsertUpdateSearchForm.changeEnableInsert(false); authorInsertUpdateSearchForm.changeEnableSearch(false); if (authorTable.CurrentRow != null) { String authorId = authorTable.CurrentRow.Cells[0].Value.ToString(); String name = authorTable.CurrentRow.Cells[1].Value.ToString(); String dob = authorTable.CurrentRow.Cells[2].Value.ToString(); authorInsertUpdateSearchForm.changeEnableAuthorIdTextBox(false); authorInsertUpdateSearchForm.setData(authorId, name, dob); } authorInsertUpdateSearchForm.ShowDialog(); }