private void btnAdd_Click(object sender, EventArgs e) { getAuthorID(); AuthorEntry authorEntry = new AuthorEntry(this, CommonConstant.DB_INSERT); authorEntry.authorid = authorid; authorEntry.Show(); }
private void authorDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int i; i = authorDataGridView.CurrentRow.Index; AuthorEntry authorentry = new AuthorEntry(this, CommonConstant.DB_UPDATE); authorentry.Show(); authorentry.authorid = authorDataGridView.Rows[i].Cells[0].Value.ToString(); authorentry.txtName.Text = authorDataGridView.Rows[i].Cells[1].Value.ToString(); authorentry.txtSubName.Text = authorDataGridView.Rows[i].Cells[2].Value.ToString(); if (authorDataGridView.Rows[i].Cells[3].Value.ToString() == "Male") { authorentry.radioMale.Checked = true; } else { authorentry.radioFemale.Checked = true; } authorentry.Show(); }