private void dgvFixtures_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgvFixtures.Columns["btnNotesColumn"].Index)
            {
                frmNoteViewer objfrmNoteViewer;
                Fixture objCheckFixture = dgvFixtures.CurrentRow.DataBoundItem as Fixture;

                if (objCheckFixture.Note == null)
                    objCheckFixture.Note = new Note { LastUpdated = DateTime.Now, NoteContent = string.Empty };

                objfrmNoteViewer = new frmNoteViewer(objCheckFixture.Note);
                objfrmNoteViewer.Show();
            }
            else if (e.ColumnIndex == dgvFixtures.Columns["txtCheckFixtureIDColumn"].Index)
            {
                if (dgvFixtures[e.ColumnIndex, e.RowIndex].Value == null)
                {
                    dgvFixtures[e.ColumnIndex, e.RowIndex].Value = SharedFunctions.GetNextAvailableFixtureNumber() + ++AutoNumberedFixtureCount;
                }
            }
        }
        private void btnNotes_Click(object sender, EventArgs e)
        {
            frmNoteViewer objfrmNoteViewer;

            if (Instrument.Note == null)
                Instrument.Note = new Note { LastUpdated = DateTime.Now, NoteContent = string.Empty };

            objfrmNoteViewer = new frmNoteViewer(Instrument.Note);
            objfrmNoteViewer.Show();
        }
        private void dgvInstruments_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            Instrument objInstrument = dgvInstruments.CurrentRow.DataBoundItem as Instrument;

            if (FormMode == FormMode.Edit)
                if (e.ColumnIndex == dgvInstruments.Columns["btnLocationColumn"].Index)
                {
                    if (objInstrument != null)
                    {
                        frmLocations objfrmLocations = new frmLocations(objInstrument.LocationID);
                        objfrmLocations.db = db;
                        objfrmLocations.FormMode = FormMode.Select;
                        objfrmLocations.ShowDialog();

                        if (objfrmLocations.SelectedLocation != null)
                            objInstrument.Location = objfrmLocations.SelectedLocation;
                    }
                }
                else if (e.ColumnIndex == dgvInstruments.Columns["btnNotesColumn"].Index)
                {
                    frmNoteViewer objfrmNoteViewer;

                    if (objInstrument.Note == null)
                        objInstrument.Note = new Note { LastUpdated = DateTime.Now, NoteContent = string.Empty };

                    objfrmNoteViewer = new frmNoteViewer(objInstrument.Note);
                    objfrmNoteViewer.Show();
                }
        }