Пример #1
0
        private void personView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            var s      = personView.Rows[e.RowIndex];
            var id     = (int)s.Cells[0].Value;
            var person = new PersonView(id);

            person.Show();
        }
Пример #2
0
 private void crew_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex == -1)
     {
         return;
     }
     if (crew[e.ColumnIndex, e.RowIndex] is DataGridViewLinkCell)
     {
         var personId   = (int)crew[3, e.RowIndex].Value;
         var personView = new PersonView(personId);
         personView.Show();
         Close();
     }
 }