private void dgvCarDoc_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (isCellNoHeader(e.RowIndex)) { int idCarDoc = Convert.ToInt32(dgvCarDoc.Rows[e.RowIndex].Cells[0].Value); CarDocList carDocList = CarDocList.getInstance(); CarDoc carDoc = carDocList.getItem(idCarDoc); if (e.ColumnIndex == 2) { WorkWithFiles.openFile(carDoc.File); } else { CarDoc_AddEdit carDocAE = new CarDoc_AddEdit(carDoc); if (carDocAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { loadCarDoc(); } } } }
private void dgvCarDoc_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (isCellNoHeader(e.RowIndex)) { int idCarDoc = Convert.ToInt32(dgvCarDoc.Rows[e.RowIndex].Cells[0].Value); CarDocList carDocList = CarDocList.getInstance(); CarDoc carDoc = carDocList.getItem(idCarDoc); if (e.ColumnIndex == 2) { WorkWithFiles.openFile(carDoc.File); } else { CarDoc_AddEdit carDocAE = new CarDoc_AddEdit(carDoc); if (carDocAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) loadCarDoc(); } } }