private void ViewGroupStudentsDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int currentRow        = int.Parse(e.RowIndex.ToString());
            int curentcolumnindex = int.Parse(e.ColumnIndex.ToString());
            int sid = Convert.ToInt32(ViewGroupStudentsDataGridView.Rows[currentRow].Cells[1].Value.ToString());

            if (curentcolumnindex == 0)
            {
                SqlConnection conn = new SqlConnection(conURL);
                conn.Open();
                String     DeleteCMD     = "DELETE FROM GroupStudent WHERE GroupStudent.StudentId = @id";
                SqlCommand DeleteCommand = new SqlCommand(DeleteCMD, conn);
                DeleteCommand.Parameters.Add(new SqlParameter("id", sid));
                int count = DeleteCommand.ExecuteNonQuery();

                ViewGroupStudents form = new ViewGroupStudents(gid);
                form.Show();
                this.Hide();
            }
        }
        private void StdGroupDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int    currentRow        = int.Parse(e.RowIndex.ToString());
            int    curentcolumnindex = int.Parse(e.ColumnIndex.ToString());
            string gid = StdGroupDataGridView.Rows[currentRow].Cells[0].Value.ToString();

            if (curentcolumnindex == 2)
            {
                AddStudentGroup form = new AddStudentGroup(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }
            if (curentcolumnindex == 3)
            {
                ViewGroupStudents form = new ViewGroupStudents(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }
            if (curentcolumnindex == 4)
            {
                AddEvaluationGroup form = new AddEvaluationGroup(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }
            if (curentcolumnindex == 5)
            {
                ViewGroupEvaluation form = new ViewGroupEvaluation(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }
            if (curentcolumnindex == 6)
            {
                AddGroupProject form = new AddGroupProject(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }
            if (curentcolumnindex == 7)
            {
                ViewGroupProject form = new ViewGroupProject(Convert.ToInt32(gid));
                form.Show();
                this.Hide();
            }

            if (curentcolumnindex == 8)
            {
                SqlConnection conn = new SqlConnection(conURL);
                conn.Open();
                String     DeleteCMD     = "DELETE FROM GroupStudent WHERE GroupStudent.GroupId = @id";
                SqlCommand DeleteCommand = new SqlCommand(DeleteCMD, conn);
                DeleteCommand.Parameters.Add(new SqlParameter("id", Convert.ToInt32(gid)));
                int count = DeleteCommand.ExecuteNonQuery();

                String     DeleteCMD2     = "DELETE FROM GroupEvaluation WHERE GroupEvaluation.GroupId = @id";
                SqlCommand DeleteCommand2 = new SqlCommand(DeleteCMD2, conn);
                DeleteCommand2.Parameters.Add(new SqlParameter("id", Convert.ToInt32(gid)));
                count = DeleteCommand2.ExecuteNonQuery();

                String     DeleteCMD3     = "DELETE FROM GroupProject WHERE GroupProject.GroupId = @id";
                SqlCommand DeleteCommand3 = new SqlCommand(DeleteCMD3, conn);
                DeleteCommand3.Parameters.Add(new SqlParameter("id", Convert.ToInt32(gid)));
                count = DeleteCommand3.ExecuteNonQuery();

                String     DeleteCMD4     = "DELETE FROM [Group] WHERE [Group].Id = @id";
                SqlCommand DeleteCommand4 = new SqlCommand(DeleteCMD4, conn);
                DeleteCommand4.Parameters.Add(new SqlParameter("id", Convert.ToInt32(gid)));
                count = DeleteCommand4.ExecuteNonQuery();

                GroupStudent form = new GroupStudent();
                form.Show();
                this.Hide();
            }
        }