private void read_list()
        {
            seqRoot = new SeqNode();
            data.Rows.Clear();
            for (int ix = 0; ix < requirements.Count; ix++)
            {
                data.Rows.Add(requirements[ix].DEPT,
                    requirements[ix].COURSE_NUM,
                    requirements[ix].CREDITS,
                    requirements[ix].REQ_OR_ELEC,
                    requirements[ix].VALUE,
                    requirements[ix].PAR_VALUE);

                if ((requirements[ix].VALUE != 0) || (requirements[ix].PAR_VALUE != 0))
                {
                    SeqNode temp = new SeqNode(requirements[ix].DEPT, requirements[ix].COURSE_NUM,
                        requirements[ix].CREDITS, requirements[ix].REQ_OR_ELEC, requirements[ix].VALUE);
                    //MessageBox.Show("Succesfully Added node with value: " + requirements[ix].VALUE);
                    seqRoot.addChild(requirements[ix].PAR_VALUE, temp);
                }

            }
        }
        private bool make_list()
        {
            requirements.Clear();
            ReqCourses input;
            seqRoot = new SeqNode();
            int numrows;

            //MessageBox.Show(data.RowCount.ToString());
            if (data.RowCount == 1)
                numrows = 1;
            else
                numrows = data.RowCount-1;

            for (int ix = 0; ix < data.RowCount-1; ix++)
            {

                if (check_row(ix))
                {
                    List<int> tmp = new List<int>();

                    /*for (int ij = 6; ij < data.Columns.Count; ij++)
                    {
                        tmp.Add(Convert.ToInt32(data[ij, ix].Value));
                        MessageBox.Show("Testing: " + Convert.ToInt32(data[ij, ix].Value));
                        //MessageBox.Show(tmp[ij-6].ToString());
                    }*/

                    input = new ReqCourses(data[0, ix].Value.ToString(),
                        Convert.ToInt32(data[1, ix].Value),
                        Convert.ToInt32(data[2, ix].Value),
                        data[3, ix].Value.ToString(),
                        Convert.ToInt32(data[4, ix].Value),
                        Convert.ToInt32(data[5, ix].Value));

                    // Check to see if the class has already been added
                    bool already = false;

                    for (int ij = 0; ij < requirements.Count; ij++)
                    {
                        if (requirements[ij].COURSE_NUM.Equals(input.COURSE_NUM)
                            && requirements[ij].DEPT.Equals(input.DEPT))
                        {
                            already = true;
                        }
                    }

                    if (!already)
                    {
                        if ((input.VALUE != 0) || (input.PAR_VALUE != 0))
                        {
                            SeqNode temp = new SeqNode(input.DEPT, input.COURSE_NUM, input.CREDITS, input.REQ_OR_ELEC, input.VALUE);
                            //MessageBox.Show("Succesfully Added node with value: " + input.VALUE);
                            seqRoot.addChild(input.PAR_VALUE, temp);
                        }
                        requirements.Add(input);
                    }
                    else
                    {
                        MessageBox.Show("There are duplicate classes!");
                    }
                }
                else
                {
                    return false;
                }
            }

            return true;
        }