private void Add_Evaluation_Click(object sender, EventArgs e) { this.Hide(); FromEvaluation f4 = new FromEvaluation(); f4.ShowDialog(); this.Close(); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { con.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 == 4) { 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 Evaluation Id?", "Add", MessageBoxButtons.YesNo); if (askfirst1 == DialogResult.Yes) { FromGroupStudent t = new FromGroupStudent(); ManageEvaluation s = new ManageEvaluation(dd); ID = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString()); //s.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); s.textBox1.Text = t.Flags.ToString(); s.Flagg2 = 0; s.ShowDialog(); con.Close(); this.Close(); } else { con.Close(); this.Hide(); FromEvaluation f2 = new FromEvaluation(); f2.ShowDialog(); } } } else { MessageBox.Show("Click on add button"); } }