private void dgvQueue_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmInstrumentCalibrationQueueItem objfrmInstrumentCalibrationQueueItem;

            objfrmInstrumentCalibrationQueueItem = new frmInstrumentCalibrationQueueItem(((Instrument)dgvQueue.CurrentRow.DataBoundItem).InstrumentID);
            objfrmInstrumentCalibrationQueueItem.MdiParent = this.ParentForm;
            objfrmInstrumentCalibrationQueueItem.Show();
        }
コード例 #2
0
        private void dgvInstruments_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (FormMode == FormMode.Select)
                ReturnSelectedItem();
            else if (FormMode == FormMode.Edit)
            {
                frmInstrumentCalibrationQueueItem objfrmInstrumentCalibrationQueueItem;
                Instrument objInstrument;

                if (dgvInstruments.SelectedRows.Count == 0)
                    MessageBox.Show("No Instrument selected!", "Instrument", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                else
                {
                    objInstrument = dgvInstruments.CurrentRow.DataBoundItem as Instrument;
                    objfrmInstrumentCalibrationQueueItem = new frmInstrumentCalibrationQueueItem(objInstrument.InstrumentID);
                    objfrmInstrumentCalibrationQueueItem.MdiParent = this.ParentForm;
                    objfrmInstrumentCalibrationQueueItem.Show();
                }
            }
        }