Hi there,
this my scheduler:
<ejs-schedule id="main-scheduler" height="635" cssClass="main-scheduler-cssClass" selectedDate="new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day)">
<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 dataSource="dataManager">
</e-schedule-eventsettings>
</ejs-schedule>
and this is my DataManager:
var dataManager = new DataManager() { Url = "/Scheduler/GetCommunicationRecords", CrudUrl = "/Scheduler/CudOperations", CrossDomain = true, Adaptor = "UrlAdaptor" };Both GetCommunicationRecords and CrudUrl Methods work fine, i can read/update/create/delete the data from the database.
But when i try to redirect it to another action, it doesn't work! It throws an error in the devConsole:
Like if i want to check if the user is trying to:
1- open a View or PartialView
2- get some data that he shouldn't get
3- ....
I want to redirect the method to the LoginMethod. Like this:
public ActionResult CudOperations()
{
var sessionUsername = HttpContext.Session.GetString("_username");
if (!string.IsNullOrWhiteSpace(sessionUsername))
{
// this is what i want to do
return RedirectToAction("Index", "Login");
}
return Json(// SOMETHING!, it doesn't matter because this point is not going to be triggered);
}
Regards,
Vaiker