Exemple #1
0
        private void dataGridView_T1_Thesises_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int col = this.dataGridView_T1_Thesises.CurrentCell.ColumnIndex;
            int row = this.dataGridView_T1_Thesises.CurrentCell.RowIndex;
            int id  = (int)this.dataGridView_T1_Thesises.Rows[row].Cells["ID"].Value;

            // MessageBox.Show("You clicked row: " + row + ", column: " + col + ", id: " + id, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);

            switch (col)
            {
            case 0:
                AddEditThesisForm aetw = new AddEditThesisForm(this.cnt, id);
                aetw.ShowDialog();
                this.refilterThesises();
                this.dataGridView_T1_Thesises.Rows[row].Selected = true;
                break;

            case 1:
                FilesForm ffw = new FilesForm(this.cnt, id);
                ffw.ShowDialog();

                break;

            default:
                //do nothing
                break;
            }
        }
Exemple #2
0
        private void button_AddFiles_Click(object sender, EventArgs e)
        {
            if (this.id == 0)
            {
                MessageBox.Show("You have to save the thesis first", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FilesForm ffw = new FilesForm(this.cnt, this.id);

            ffw.ShowDialog();
        }