Jump to content

Recommended Posts

Posted

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?

Posted

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

Posted

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.

Posted

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

Posted

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?

Posted (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 by CHiLL
Posted

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.

Posted

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)

Posted (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 by CHiLL
Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...