SIMS 7 - Attendance New changed marks APIs
With the intention of making the get changed attendance marks compatible with the other read and write calls, we are adding:
Session
private static List<DataClasses.SessionAttendanceExtended> SessionAttendanceReadTestPerson(DateTime lastUpdated)
{
List<DataClasses.SessionAttendanceExtended> list = new List<DataClasses.SessionAttendanceExtended>();
string SessionMarks = TPAR.GetXmlChangedSessionAttendancesV3(lastUpdated.AddMinutes(-20));
XmlSerializer serializer = new XmlSerializer(typeof(DataClasses.SessionAttendancesExtended));
using (StringReader reader = new StringReader(SessionMarks))
{
var test = (DataClasses.SessionAttendancesExtended)serializer.Deserialize(reader);
list = test.SessionAttendanceExtended;
}
return list;
}
Lesson
private static List<DataClasses.LessonAttendanceExtended> LessonAttendanceReadTestPerson(DateTime lastUpdated)
{
List<DataClasses.LessonAttendanceExtended> list = new List<DataClasses.LessonAttendanceExtended>();
string LessonMarks = TPAR.GetXmlChangedLessonAttendancesV3(lastUpdated.AddMinutes(-20));
XmlSerializer serializer = new XmlSerializer(typeof(DataClasses.LessonAttendancesExtended));
using (StringReader reader = new StringReader(LessonMarks))
{
var test = (DataClasses.LessonAttendancesExtended)serializer.Deserialize(reader);
list = test.LessonAttendanceExtended;
}
return list;
}
These will return <Lesson|Session>AttendanceExtendeds like their counterparts
- GetXmlSessionAttendancesExtendedV3
- GetXmlLessonAttendancesExtendedV3
We recommend the use of these in place of the calls:
- TPAR.GetXmlChangedLessonAttendancesInRangeV3
- TPAR.GetXmlChangedSessionAttendancesInRangeV3
Because the formats of these are different to the rest of the calls.