예제 #1
0
 public Tutor(Pupil p)
 {
     strTutor = p.GetTutor();
     strTutorEmail = p.GetTutorEmail();
     strYearEmail = p.GetHoYEmail();
     arrPupils[nCurrentCount++] = p;
 }
예제 #2
0
        public void UpdateBehaviourLog(string strStaffEmail, Pupil p)
        {
            using (StreamWriter sW = new StreamWriter("event.csv", true))
            {
                // update behaviour log with..

                sW.WriteLine(strStaffEmail, DateTime.Now.ToString(), p.GetForm(), p.GetName(), GetEventTime(), GetEventCategory(), GetEventDetail());
            }
        }
예제 #3
0
        public PupilGroup()
        {
            FileReader r = new FileReader(strFile);

            string[,] strPupilRows = r.LoadFile(ref nCount);

            for (int i = 0; i < nCount; i++)
            {
                if( strPupilRows[i,0] == null) // end of contents..
                {
                    return;
                }

                Pupil p = new Pupil(strPupilRows[i, 0], strPupilRows[i, 1], strPupilRows[i, 2], strPupilRows[i, 3], strPupilRows[i, 4], strPupilRows[i, 5], strPupilRows[i, 6], strPupilRows[i, 7], strPupilRows[i, 8]);
                arrPupils[i] = p;
            }
        }
예제 #4
0
 public void AddPupil(Pupil p)
 {
     arrPupils[nCurrentCount++] = p;
 }
예제 #5
0
 public YearHead(Pupil p)
 {
     strYearEmail = p.GetHoYEmail();
     arrPupils[nCurrentCount++] = p;
 }
예제 #6
0
        //*************************************************************** Event Handlers**********************************************************
        private void LoadPupilsFromFile()
        {
            int nCount = 0;
            FileReader r = new FileReader("Pupils.csv");
            string[,] strFields = r.LoadFile(ref nCount);

            for( int i = 0; i < nCount; i++)
            {
                arrPupils[i] = new Pupil(strFields[i, 0], strFields[i, 1], strFields[i, 2], strFields[i, 3], strFields[i, 4], strFields[i, 5], strFields[i, 6], strFields[i, 7], strFields[i, 8]);
                lstPupils.Items.Add(strFields[i,0]);

                // also add comment target class..

                arrPupils[i].SetCommentGroup(commentGrp);
            }
        }