コード例 #1
0
        protected bool CheckComponents(Exam_Board eb)
        {
            ExamFiles            ef = new Cerval_Library.ExamFiles();
            List <ExamComponent> BaseComponentList = new List <ExamComponent>();
            ExamCompononent_List ecl1 = new ExamCompononent_List();

            ecl1.LoadAllComponents_IncNonTimetabled(YearCode.ToString(), SeasonCode.ToString());
            BaseComponentList = ef.ExamsComponentsFromBaseData(eb, SeasonCode.ToString(), YearCode.ToString());
            foreach (ExamComponent c in ecl1.m_list)
            {
                foreach (ExamComponent c1 in BaseComponentList)
                {
                    if (c.m_ComponentCode == c1.m_ComponentCode)
                    {
                        c.m_Teachermarks     = c1.m_Teachermarks;
                        c.m_Due_Date         = c1.m_Due_Date;
                        c.m_ExamBoardID      = c1.m_ExamBoardID;
                        c.m_MaximumMark      = c1.m_MaximumMark;
                        c.m_Teachermarks     = c1.m_Teachermarks;
                        c.m_ComponentTitle   = c1.m_ComponentTitle;
                        c.m_Timetabled       = c1.m_Timetabled;
                        c.m_TimetableSession = c1.m_TimetableSession;
                        c.m_Time             = c1.m_Time;
                        c.m_TimetableDate    = c1.m_TimetableDate;
                        c.Save();
                    }
                }
            }
            return(true);;
        }
コード例 #2
0
        protected bool Check_All_Scheduled()
        {
            ExamCompononent_List ecl1 = new ExamCompononent_List();

            ecl1.LoadAllComponents_NotScheduled(Year.ToString(), SeasonCode.ToString());
            if (ecl1.m_count == 0)
            {
                return(true);
            }
            return(false);
        }
コード例 #3
0
        protected void DropDownList_Options_SelectedIndexChanged(object sender, EventArgs e)
        {
            //so option selection .. need to get TQM data
            DropDownList_Component.Items.Clear();
            ExamCompononent_List ecl1 = new ExamCompononent_List();

            ecl1.Load(new Guid(DropDownList_Options.SelectedItem.Value));
            if (ecl1.m_list.Count > 0)
            {
                foreach (ExamComponent ec1 in ecl1.m_list)
                {
                    DropDownList_Component.Items.Add(new System.Web.UI.WebControls.ListItem(ec1.m_ComponentCode + " : " + ec1.m_ComponentTitle, ec1.m_ComponentID.ToString()));
                }
                DropDownList_Components_SelectedIndexChanged(sender, e);
            }
        }
コード例 #4
0
        protected void DropDownList_ExamBoards_SelectedIndexChanged(object sender, EventArgs e)
        {
            ExamOption_List exol1 = new ExamOption_List();

            exol1.Load(DropDownList_ExamBoards.SelectedValue, YearCode.ToString(), SeasonCode.ToString());
            DropDownList_Options.Items.Clear();
            foreach (ExamOption e1 in exol1.m_list)//only add if we HAVE components!!
            {
                ExamCompononent_List ecl1 = new ExamCompononent_List(); ecl1.Load(e1.m_OptionID);
                if (ecl1.m_list.Count > 0)
                {
                    ListItem l1 = new ListItem(e1.m_OptionCode + ":" + e1.m_OptionTitle, e1.m_OptionID.ToString());
                    DropDownList_Options.Items.Add(l1);
                }
            }
            DropDownList_Options_SelectedIndexChanged(sender, e);
        }
コード例 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            // going to delete option/component values

            ExamOption_List eol1 = new ExamOption_List();

            eol1.Load(YearCode.ToString(), SeasonCode.ToString());
            ExamCompononent_List ecl1 = new ExamCompononent_List();

            ecl1.LoadAllComponentsSeason(YearCode.ToString(), SeasonCode.ToString());

            foreach (ExamOption eo in eol1.m_list)
            {
                eo.Delete();
            }
            foreach (ExamComponent ec in ecl1.m_list)
            {
                ec.Delete();
            }
        }
