SIMS 7 - TPAttendanceWrite
Writes session attendance marks back to SIMS. The writing of Comments and MinsLate is optional.
// Model
TPAttendanceWrite attWrite = new TPAttendanceWrite();
bool done = attWrite.WriteSessionAttendances(xmlstring);
//Example
string xmlstring = "<SessionAttendances><SessionAttendance><PersonID>6420</PersonID><AttendanceDate>2010-01-04</AttendanceDate><SessionName>AM</SessionName><AttendanceMark>M</AttendanceMark><Comments></Comments><MinsLate></MinsLate></SessionAttendance></SessionAttendances>
TPAttendanceWrite attWrite = new TPAttendanceWrite();
attWrite.WriteSessionAttendances(xmlstring);
Writes lesson attendance marks back to SIMS.
Please note that there are 2 options:
- Period Attendance
- Lesson Attendance (requires in addition to period attendance (all 3 must be provided))
string xmlstring = " <LessonAttendances><LessonAttendance><PersonID>7338</PersonID><EventInstanceID>32220</EventInstanceID><AttendanceMark>d</AttendanceMark><Comments>new params</Comments><MinsLate>2</MinsLate><BaseGroupID>7291</BaseGroupID><LocationID>19</LocationID><EmployeeID>34</EmployeeID></LessonAttendance></LessonAttendances>"
TPAttendanceWrite attWrite = new TPAttendanceWrite();
bool done = attWrite.WriteLessonAttendances(xmlstring);
// Option 2
TPAttendanceWrite attWrite = new TPAttendanceWrite();
bool done = attWrite.WriteLessonAttendances2(xmlstring);
//The operation of WriteLessonAttendances2() differs from WriteLessonAttendances()
// in the fact that each <LessonAttendance> in the input xml is validated and only commited if passed.
//WriteLessonAttendances() fails to commit all <LessonAttendance> input if there is a validation error.