© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 7 - TPRoom

TPRoom.GetXmlRooms()

This interface will get all rooms from SIMS system. Sample output from this interface is as below

TPRoom.GetXmlRooms(int roomId)

This interface will get information of the room supplied as the input. Sample code and output from this interface is shown below

Example

TPRoom roomInfo = new TPRoom();
string data = roomInfo.GetXmlRooms(20);

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<Rooms>
  <Room>
    <RoomID>20</RoomID>
    <RoomCode>A1</RoomCode>
    <RoomName>Art Room 1</RoomName>
  </Room>
</Rooms>

TPRoom.GetXmlGroupRooms(int BaseGroupId)

This interface gets the room id associated with the baseGroupId supplied. Sample code and output from this interface is shown below

TPRoom roomInfo = new TPRoom();
string data = roomInfo.GetXmlGroupRooms(5230);

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<GroupRooms>
  <GroupRoom>
    <BaseGroupID>5230</BaseGroupID>
    <RoomID>52</RoomID>
  </GroupRoom>
</GroupRooms>

TPRoom.GetXmlChangedRooms(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the rooms from SIMS system as shown below:

TPRoom roomInfo = new TPRoom();
string alldata = roomInfo.GetXmlChangedRooms(DateTime.Parse("04/01/2009"));

2) Calling this interface [with appropriate Date] after modify [room id – 1, Change name from Art Room 1 to Art Room One]/delete [Room_id – 66]/Adding a new room [Art Room New] will bring the changed information

TPRoom roomInfo = new TPRoom();
string changeddata = roomInfo.GetXmlChangedRooms(DateTime.Parse("04/01/2009"));

Output:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<Rooms>
  <Room deleted="true">
    <RoomID>66</RoomID>
  </Room>
  <Room>
    <RoomID>20</RoomID>
    <RoomCode>A1</RoomCode>
    <RoomName>Art Room One</RoomName>
  </Room>
  <Room>
    <RoomID>68</RoomID>
    <RoomCode>AN</RoomCode>
    <RoomName>Art Room New</RoomName>
  </Room>
</Rooms>

Only room_id is returned for deleted room

 

SIMS 7 RESOURCES

Related resources for SIMS 7