Exemple #1
0
        private void _dgvFile_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (isCellNoHeader(e.RowIndex))
            {
                int idDTPFile;
                int.TryParse(_dgvFile.Rows[e.RowIndex].Cells[0].Value.ToString(), out idDTPFile);

                DTPFile dtpFile = dtpFileList.getItem(idDTPFile);

                if ((e.ColumnIndex == 2) && (dtpFile.File != string.Empty))
                {
                    WorkWithFiles.openFile(dtpFile.File);
                }
                else
                {
                    DTPFile_AddEdit dtpFAE = new DTPFile_AddEdit(dtpFile);
                    if (dtpFAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        FillDgv();
                    }
                }
            }
        }
Exemple #2
0
        private void _dgvFile_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (isCellNoHeader(e.RowIndex))
            {
                int idDTPFile;
                int.TryParse(_dgvFile.Rows[e.RowIndex].Cells[0].Value.ToString(), out idDTPFile);

                DTPFile dtpFile = dtpFileList.getItem(idDTPFile);

                if ((e.ColumnIndex == 2) && (dtpFile.File != string.Empty))
                    WorkWithFiles.openFile(dtpFile.File);
                else
                {
                    DTPFile_AddEdit dtpFAE = new DTPFile_AddEdit(dtpFile);
                    if (dtpFAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        FillDgv();
                }
            }
        }