Hi,
Discovered the following issue as a result of the iMIS database having invalid data. When creating the CRegistration object [using CRegistration(IiMISUser user, string eventCode, string registrantContactId, bool autoEnroll, bool addLinked) constructor] the property CRegistration.RegistrationLineItems had thrown an exception. After digging I noticed that when constructing the CRegistration object it was trying to retrieve existing order details but since the database had an order_line with an order_number of 0.0 this record was been picked up by default. Since this order was incorrect, populating the RegistrationLineItemslist (in the IBO.NET) was throwing an exception and everything else was also breaking.
Although this was triggered by having incorrect data I believe the IBO.NET code should not have picked up the invalid order_line. Is this something that could be looked at?
Thanks.
Asi.iBO.Events.CRegistration - RegistrantClass
Using Version 1.0.3474.23390Version 1.0.3474.23390 of the ASI.IBO. assembly.
I had a problem with the the NewLineItem method on the CRegistration object that may be related to your problem. I programatically created a CRegistration object and was iterating thru a list adding new line items as needed. My first item was added successfully and subsequent items failed with a NoPricingForRegistrant error regardless if specific pricing was set for the registrant class or if using the default function registration fees in imis. I was also setting the RegistrantClass property explicitly after calling the first NewLineItem method from within my loop. I then moved that RegistrantClass property setting to after all the line items were created and found success. This may be a bug with the SetLineItemDefaults method when the registrantclass property is set. It throws the NoPricing... exception but does not continue on to set the functionFee,... things break and no new registrationLineItem is created.
The RegistrationLineItemsList not working seems to be what each problem has in common.
A side note but i found a note to myself from a much earlier version of the ibo.net that the CRegistration constructors that take 2 & 3 parameters return an existing registration while the one that takes 5 (the one you are using) creates a new (empty) one. I don't know if this still the case with the latest version.