Hi there,
this is the scheduler:
@{
var dataManager = new DataManager() { Url = "/Scheduler/GetCommunicationRecords", CrudUrl = "/Scheduler/CudOperations", CrossDomain = true, Adaptor = "UrlAdaptor"};
}
<ejs-schedule id="main-scheduler" width="100%" height="100%" cssClass="main-scheduler-cssClass" weekRule="FirstFourDayWeek" showWeekNumber="true" locale="de" firstDayOfWeek="1" enableAllDayScroll="true" enableAdaptiveUI="true" selectedDate="new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day)"
navigating="ns_main_scheduler.onNavigating" actionFailure="ns_main_scheduler.onActionFailure" actionBegin="ns_main_scheduler.onActionBegin">
<e-schedule-views>
<e-schedule-view option="Day"></e-schedule-view>
<e-schedule-view option="Week"></e-schedule-view>
<e-schedule-view option="WorkWeek"></e-schedule-view>
<e-schedule-view option="Month"></e-schedule-view>
<e-schedule-view option="Agenda"></e-schedule-view>
</e-schedule-views>
<e-schedule-eventsettings enableTooltip="true" dataSource="dataManager">
</e-schedule-eventsettings>
</ejs-schedule>
this is the ActionController:
public async Task<SchedulerDto> CudOperations([FromBody] Params<SchedulerDto> param)
{
var resultValue = new SchedulerDto();
var auth = Authorize();
if (auth.IsAuthorized)
{
if (param.action == "remove" || (param.action == "batch" && param.deleted?.Count > 0))
{
resultValue = await RemoveRecord(param);
}
else if (param.action == "insert" || (param.action == "batch" && param.added?.Count > 0))
{
resultValue = await InsertRecord(param, auth);
}
else if (param.action == "update" || (param.action == "batch" && param.changed?.Count > 0))
{
resultValue = await UpdateRecord(param, auth);
}
}
return resultValue;
}
So at First it worked fine. I was debugging the project locally. So i had a local ConnectionString (local IIS). And the Controller's Parameter was filled with the right values.
But then I published the project online on a server, so that I can test if everything is going as it should be.
So I now have the Database also online hosted. So I changed the ConnectionString.
And now I get the error that the param is null.
Any help will be great.
Thanks in advance.
Regards,
Vaiker
Hi Vaiker,
We suggest you to refer and follow the below project and UG link. In the below
project, we have integrated the service and the Scheduler source code
together.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Schedule_Sample_With_Service-1793169359.zip
UG: https://ej2.syncfusion.com/aspnetcore/documentation/schedule/data-binding/#scheduler-crud-actions
Kindly let us know if this helps to resolve your problem.
Regards,
Balasubramanian S