Example #1
0
        private void Add_Group_Click(object sender, EventArgs e)
        {
            this.Hide();
            FromProjectStudent f4 = new FromProjectStudent();

            f4.ShowDialog();
            this.Close();
        }
Example #2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            con1.Open();
            int UP_Row      = int.Parse(e.RowIndex.ToString());
            int UP_RowIndex = int.Parse(e.ColumnIndex.ToString());

            ID1 = Convert.ToInt32(dataGridView1.Rows[UP_Row].Cells[0].Value.ToString());
            int dd = (int)dataGridView1.CurrentRow.Cells[0].Value;

            if (UP_RowIndex == 6)
            {
                if (UP_RowIndex == 1)
                {
                    if (UP_RowIndex == 0)
                    {
                        MessageBox.Show("Click Again");
                    }
                }
                if (UP_RowIndex != 0)
                {
                    var askfirst1 = MessageBox.Show("Are you sure you want to add this Group?", "Add", MessageBoxButtons.YesNo);
                    if (askfirst1 == DialogResult.Yes)
                    {
                        ManageGroupProject s = new ManageGroupProject(dd);
                        ID = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                        s.textBox1.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                        Flags           = Convert.ToInt32(s.textBox1.Text);
                        s.Flagg2        = 0;
                        s.ShowDialog();
                        con1.Close();
                        this.Close();
                    }
                    else
                    {
                        con1.Close();
                        this.Hide();
                        FromProjectStudent f2 = new FromProjectStudent();
                        f2.ShowDialog();
                    }
                }
            }
            else
            {
                MessageBox.Show("Click on add button");
            }
        }