Esempio n. 1
0
        private static void addSkillsFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");

            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList periodList = primenode.SelectNodes("classrecord");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    XmlNodeList gradename = primenode.SelectNodes("standards/standard");
            //    Dictionary<String, String> skillNames = new Dictionary<string, string>();
            //    foreach (XmlNode test in gradename)
            //    {
            //        Skill skill = new Skill();
            //        skill.SkillID = test.ChildNodes[0].InnerText;
            //        skill.SkillName = test.ChildNodes[3].InnerText;
            //        skillNames.Add(skill.SkillID, skill.SkillName);
            //    }

            //            foreach (XmlNode student in studentinfo)
            //            {
            //                //String adviser;
            //                Student idgeter = new Student();
            //                idgeter.StudentID = student.ChildNodes[0].ChildNodes[0].InnerText;
            //                idgeter.LastName = student.ChildNodes[0].ChildNodes[3].InnerText;
            //                idgeter.FirstName = student.ChildNodes[0].ChildNodes[4].InnerText;
            //                XmlNodeList gradeinfo = student.SelectNodes("stud_grades/stud_stdgrades");

            //                foreach (XmlNode test in periodList)
            //                {
            //                    Period period = new Period();
            //                    period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //                    period.PeriodName = test.ChildNodes[2].InnerText;
            //                    //adviser = test.ChildNodes[8].InnerText;
            //                    controller.addOrUpdatePeriod(controller.getStudent(idgeter.StudentID), period);
            //                foreach (XmlNode grade in gradeinfo)
            //                {
            //                    if (grade.HasChildNodes == true)
            //                    {
            //                        XmlNodeList stdgradeinfo = grade.SelectNodes("stud_stdgrade");

            //                        foreach (XmlNode stdgrade in stdgradeinfo)
            //                        {

            //                            Skill skilltostore = new Skill();
            //                            skilltostore.SkillID = stdgrade.ChildNodes[0].InnerText;
            //                            skilltostore.SkillName = skillNames[skilltostore.SkillID];
            //                            if (stdgrade.ChildNodes[1].InnerText == "" || stdgrade.ChildNodes[2].InnerText == "")
            //                            {
            //                                skilltostore.NumericGrade = 0.0;
            //                                skilltostore.LetterGrade = "N/A";
            //                            }
            //                            else
            //                            {
            //                                skilltostore.NumericGrade = double.Parse(stdgrade.ChildNodes[1].InnerText);
            //                                skilltostore.LetterGrade = stdgrade.ChildNodes[2].InnerText;
            //                            }
            //                            //idgeter.Adviser = adviser;
            //                            controller.addOrUpdateSkill(controller.getStudent(idgeter.StudentID), skilltostore, controller.getPeriod(controller.getStudent(idgeter.StudentID), period.PeriodID));

            //                        }

            //                    }
            //                    else
            //                    {
            //                        break;
            //                    }

            //                }
            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
            String loadedString = null;
            Student stud = new Student();

            while ((loadedString = myReader.ReadLine()) != null)
            {
                String[] studentDetails = loadedString.Split('\t');
                stud.StudentID = studentDetails[0];

                Period period = new Period();
                period.PeriodID = Convert.ToInt32(studentDetails[3].Substring(5,1));
                controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);

                int term1Counter = 8;
                while (term1Counter <= 68)
                {
                    Skill Skill = new Skill();
                    Skill.SkillID = studentDetails[term1Counter];
                    if (Skill.SkillID != "A" || Skill.SkillID != "B" || Skill.SkillID != "C" || Skill.SkillID != "D" || Skill.SkillID != "E")
                    {
                        if (studentDetails[term1Counter + 1] != "")
                        {
                            String[] skillGrades = studentDetails[term1Counter + 1].Split('/');
                            Skill.NumericGrade = Convert.ToDouble(skillGrades[0]);
                            Skill.LetterGrade = skillGrades[1];
                        }
                        else
                        {
                            //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            Skill.LetterGrade = "N/A";
                            Skill.NumericGrade = 0;
                        }
                    }
                    term1Counter += 2;
                    controller.addOrUpdateSkill(controller.getStudent(stud.StudentID), Skill, controller.getPeriod(controller.getStudent(stud.StudentID), period.PeriodID));
                }
            }
        }
