Esempio n. 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
            {
                try {
                    if (senderGrid.Columns[e.ColumnIndex].Name == "dtgSee")
                    {
                        var x = new userProject(int.Parse(dataGridView1.Rows[e.RowIndex].Cells["dtgId"].Value.ToString()));
                        x.Show();
                    }
                    else if (senderGrid.Columns[e.ColumnIndex].Name == "dtgDelete")
                    {
                        var x = new deleteProject(dataGridView1.Rows[e.RowIndex].Cells["dtgName"].Value.ToString());
                        x.Show();
                    }
                    else if (senderGrid.Columns[e.ColumnIndex].Name == "dtgModify")
                    {
                        var x = new editProject(dataGridView1.Rows[e.RowIndex].Cells["dtgName"].Value.ToString());
                        x.Show();
                    }
                } catch (Exception ex) {
                }
            }
        }
Esempio n. 2
0
        private void verProyectosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var pro = new userProject(0);

            try {
                pro.Show();
            } catch (Exception ex) {
            }
        }