public Tutor(Pupil p) { strTutor = p.GetTutor(); strTutorEmail = p.GetTutorEmail(); strYearEmail = p.GetHoYEmail(); arrPupils[nCurrentCount++] = p; }
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()); } }
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; } }
public void AddPupil(Pupil p) { arrPupils[nCurrentCount++] = p; }
public YearHead(Pupil p) { strYearEmail = p.GetHoYEmail(); arrPupils[nCurrentCount++] = p; }
//*************************************************************** 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); } }