Esempio n. 2
0
        public void testAddPeriod()
        {
            Student st = new Student();
            Period  pd = new Period();

            st.StudentID = "1223";
            st.FirstName = "sample";
            contoller.addOrUpdateStudent(st);
            pd.PeriodID   = 1;
            pd.PeriodName = "term1";
            contoller.addOrUpdatePeriod(st, pd);
            //pd.PeriodID = 1;
            //pd.PeriodName = "term33";
            //contoller.addOrUpdatePeriod(st, pd);
            int asd = contoller.getStudent("1223").RptCard.Periods.Count;

            Assert.AreEqual(contoller.getStudent("1223").RptCard.Periods.Count, asd);
            Assert.AreEqual(contoller.getPeriod(st, 1), pd);
            Assert.AreEqual(contoller.getPeriodByName(st, "term1").PeriodName, pd.PeriodName);
            //Test if the period is added to a student
        }
Esempio n. 3
0
        private static void addGradesFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");
            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList peroidlist = primenode.SelectNodes("classrecord");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    XmlNodeList gradename = primenode.SelectNodes("assignments/assignment");

            //    foreach (XmlNode student in studentinfo)
            //    {
            //        Student idgeter = new Student();
            //        idgeter.StudentID = student.ChildNodes[0].ChildNodes[0].InnerText;
            //        XmlNodeList gradeinfo = student.SelectNodes("stud_grades/overall");
            //        foreach (XmlNode test in peroidlist)
            //        {
            //            Grade Grade = new Grade();
            //            Period period = new Period();
            //            period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //            period.PeriodName = test.ChildNodes[2].InnerText;
            //            Grade.SubjectID = test.ChildNodes[4].InnerText;
            //            Grade.SubjectCategory = test.ChildNodes[5].InnerText;
            //            Grade.SubjectName = test.ChildNodes[0].InnerText;
            //            controller.addOrUpdatePeriod(controller.getStudent(idgeter.StudentID), period);
            //            foreach (XmlNode grade in gradeinfo)
            //            {
            //                if (grade.ChildNodes[2].InnerText != "")
            //                {
            //                    Grade.NumericGrade = double.Parse(grade.ChildNodes[0].InnerText);
            //                    Grade.LetterGrade = grade.ChildNodes[2].InnerText;
            //                    controller.addOrUpdateGrade(controller.getStudent(idgeter.StudentID), Grade, controller.getPeriod(controller.getStudent(idgeter),period.PeriodID));
            //                }
            //            }
            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);

                String loadedString = null;
                Student stud = new Student();

                while ((loadedString = myReader.ReadLine()) != null)
                {
                    String[] studentDetails = loadedString.Split('\t');
                    stud.StudentID = studentDetails[0];
                    Grade Grade = new Grade();
                    Period period = new Period();
                    if (studentDetails[9] != null)
                    {
                        period.PeriodID = 1;
                        period.PeriodName = "Term 1";
                        controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                        if (studentDetails[8] != "" && studentDetails[9] != "")
                        {
                            Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            //Grade.SubjectID = studentDetails[4];
                            Grade.LetterGrade = studentDetails[9];
                            Grade.NumericGrade = Convert.ToDouble(studentDetails[8]);
                        }
                        else
                        {
                            Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            //Grade.SubjectID = studentDetails[4];
                            Grade.LetterGrade = "N/A";
                            Grade.NumericGrade = 0;
                        }
                        controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    }

                    //if (studentDetails[11] != null)
                    //{
                    //    period.PeriodID = 2;
                    //    period.PeriodName = "Term 2";
                    //    controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                    //    if (studentDetails[10] != "")
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = studentDetails[11];
                    //        Grade.NumericGrade = Convert.ToDouble(studentDetails[10]);
                    //    }
                    //    else
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = "";
                    //        Grade.NumericGrade = 0;
                    //    }
                    //    controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    //}

                    //if (studentDetails[13] != null)
                    //{
                    //    period.PeriodID = 3;
                    //    period.PeriodName = "Term 3";
                    //    controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                    //    if (studentDetails[12] != "")
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = studentDetails[13];
                    //        Grade.NumericGrade = Convert.ToDouble(studentDetails[12]);
                    //    }
                    //    else
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = "";
                    //        Grade.NumericGrade = 0;
                    //    }
                    //    controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    //}

                }
                myReader.Close();
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
        }