コード例 #6
0
        protected void SetupSummaryTable()
        {
            DateTime t1 = new DateTime(Year, SeasonCode - 2, 1);//so summer season might start in april???
            DateTime t0 = new DateTime(); t0 = t1;

            //advance to Monday
            while (t0.DayOfWeek != DayOfWeek.Monday)
            {
                t0 = t0.AddDays(1);
            }
            //this is our start date...
            string[] data = new string[300];//should be enough!
            for (int i = 0; i < 120; i++)
            {
                data[i] = "";
            }

            int n = 0; int nmin = 200; int nmax = -1;
            // list for the contents of this row...
            DateTime             t2        = new DateTime();
            TimeSpan             tspan1    = new TimeSpan();
            TimeSpan             tspanWeek = new TimeSpan(0, 1, 0, 0);
            ExamCompononent_List ecl1      = new ExamCompononent_List();

            ecl1.LoadAllComponentsSeason(YearCode.ToString(), SeasonCode.ToString());
            ExamsUtility u                 = new ExamsUtility();

            //ecl1.LoadAllComponents_NotScheduled(Year.ToString(), SeasonCode.ToString());
            foreach (ExamComponent ec in ecl1.m_list)
            {
                t2       = ec.m_TimetableDate; tspan1 = t2 - t0; n = tspan1.Days;
                data[n] += ec.m_ComponentTitle + ":" + ec.m_ComponentCode + ":" + ec.m_ComponentID.ToString() + (char)0x09;
                //component title:option code
                if (n > nmax)
                {
                    nmax = n;
                }
                if (n < nmin)
                {
                    nmin = n;
                }
            }
            List <ComponentNotScheduled> list1 = new List <ComponentNotScheduled>();

            //so want to do whole weeks from t0;
            n = 0; while ((nmin - n) > 7)
            {
                n += 7;
            }
            //so we start the table at n...
            t2 = t0.AddDays(n);
            while (n < nmax)
            {
                TableRow  r1 = new TableRow(); Table_Summary.Rows.Add(r1);
                TableCell c0 = new TableCell(); c0.Text = t2.ToShortDateString(); r1.Cells.Add(c0);
                for (int i = 0; i < 5; i++)
                {
                    //so date is t2
                    list1 = u.LoadComponentsNotSchedlued(Year.ToString(), SeasonCode.ToString(), t2.AddHours(-1), t2.AddHours(22));
                    TableCell c1 = new TableCell();
                    if (list1.Count > 0)
                    {
                        Button b1 = new Button();
                        b1.Text = t2.ToString("M");

                        c1.Controls.Add(b1);
                        b1.Click    += B1_Click;
                        b1.ID        = "Button" + (n + i).ToString();
                        b1.BackColor = System.Drawing.Color.AntiqueWhite;
                    }
                    r1.Cells.Add(c1); t2 = t2.AddDays(1);
                }
                n += 7; t2 = t2.AddDays(2);
            }
        }
