Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145619 | Jul 1,2019 02:40 PM UTC | Jul 2,2019 10:58 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Schedule |
public eventSettings: EventSettingsModel = {
dataSource: new DataManager({
url: 'http://localhost:54738/Home/LoadData', // Here need to mention the web api sample running path
crudUrl: 'http://localhost:54738/Home/UpdateData',
crossDomain: true,
adaptor: new UrlAdaptor
}),
};
public JsonResult LoadData(Params param) // Here we get the Start and End Date and based on that can filter the data and return to Scheduler
{
var data = db.ScheduleEventDatas.Where(app => (app.StartTime >= param.StartDate && app.StartTime <= param.EndDate) || (app.RecurrenceRule != null && app.RecurrenceRule != "")).ToList(); // Here filtering the events based on the start and end date value.
return Json(data, JsonRequestBehavior.AllowGet);
}
public class Params
{
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.