Hello,
After further stepping through my code, I think I realize what the problem is - all events, regardless of whether they are recurring, exceptions to recurring, or normal events, are being saved in the database with the normal id, text, start_date, and end_date properties as well as event_length, event_pid, and rec_type properties. For each event entry, they all have correct and non-null id, text, start_date, and end_date values. However, the values for the event_length, event_pid, and rec_type properties for non-recurring events are being set to null (or for recurring events that are not exceptions, the event_pid value is set to null). Although the columns in the database are set to nullable values, I think this is why the ContentResult Data() method is returning an events string, but the scheduler is not correctly reading the SchedulerAjaxData content result - and therefore, why the events are not being displayed. Any advice on how to approach and solve this issue would be very much appreciated.
Also, I’m not sure if I also need a Data.cshtml view to be associated with the ContentResult Data() method, or if my Index.cshtml method suffices. Maybe that’s also my problem?
Currently my ContentResult Data() method is as follows (my code is already attached but I thought I’d add it here also):
public ContentResult Data() {
var data = new SchedulerAjaxData(
new Entities().PZ_T_TMP_SCHEDULERNET_EVENTS.AsEnumerable()
.Select(e => new { e.ID, e.TEXT, e.START_DATE, e.END_DATE, e.EVENT_LENGTH, e.EVENT_PID, e.REC_TYPE })
);
return data;
And my SchedulerAjaxData events string is such:
data = {[{ID:1375960857167,TEXT:“New event 3”,START_DATE:“2013-08-08 4:05”,END_DATE:“2013-08-08 5:10”,EVENT_LENGTH:null,EVENT_PID:null,REC_TYPE:null},{ID:1375961650985,TEXT:“Sarina Test 2”,START_DATE:“2013-08-08 9:05”,END_DATE:“2013-08-08 10:05”,EVENT_LENGTH:null,…
I believe my problem is similar (perhaps identical) to this post from March. viewtopic.php?f=25&t=28898
Thanks for any help that can be provided!