Binding Calendar Events to Backend Stored Procedure Dataset
13 years ago.
Hi there I am trying to bind the daypilotMonth to a controller that returns data from a stored procedure as below :
Protected Overrides Sub OnInit(ByVal e As DayPilot.Web.Mvc.Events.Month.InitArgs)
Dim db2 = New R32_LiveEntities1
Dim Events As List(Of SSC_Identify_Holidays_By_Line_Manger_Result)
'Events = db2.ExecuteStoreQuery(Of SSC_Identify_Holidays_By_Line_Manger_Result)("SSC_Identify_Holidays_By_Line_Manger").ToList
Events = db2.ExecuteStoreQuery(Of SSC_Identify_Holidays_By_Line_Manger_Result)("SSC_Identify_Holidays_By_Line_Manger").ToList
DataIdField = Events.FirstOrDefault.RowNum
DataTextField = Events.FirstOrDefault.Employee
DataStartField = Events.FirstOrDefault.Annual_Leave_Day
DataEndField = Events.FirstOrDefault.Annual_Leave_Day
Update()
End Sub
however I know the SP returns data and have amended dates to return in current month , so i would expect to see values but the calendar does not bind. Apologies if this is something very stupid as i am new to MVC and Javascript.
Regards
Jason
DayPilot