コード例 #7
0
        protected void UpdateTimetable(DateTime start, DateTime end)
        {
            // add scheduled components for any components not scheduled...
            //TODO also delete any withdrawn....
            ExamConversions      u    = new ExamConversions();
            ExamCompononent_List ecl1 = new ExamCompononent_List();

            //ecl1.LoadAllComponents(Year.ToString(), SeasonCode.ToString());
            ecl1.LoadAllComponentsSeasonDate(YearCode.ToString(), SeasonCode.ToString(), start, end);
            Encode en = new Encode();
            string s  = "";

            ScheduledComponent sched1 = new ScheduledComponent();

            s = ""; int n = 0;
            DateTime    d1 = new DateTime();

            foreach (ExamComponent ec in ecl1.m_list)
            {
                ExamLinkComponent_List elcl1 = new ExamLinkComponent_List();
                elcl1.LoadList_Component(ec.m_ComponentID);
                foreach (ExamLinkComponent elc in elcl1.m_list)
                {
                    ExamEntries_List exl1 = new ExamEntries_List();
                    //now need all entries for this option.....
                    exl1.Load_Option(elc.m_OptionId);
                    n += exl1.m_list.Count;
                }
            }

            int n1 = 0; int n2 = 0;

            foreach (ExamComponent ec in ecl1.m_list)
            {
                if (ec.m_Timetabled == "T")
                {
                    d1 = ec.m_TimetableDate;
                    if (ec.m_TimetableSession == "A")
                    {
                        d1 = d1.AddHours(8); d1 = d1.AddMinutes(50);
                    }
                    else
                    {
                        d1 = d1.AddHours(13); d1 = d1.AddMinutes(40);
                    }
                    //need to find all entries that use this component.....
                    ExamLinkComponent_List elcl1 = new ExamLinkComponent_List();
                    elcl1.LoadList_Component(ec.m_ComponentID);
                    foreach (ExamLinkComponent elc in elcl1.m_list)
                    {
                        ExamEntries_List exl1 = new ExamEntries_List();
                        //now need all entries for this option.....
                        exl1.Load_Option(elc.m_OptionId);
                        foreach (Exam_Entry ex in exl1.m_list)
                        {
                            if (!ex.m_withdrawn)
                            {
                                sched1.Load(ec.m_ComponentID, ex.m_StudentID);
                                if (!sched1.m_valid)
                                {
                                    sched1.m_StudentId   = ex.m_StudentID;
                                    sched1.m_ComponentId = ec.m_ComponentID;
                                    sched1.m_RoomId      = Guid.Empty;
                                    sched1.m_Year        = Year.ToString();
                                    sched1.m_Season      = u.GetSeasonCode(SeasonCode);
                                    sched1.m_valid       = true;
                                    sched1.m_Date        = d1;
                                    sched1.m_Desk        = "";
                                    sched1.m_Will_Type   = false;// do these later...
                                    sched1.Save();
                                    n2++;
                                }
                            }
                            else
                            {
                                sched1.Load(ec.m_ComponentID, ex.m_StudentID);
                                if (sched1.m_valid)
                                {
                                    //need to delete
                                    sched1.Delete();
                                    n1++;
                                }
                            }
                        }
                    }
                }
            }


            //now ought to update the willtype fields to agree with the cantype entry..
            //oohhh this is going to be messy.....
            //read from a querry..... then update Exams_Scheduled_components...

            CanTypeList typists = new CanTypeList();

            foreach (Guid g in typists.m_List)
            {
                s = "UPDATE dbo.tbl_Exams_ScheduledComponents SET WillType =1 WHERE (StudentId = '" + g.ToString() + "'  )AND (Year='" + YearCode.ToString() + "' ) AND (Season ='" + u.GetSeasonCode(SeasonCode) + "' )";
                en.ExecuteSQL(s);
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility  u1 = new Utility();
                DateTime t1 = new DateTime();
                DateTime t0 = new DateTime();
                DateTime t2;
                t0 = u1.ThisExamSeasonStart(); t1 = u1.ThisExamSeasonEnd(t0);
                string season = u1.ThisSeason(t0);
                season = "3";
                ArrayList m_list = new ArrayList();
                PersonID = u1.GetPersonIdfromRequest(Request);

#if DEBUG
                u1.Is_student = true;
                u1.Is_student = true; PersonID = u1.GetPersonIDX(@"CHALLONERS\william.arnold");//development
#endif
                string s = ""; string s1 = "";
                if ((PersonID != Guid.Empty) && (u1.Is_student))
                {
                    s1 += "<br><center><h2>Exam Entries</h2></center>";
                    s1 += "<p  align=\"center\"><TABLE BORDER><Tr>";
                    s   = "Option"; s1 += "<Th>" + s + "</Th>";
                    s   = "Code"; s1 += "<Th>" + s + "</Th>";
                    s   = "Qualification"; s1 += "<Th>" + s + "</Th>";
                    s   = "Level"; s1 += "<Th>" + s + "</Th>";
                    s   = "Status"; s1 += "<Th>" + s + "</Th>";
                    s1 += "</Tr>";
                    ExamEntries_List exl1 = new ExamEntries_List();
                    exl1.Load(u1.GetStudentId(PersonID));
                    foreach (Exam_Entry ex1 in exl1.m_list)
                    {
                        ExamOption exo1 = new ExamOption(); exo1.Load(ex1.m_OptionID);
                        //if ((ex1.m_season == season) && (ex1.m_year == t0.Year.ToString())&&(!ex1.m_withdrawn))
                        if ((ex1.m_year == t0.Year.ToString()) && (!ex1.m_withdrawn))
                        {
                            //ExamOption exo1 = new ExamOption(); exo1.Load(ex1.m_OptionID);
                            //if (exo1.m_Item == "C")
                            {
                                s1 += "<TR>";
                                s   = exo1.m_OptionTitle; s1 += "<TD>" + s + "</TD>";
                                s   = exo1.m_OptionCode; s1 += "<TD>" + s + "</TD>";
                                s   = exo1.m_OptionQualification; s1 += "<TD>" + s + "</TD>";
                                if (exo1.m_OptionLevel != "B")
                                {
                                    s = exo1.m_OptionLevel; s1 += "<TD>" + s + "</TD>";
                                }
                                else
                                {
                                    s1 += "<TD></TD>";
                                }
                                if (ex1.m_EntryFileID == Guid.Empty)

                                {
                                    //if DCGS board then Mock/Internal exam
                                    if (exo1.m_ExamBoardID.ToString() == "436ff234-0457-430a-b1e2-b08758ff30ef")
                                    {
                                        //so internal.. if Jan is mocks..
                                        if (exo1.m_Season_code == "1")
                                        {
                                            s1 += "<td>Mock</td>";
                                        }
                                        else
                                        {
                                            s1 += "<td>Internal</td>";
                                        }
                                    }
                                    else
                                    {
                                        s1 += "<TD>Provisional</TD>";
                                    }
                                }
                                else
                                {
                                    s1 += "<TD>Entered</TD>";
                                }
                                s1 += "</TR>";
                            }

                            ExamCompononent_List excl1 = new ExamCompononent_List();
                            excl1.Load(ex1.m_OptionID);
                            foreach (ExamComponent ec in excl1.m_list)
                            {
                                if (ec.m_Timetabled == "T")
                                {
                                    ExamComponent ec2 = new ExamComponent(); ec2 = ec;
                                    m_list.Add(ec2); ec2.m_OptionTitle = exo1.m_Syllabus_Title;
                                }
                            }
                        }
                    }
                    s1 += "</TABLE>";
                    s1 += "<center>FC = Full Course, SC = Short(Half) Course<br>";

                    foreach (ExamComponent ec in m_list)
                    {
                        t2 = System.Convert.ToDateTime(ec.m_TimetableDate);
                        if (t2 < t1)
                        {
                            t1 = System.Convert.ToDateTime(ec.m_TimetableDate);
                        }
                        if (t2 > t0)
                        {
                            t0 = System.Convert.ToDateTime(ec.m_TimetableDate);
                        }
                    }
                    int month = t1.Month; ExamComponent ecx;
                    int day = t1.Day;
                    s1 += "<br><br><br><center><h2>Outline Exam Timetable</h2>";
                    s1 += "Full Exam Timetable can be found <a href=\"ExamTimetables.aspx?\">here</a></center>";
                    s1 += "<center>Note that for GCSE Languages the tier (Foundation or Higher) is not significant. ";
                    s1 += "<BR><p  align=\"center\"><TABLE BORDER><TR>";
                    s   = "Date"; s1 += "<Th>" + s + "</Th>";
                    s   = "AM Session"; s1 += "<Th>" + s + "</Th>";
                    s   = "PM Session"; s1 += "<Th>" + s + "</Th>";
                    s1 += "</TR>";
                    //from t1 to t0...
                    t2 = t1; t0 = t0.AddDays(1);
                    while (t2 < t0)
                    {
                        if ((t2.DayOfWeek.ToString() != "Saturday") && (t2.DayOfWeek.ToString() != "Sunday"))
                        {
                            s1 += "<TR>";
                            s   = t2.DayOfWeek.ToString(); s += "<br>" + t2.ToShortDateString(); s1 += "<TD>" + s + "</TD>"; s = ""; ecx = null;
                            foreach (ExamComponent ec in m_list)
                            {
                                if ((t2 == System.Convert.ToDateTime(ec.m_TimetableDate)) && (ec.m_TimetableSession == "A"))
                                {
                                    s += ec.m_OptionTitle + ec.m_ComponentTitle.ToLower() + "<br>"; ecx = ec;
                                }
                            }
                            if (ecx != null)
                            {
                                m_list.Remove(ecx);
                            }
                            s1 += "<TD>" + s + "</TD>"; s = ""; ecx = null;
                            foreach (ExamComponent ec in m_list)
                            {
                                if ((t2 == System.Convert.ToDateTime(ec.m_TimetableDate)) && (ec.m_TimetableSession == "P"))
                                {
                                    s += ec.m_OptionTitle + ec.m_ComponentTitle.ToLower() + "<br>"; ecx = ec;
                                }
                            }
                            m_list.Remove(ecx);
                            s1 += "<TD>" + s + "</TD>";
                            s1 += "</TR>";
                        }
                        t2 = t2.AddDays(1);
                    }
                    s1 += "</TABLE>";
                    servercontent.InnerHtml = s1;
                }
            }
        }
