private void dgvOperations_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { //string strItem = dgvItems.CurrentRow.Cells["txtItemIDColumn"].Value.ToString(); string strJob; string strOperation; string strSuffix; frmNotesViewer objfrmNoteViewer; Notes objNotes; strJob = dgvJobs.CurrentRow.Cells["txtJobIDColumn"].Value.ToString(); strOperation = dgvOperations.CurrentRow.Cells["txtOperationIDColumn"].Value.ToString(); strSuffix = dgvJobs.CurrentRow.Cells["txtSuffixColumn"].Value.ToString(); objNotes = new Notes(strJob, strOperation, strSuffix); objfrmNoteViewer = new frmNotesViewer(); objfrmNoteViewer.Notes = objNotes; objfrmNoteViewer.Show(); }
private void dgvItems_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Item objItem; frmSelectOperation objfrmSelectOperation; frmNotesViewer objfrmNoteViewer; Notes objNotes; objItem = dgvItems.CurrentRow.DataBoundItem as Item; objfrmSelectOperation = new frmSelectOperation(objItem.CurrentOperations); objfrmSelectOperation.ShowDialog(); if (objfrmSelectOperation.SelectedOperation != null) { objNotes = new Notes(objItem.ItemID, objfrmSelectOperation.SelectedOperation.OperationID); objfrmNoteViewer = new frmNotesViewer(); objfrmNoteViewer.Notes = objNotes; objfrmNoteViewer.Show(); } }