Esempio n. 4
0
        private static void addCommentsFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");
            //Dictionary<string, string> subjectname = new Dictionary<string, string>();
            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList peroidlist = primenode.SelectNodes("classrecord");
            //    XmlNodeList assignlst = primenode.SelectNodes("assignments/assignment");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    foreach (XmlNode test in peroidlist)
            //    {
            //        Period period = new Period();
            //        period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //        period.PeriodName = test.ChildNodes[2].InnerText;
            //        foreach (XmlNode student in studentinfo)
            //        {
            //            String studid = student.ChildNodes[0].ChildNodes[0].InnerText;
            //            XmlNodeList comment = student.SelectNodes("stud_grades/score/score_note");
            //            foreach (XmlNode commentcontainer in comment)
            //            {
            //                if (commentcontainer.InnerText != "")
            //                {
            //                    Comment cmt = new Comment();
            //                    cmt.CommentText = commentcontainer.InnerText;
            //                    controller.addOrUpdatePeriod(controller.getStudent(studid), period);
            //                    controller.getPeriod(controller.getStudent(studid), period.PeriodID).PeriodComment.Add(cmt);

            //                }

            //            }

            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
            try
            {
                String loadedString = null;

                while ((loadedString = myReader.ReadLine()) != null)
                {
                    Student stud = new Student();
                    Period p = new Period();
                    Comment cmt = new Comment();
                    String[] studentDetails = loadedString.Split('\t');
                    stud.StudentID = studentDetails[0];
                    stud.FirstName = studentDetails[1];
                    stud.LastName = studentDetails[2];

                    if (studentDetails[3] != null)
                    {
                        p.PeriodID = 1;
                        p.PeriodName = "Term 1";
                        cmt.CommentText = studentDetails[3];
                        controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), p);
                        controller.getPeriod(controller.getStudent(stud.StudentID), p.PeriodID).PeriodComment.Add(cmt);
                    }
                }
                myReader.Close();
            }
            catch
            {
            }
        }
Esempio n. 5
0
        private static void addSkillsFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");

            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList periodList = primenode.SelectNodes("classrecord");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    XmlNodeList gradename = primenode.SelectNodes("standards/standard");
            //    Dictionary<String, String> skillNames = new Dictionary<string, string>();
            //    foreach (XmlNode test in gradename)
            //    {
            //        Skill skill = new Skill();
            //        skill.SkillID = test.ChildNodes[0].InnerText;
            //        skill.SkillName = test.ChildNodes[3].InnerText;
            //        skillNames.Add(skill.SkillID, skill.SkillName);
            //    }


            //            foreach (XmlNode student in studentinfo)
            //            {
            //                //String adviser;
            //                Student idgeter = new Student();
            //                idgeter.StudentID = student.ChildNodes[0].ChildNodes[0].InnerText;
            //                idgeter.LastName = student.ChildNodes[0].ChildNodes[3].InnerText;
            //                idgeter.FirstName = student.ChildNodes[0].ChildNodes[4].InnerText;
            //                XmlNodeList gradeinfo = student.SelectNodes("stud_grades/stud_stdgrades");

            //                foreach (XmlNode test in periodList)
            //                {
            //                    Period period = new Period();
            //                    period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //                    period.PeriodName = test.ChildNodes[2].InnerText;
            //                    //adviser = test.ChildNodes[8].InnerText;
            //                    controller.addOrUpdatePeriod(controller.getStudent(idgeter.StudentID), period);
            //                foreach (XmlNode grade in gradeinfo)
            //                {
            //                    if (grade.HasChildNodes == true)
            //                    {
            //                        XmlNodeList stdgradeinfo = grade.SelectNodes("stud_stdgrade");

            //                        foreach (XmlNode stdgrade in stdgradeinfo)
            //                        {

            //                            Skill skilltostore = new Skill();
            //                            skilltostore.SkillID = stdgrade.ChildNodes[0].InnerText;
            //                            skilltostore.SkillName = skillNames[skilltostore.SkillID];
            //                            if (stdgrade.ChildNodes[1].InnerText == "" || stdgrade.ChildNodes[2].InnerText == "")
            //                            {
            //                                skilltostore.NumericGrade = 0.0;
            //                                skilltostore.LetterGrade = "N/A";
            //                            }
            //                            else
            //                            {
            //                                skilltostore.NumericGrade = double.Parse(stdgrade.ChildNodes[1].InnerText);
            //                                skilltostore.LetterGrade = stdgrade.ChildNodes[2].InnerText;
            //                            }
            //                            //idgeter.Adviser = adviser;
            //                            controller.addOrUpdateSkill(controller.getStudent(idgeter.StudentID), skilltostore, controller.getPeriod(controller.getStudent(idgeter.StudentID), period.PeriodID));

            //                        }

            //                    }
            //                    else
            //                    {
            //                        break;
            //                    }

            //                }
            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
            String  loadedString = null;
            Student stud         = new Student();

            while ((loadedString = myReader.ReadLine()) != null)
            {
                String[] studentDetails = loadedString.Split('\t');
                stud.StudentID = studentDetails[0];


                Period period = new Period();
                period.PeriodID = Convert.ToInt32(studentDetails[3].Substring(5, 1));
                controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);

                int term1Counter = 8;
                while (term1Counter <= 68)
                {
                    Skill Skill = new Skill();
                    Skill.SkillID = studentDetails[term1Counter];
                    if (Skill.SkillID != "A" || Skill.SkillID != "B" || Skill.SkillID != "C" || Skill.SkillID != "D" || Skill.SkillID != "E")
                    {
                        if (studentDetails[term1Counter + 1] != "")
                        {
                            String[] skillGrades = studentDetails[term1Counter + 1].Split('/');
                            Skill.NumericGrade = Convert.ToDouble(skillGrades[0]);
                            Skill.LetterGrade  = skillGrades[1];
                        }
                        else
                        {
                            //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            Skill.LetterGrade  = "N/A";
                            Skill.NumericGrade = 0;
                        }
                    }
                    term1Counter += 2;
                    controller.addOrUpdateSkill(controller.getStudent(stud.StudentID), Skill, controller.getPeriod(controller.getStudent(stud.StudentID), period.PeriodID));
                }
            }
        }
