I thought there was a way of exporting from the SIMS report definition into StaticBookings using the SIMS import through the Control Panel of the BookingSystem?
Do I have to manually add all those entries in one by one, lesson for lesson, day for day, for a two week time table?
You should be able to use the SIMS Import Button, but for some reason it has just copied the SIMS export
Any idea why that happened?
Getting the following:
Server Error in '/HAP' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[NullReferenceException: Object reference not set to an instance of an object.]
HAP.Web.BookingSystem.admin.Default.importSIMS_Click(Object sender, EventArgs args) in N:\Visual Studio 2010\Projects\CHS Extranet\HAP.Web\BookingSystem\admin\Default.aspx.cs:178
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Hm, after trying it again, it's imported this from the Timetable.xml exported from SIMS:
That's getting somewhere, but I don't think its understood two week timetables.
<?xml version="1.0" encoding="utf-8"?>
<Booking day="1" lesson="Period 1" room="BS1" name="Year 12 Media" username="SellickT" />
<Booking day="2" lesson="Period 3" room="Ha" name="Year 7 Dance" username="hollr" />
<Booking day="1" lesson="Period 1" room="IT1" name="Year 9 DT" username="GoodeD" />
<Booking day="1" lesson="Period 1" room="IT2" name="Year 10 IT" username="LewisG" />
<Booking day="1" lesson="Period 1" room="IT3" name="Year 8 IT" username="tennysone" />
<Booking day="1" lesson="Period 1" room="IT4" name="Year 10 IT" username="wilsonc" />
<Booking day="1" lesson="Period 2" room="IT5" name="Year 11 Biology" username="collp" />
<Booking day="1" lesson="Period 1" room="IT6" name="Year 12 Travel &" username="magilc" />
<Booking day="1" lesson="Period 1" room="L4" name="Year 8 Spanish" username="faria" />
<Booking day="1" lesson="Period 2" room="LRC" name="Year 12 Business" username="stridl" />
Odd, it should of done. It's set to just look for B and add 5 to the count
What you included above, is that all or just some?
If it isn't doing the days correctly, but putting everything else in, just change the day numbers
That was all that was imported into StaticBooking.xml. However the actual Timetable.xml from SIMS is very populated, there's usually only one or two lessons free per day per room. So you can imagine that the timetable has a lot of info, with 7 periods per day.
If I were to manually add the rooms in, how does HAP understand two week timetables?
<Booking day="1" lesson="Period 1" room="BS1" name="Year 12 Media" username="SellickT" /> = Week A - Monday - Period 1
How do I get HAP to understand Week B - Monday - Period 1?
Add 5 to the day. Try the updated dll
I have tried DLL and it hasn't worked. It's still only importing those select few, and its getting the days wrong.
It appears it isn't understanding MonA:1 as being Week 1 Period 1, etc.
Just found a pattern. It's only adding one entry per room.
It'll add MonA:1 in BS1, because it can see <name>BS1</name> but then not do MonA:2, etc, it'll just skip it until it sees the next <Name>Room</Name>
It will add the first record, as it can see a <Name>BS1</Name>, however because the next record doesn't have a Name tag, it will skip it, and the rest, until it finds the next Name tag. Which in this case is <Name>Ha</Name>.
<MainTeacher>Mr T Sellick</MainTeacher>
<MainTeacher>Mrs C V Hallwood</MainTeacher>
Ah, edited the SIMS Report, unticking the suppress duplicates option on the last page
I've updated the report definition on codeplex removing the suppress duplicates