コード例 #9
0
        /*
         *  private void RenderModuleResultLine(HttpResponse Response, Result r1,bool retake)
         *  {
         *      string s = "";
         *      ExamOption exo1 = new ExamOption();
         *      Response.Write("<TR>");
         *      s = r1.Date.ToShortDateString(); Response.Write("<TD>" + s + "</TD>");
         *      s = r1.Coursename; Response.Write("<TD>" + s + "</TD>");
         *      s = r1.OptionTitle; Response.Write("<TD>" + s + "</TD>");
         *      s = r1.OptionCode; Response.Write("<TD>" + s + "</TD>");
         *      s = r1.Value; Response.Write("<TD>" + s + "</TD>");
         *      s = r1.OptionMaximumMark; Response.Write("<TD>" + s + "</TD>");
         *
         *      s = "";
         *      if (r1.Resulttype == 27)//UMS mark for GCSE
         *      {
         *          try
         *          {
         *              double v1 = System.Convert.ToDouble(r1.Value);
         *              double v2 = System.Convert.ToDouble(r1.OptionMaximumMark);
         *              v1 = v1 / v2;
         *              if (v1 >= 0.9) s = "a*";
         *              if ((v1 < 0.9) && (v1 >= 0.8)) s = "a";
         *              if ((v1 < 0.8) && (v1 >= 0.7)) s = "b";
         *              if ((v1 < 0.7) && (v1 >= 0.6)) s = "c";
         *              if ((v1 < 0.6) && (v1 >= 0.5)) s = "d";
         *              if ((v1 < 0.5) && (v1 >= 0.4)) s = "e";
         *              if ((v1 < 0.4)) s = "u";
         *          }
         *          catch (Exception exc1)
         *          {
         *              s = exc1.Message;
         *          }
         *      }
         *      if (r1.Resulttype == 11)//GCE module mark
         *      {
         *          try
         *          {
         *              double v1 = System.Convert.ToDouble(r1.Value);
         *              double v2 = System.Convert.ToDouble(r1.OptionMaximumMark);
         *              v1 = v1 / v2;
         *              if (v1 >= 0.8) s = "a";
         *              if ((v1 < 0.8) && (v1 >= 0.7)) s = "b";
         *              if ((v1 < 0.7) && (v1 >= 0.6)) s = "c";
         *              if ((v1 < 0.6) && (v1 >= 0.5)) s = "d";
         *              if ((v1 < 0.5) && (v1 >= 0.4)) s = "e";
         *              if ((v1 < 0.4)) s = "u";
         *          }
         *          catch (Exception exc1)
         *          {
         *              s = exc1.Message;
         *          }
         *      }
         *
         *      Response.Write("<TD>" + s + "</TD>");
         *      exo1.Load(r1.OptionId);
         *      Exam_Board exb1 = new Exam_Board(exo1.m_ExamBoardID);
         *      Response.Write("<TD>" + exb1.m_OrganisationFriendlyName + "</TD>");
         *      if (retake)
         *      {
         *          CheckBox cb1 = new CheckBox();
         *          cb1.ID = "CheckBox-" + r1.OptionId.ToString() ;
         *          Response.Write("<TD><asp:CheckBox ID=\"" + cb1.ID.ToString() + "\"  runat=\"server\" /></TD>");
         *      }
         *      Response.Write("</TR>");
         *  }
         *
         *  private void RenderModuleResultTableHeader(HttpResponse Response, Guid PersonId,bool retake)
         *  {
         *      Utility u1 = new Utility();
         *      Response.Write("<H1><center> Module Results for " + u1.GetPersonName(PersonID) + "</H1></center><BR>");
         *      Response.Write("<BR><p  align=\"center\"><TABLE BORDER><TR>");
         *      Response.Write("<TD>Date</TD>");
         *      Response.Write("<TD>Subject</TD>");
         *      Response.Write("<TD>Option Title</TD>");
         *      Response.Write("<TD>Option Code</TD>");
         *      Response.Write("<TD>Result</TD>");
         *      Response.Write("<TD>Max Mark</TD>");
         *      Response.Write("<TD>Grade</TD>");
         *      Response.Write("<TD>Exam Board</TD>");
         *      if (retake) Response.Write("<TD>Retake ?</TD>");
         *      Response.Write("</TR>");
         *  }
         */
        protected void Button_submit_Click(object sender, EventArgs e)
        {
            Guid PersonID = (Guid)ViewState["PersonID"];

            Table1.Visible        = false;
            Label1.Visible        = false;
            TextBox_cost.Visible  = false;
            Button_submit.Visible = false;
            Label_title.Visible   = false;
            ExamOption           exo1 = new ExamOption();
            ExamCompononent_List ecl1 = new ExamCompononent_List();
            string  dates             = "";
            double  cost  = 0;
            double  total = 0;
            Utility u1    = new Utility();

            Guid[]       list1 = new Guid[100]; int no_list1 = 0; bool in_list1 = false;
            PupilDetails pupil1 = new PupilDetails(u1.GetStudentId(PersonID).ToString());

            int    cover_cost = RetakeCoverCost();
            string season     = RetakeSeason();
            string year       = RetakeYear();
            string s1         = RetakeMessage();
            string s2         = "";

            s2  = "<H2><center>Entry Requests for " + u1.GetPersonName(PersonID) + "  " + u1.Get_Form(pupil1.m_StudentId.ToString()) + "(" + pupil1.m_examNo.ToString() + ")</H2></center><BR>";
            s2 += "<H3><center>You should print this page and take it with your cheque ";
            s2 += "made out to DCGS to the Exams Office.</H3></center><BR><H3><center>" + s1 + "</H3></center><BR>";


            s2 += "<BR><p  align=\"center\"><TABLE BORDER><TR><TD>Option Code</TD><TD>Option Title</TD>";
            s2 += "<TD>Exam Board</TD><TD>Date</TD><TD>Cost</TD><TD>Comment</TD></TR>";

            resultlist1 = (ResultsList)ViewState["ResultList"];
            string   s   = "";
            CheckBox cb1 = new CheckBox();

            foreach (Result r1 in resultlist1._results)
            {
                s   = r1.OptionId.ToString(); cb1 = null;
                cb1 = (CheckBox)content.FindControl(s);
                if (cb1 != null)
                {
                    if (cb1.Checked)
                    {
                        exo1.Load(r1.OptionId);
                        ecl1.m_list.Clear();
                        ecl1.Load(r1.OptionId);
                        Exam_ResitEntry exres1 = new Exam_ResitEntry();
                        exres1.Load(r1.StudentID, r1.OptionId);
                        in_list1 = false;
                        for (int i = 0; i < no_list1; i++)
                        {
                            if (list1[i] == r1.OptionId)
                            {
                                in_list1 = true;
                            }
                        }

                        if (in_list1)
                        {
                            //already entered......
                        }
                        else
                        {
                            s2 += "<TR><TD>" + r1.OptionCode + "</TD><TD>" + r1.OptionTitle + "</TD>";
                            Exam_Board exb1 = new Exam_Board(exo1.m_ExamBoardID);
                            s2   += "<TD>" + exb1.m_OrganisationFriendlyName + "</TD>";
                            dates = "";
                            foreach (ExamComponent c1 in ecl1.m_list)
                            {
                                if (c1.m_Timetabled == "T")
                                {
                                    dates += c1.m_TimetableDate.ToShortDateString();
                                }
                            }
                            s2  += "<TD>" + dates + "</TD>";
                            cost = (double)exo1.m_feeInt + cover_cost;
                            exres1.Load(r1.StudentID, r1.OptionId);
                            if (!exres1.m_valid)
                            {
                                exres1.m_cost        = (int)cost;
                                exres1.m_DateCreated = DateTime.Now;
                                exres1.m_OptionId    = r1.OptionId;//has been updated when we loaded it to be the new one..
                                exres1.m_season      = season;
                                exres1.m_year        = year;
                                exres1.m_StudentId   = u1.GetStudentId(PersonID);
                                exres1.m_version     = 1;
                                exres1.Save();
                            }
                            cost   = cost / 100;
                            total += cost;
                            s2    += "<TD>" + cost.ToString() + "</TD>";
                            if (exo1.NeedsTeacherMarks())
                            {
                                s2 += "<TD>Warning - Needs CW</TD></TR>";
                            }
                            else
                            {
                                s2 += "<TD></TD></TR>";
                            }
                            list1[no_list1] = r1.OptionId; no_list1++;
                        }
                    }
                    else
                    {
                        Exam_ResitEntry exres1 = new Exam_ResitEntry();
                        exres1.Load(r1.StudentID, r1.OptionId);
                        if (exres1.m_valid)
                        {
                            exres1.Delete();                 //need to delete it!!!;
                        }
                    }
                }
            }
            s2 += "</TABLE> <H3><center>Total Cost : £" + total.ToString() + "</H3></center><H3><center>Dates are provisional!</H3></center>";
            servercontent.InnerHtml = s2;
        }