Esempio n. 6
0
        private static void addCommentsFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");
            //Dictionary<string, string> subjectname = new Dictionary<string, string>();
            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList peroidlist = primenode.SelectNodes("classrecord");
            //    XmlNodeList assignlst = primenode.SelectNodes("assignments/assignment");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    foreach (XmlNode test in peroidlist)
            //    {
            //        Period period = new Period();
            //        period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //        period.PeriodName = test.ChildNodes[2].InnerText;
            //        foreach (XmlNode student in studentinfo)
            //        {
            //            String studid = student.ChildNodes[0].ChildNodes[0].InnerText;
            //            XmlNodeList comment = student.SelectNodes("stud_grades/score/score_note");
            //            foreach (XmlNode commentcontainer in comment)
            //            {
            //                if (commentcontainer.InnerText != "")
            //                {
            //                    Comment cmt = new Comment();
            //                    cmt.CommentText = commentcontainer.InnerText;
            //                    controller.addOrUpdatePeriod(controller.getStudent(studid), period);
            //                    controller.getPeriod(controller.getStudent(studid), period.PeriodID).PeriodComment.Add(cmt);

            //                }

            //            }

            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
            try
            {
                String loadedString = null;

                while ((loadedString = myReader.ReadLine()) != null)
                {
                    Student  stud           = new Student();
                    Period   p              = new Period();
                    Comment  cmt            = new Comment();
                    String[] studentDetails = loadedString.Split('\t');
                    stud.StudentID = studentDetails[0];
                    stud.FirstName = studentDetails[1];
                    stud.LastName  = studentDetails[2];

                    if (studentDetails[3] != null)
                    {
                        p.PeriodID      = 1;
                        p.PeriodName    = "Term 1";
                        cmt.CommentText = studentDetails[3];
                        controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), p);
                        controller.getPeriod(controller.getStudent(stud.StudentID), p.PeriodID).PeriodComment.Add(cmt);
                    }
                }
                myReader.Close();
            }
            catch
            {
            }
        }
