private void btnAdd_Click(object sender, EventArgs e) { getPublisherID(); PublisherEntry publisherentry = new PublisherEntry(this, CommonConstant.DB_INSERT); publisherentry.publisherid = this.publisherid; publisherentry.Show(); }
private void publisherDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int i; i = publisherDataGridView.CurrentRow.Index; PublisherEntry publisherentry = new PublisherEntry(this, CommonConstant.DB_UPDATE); publisherentry.publisherid = publisherDataGridView.Rows[i].Cells[0].Value.ToString(); publisherentry.addressid = publisherDataGridView.Rows[i].Cells[1].Value.ToString(); publisherentry.txtName.Text = publisherDataGridView.Rows[i].Cells[2].Value.ToString(); publisherentry.txtPhone.Text = publisherDataGridView.Rows[i].Cells[3].Value.ToString(); publisherentry.txtEmail.Text = publisherDataGridView.Rows[i].Cells[4].Value.ToString(); publisherentry.txtAddress.Text = publisherDataGridView.Rows[i].Cells[5].Value.ToString(); publisherentry.txtCity.Text = publisherDataGridView.Rows[i].Cells[6].Value.ToString(); publisherentry.cbState.Text = publisherDataGridView.Rows[i].Cells[7].Value.ToString(); publisherentry.Show(); }