Пример #1
0
        private void insert_Click(object sender, EventArgs e)
        {
            AuthorInsertUpdateSearchForm authorInsertUpdateSearchForm = new AuthorInsertUpdateSearchForm(this);

            authorInsertUpdateSearchForm.changeEnableUpdate(false);
            authorInsertUpdateSearchForm.changeEnableSearch(false);
            authorInsertUpdateSearchForm.ShowDialog();
        }
Пример #2
0
        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();
        }