CHiLL Posted November 23, 2011 Author Posted November 23, 2011 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?
nickbro Posted November 24, 2011 Posted November 24, 2011 You should be able to use the SIMS Import Button, but for some reason it has just copied the SIMS export
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 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. Source Error: 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. Stack Trace: [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
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 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.
nickbro Posted November 24, 2011 Posted November 24, 2011 Odd, it should of done. It's set to just look for B and add 5 to the count
nickbro Posted November 24, 2011 Posted November 24, 2011 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
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 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? if: = Week A - Monday - Period 1 How do I get HAP to understand Week B - Monday - Period 1?
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 (edited) 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. EDIT: Just found a pattern. It's only adding one entry per room. It'll add MonA:1 in BS1, because it can see BS1 but then not do MonA:2, etc, it'll just skip it until it sees the next Room For example: BS1 Mr T Sellick Media MonA:1 Year 12 Mrs C V Hallwood Business MonA:2 Year 10 It will add the first record, as it can see a BS1, 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 Ha. Edited November 24, 2011 by CHiLL
nickbro Posted November 24, 2011 Posted November 24, 2011 Ah, edited the SIMS Report, unticking the suppress duplicates option on the last page
nickbro Posted November 24, 2011 Posted November 24, 2011 I've updated the report definition on codeplex removing the suppress duplicates
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 It was starting to look promising, but then I got this trying to import: 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. Source Error: 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. Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] HAP.Web.BookingSystem.admin.<>c__DisplayClass9.b__0(UserInfo u) +84 System.Linq.Enumerable.Count(IEnumerable`1 source, Func`2 predicate) +156 HAP.Web.BookingSystem.admin.Default.importSIMS_Click(Object sender, EventArgs args) +928 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 The room names defined in hapconfig.xml match what SIMS has exported.
nickbro Posted November 24, 2011 Posted November 24, 2011 Can you try emptying the staticbookings.xml file and trying again.
CHiLL Posted November 24, 2011 Author Posted November 24, 2011 Comes up with the same error that's in post #91.
nickbro Posted November 24, 2011 Posted November 24, 2011 Ok, that's odd. I just tried it on my test install and it imported everything, had to rename a teacher in the SIMS export but that was removing an extra initial. Can you try with this (note the ~/bookingsystem/admin/default.aspx has been edited)
CHiLL Posted November 25, 2011 Author Posted November 25, 2011 (edited) That seems to have broken the Import from SIMS button. When I click it, it simply reloads the Main tab of the Control Panel of the Booking System without adding anything into StaticBookings.xml Edited November 25, 2011 by CHiLL
nickbro Posted November 25, 2011 Posted November 25, 2011 That's by design actually. If it's reloading the page correctly and not showing any errors then it's working
nickbro Posted November 25, 2011 Posted November 25, 2011 Is it still not importing the Timetabled Lessons?
nickbro Posted November 26, 2011 Posted November 26, 2011 Hmm, very odd, I just checked my test version again, and it is importing my XML file. It does redirect back to the admin home page when it's done now to avoid any issues with reloading the data grids. But the XML file was populated
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now