Esempio n. 7
0
        private static void addGradesFromXML(IStudentController controller, String doc)
        {
            #region codes
            //XmlNodeList primelist = doc.SelectNodes("easygradepro/class");
            //foreach (XmlNode primenode in primelist)
            //{
            //    XmlNodeList peroidlist = primenode.SelectNodes("classrecord");
            //    XmlNodeList studentinfo = primenode.SelectNodes("student");
            //    XmlNodeList gradename = primenode.SelectNodes("assignments/assignment");

            //    foreach (XmlNode student in studentinfo)
            //    {
            //        Student idgeter = new Student();
            //        idgeter.StudentID = student.ChildNodes[0].ChildNodes[0].InnerText;
            //        XmlNodeList gradeinfo = student.SelectNodes("stud_grades/overall");
            //        foreach (XmlNode test in peroidlist)
            //        {
            //            Grade Grade = new Grade();
            //            Period period = new Period();
            //            period.PeriodID = Int32.Parse(test.ChildNodes[1].InnerText);
            //            period.PeriodName = test.ChildNodes[2].InnerText;
            //            Grade.SubjectID = test.ChildNodes[4].InnerText;
            //            Grade.SubjectCategory = test.ChildNodes[5].InnerText;
            //            Grade.SubjectName = test.ChildNodes[0].InnerText;
            //            controller.addOrUpdatePeriod(controller.getStudent(idgeter.StudentID), period);
            //            foreach (XmlNode grade in gradeinfo)
            //            {
            //                if (grade.ChildNodes[2].InnerText != "")
            //                {
            //                    Grade.NumericGrade = double.Parse(grade.ChildNodes[0].InnerText);
            //                    Grade.LetterGrade = grade.ChildNodes[2].InnerText;
            //                    controller.addOrUpdateGrade(controller.getStudent(idgeter.StudentID), Grade, controller.getPeriod(controller.getStudent(idgeter),period.PeriodID));
            //                }
            //            }
            //        }
            //    }
            //}
            #endregion
            try
            {
                myReader = new StreamReader(doc);

                String  loadedString = null;
                Student stud         = new Student();

                while ((loadedString = myReader.ReadLine()) != null)
                {
                    String[] studentDetails = loadedString.Split('\t');
                    stud.StudentID = studentDetails[0];
                    Grade  Grade  = new Grade();
                    Period period = new Period();
                    if (studentDetails[9] != null)
                    {
                        period.PeriodID   = 1;
                        period.PeriodName = "Term 1";
                        controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                        if (studentDetails[8] != "" && studentDetails[9] != "")
                        {
                            Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            //Grade.SubjectID = studentDetails[4];
                            Grade.LetterGrade  = studentDetails[9];
                            Grade.NumericGrade = Convert.ToDouble(studentDetails[8]);
                        }
                        else
                        {
                            Grade.SubjectID = studentDetails[4].Substring(0, 4);
                            //Grade.SubjectID = studentDetails[4];
                            Grade.LetterGrade  = "N/A";
                            Grade.NumericGrade = 0;
                        }
                        controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    }

                    //if (studentDetails[11] != null)
                    //{
                    //    period.PeriodID = 2;
                    //    period.PeriodName = "Term 2";
                    //    controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                    //    if (studentDetails[10] != "")
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = studentDetails[11];
                    //        Grade.NumericGrade = Convert.ToDouble(studentDetails[10]);
                    //    }
                    //    else
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = "";
                    //        Grade.NumericGrade = 0;
                    //    }
                    //    controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    //}

                    //if (studentDetails[13] != null)
                    //{
                    //    period.PeriodID = 3;
                    //    period.PeriodName = "Term 3";
                    //    controller.addOrUpdatePeriod(controller.getStudent(stud.StudentID), period);
                    //    if (studentDetails[12] != "")
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = studentDetails[13];
                    //        Grade.NumericGrade = Convert.ToDouble(studentDetails[12]);
                    //    }
                    //    else
                    //    {
                    //        //Grade.SubjectID = studentDetails[4].Substring(0, 4);
                    //        Grade.SubjectID = studentDetails[4];
                    //        Grade.LetterGrade = "";
                    //        Grade.NumericGrade = 0;
                    //    }
                    //    controller.addOrUpdateGrade(controller.getStudent(stud.StudentID), Grade, controller.getPeriod(controller.getStudent(stud), period.PeriodID));
                    //}
                }
                myReader.Close();
            }
            catch (Exception er)
            {
                System.Windows.Forms.MessageBox.Show(er.Message, "Unable to run the File");
            }
        }