You need to rebind - using DayPilotCalendar.DataBind() - every time you make a change to the event set. That means typically:
- In Page_Load in if (!IsPostBack) section.
- After moving, resizing, deleting... the event. That is inside EventMove, EventResize, EventDelete event handlers, right after updating your database.
- In Refresh event handler (after switching the Date).
In all cases, you should limit your selection to the time range determined by DayPilotCalendar.StartDate and DayPilotCalendar.EndDate.
For an example SELECT query, see
http://forums.daypilot.org/Topic.aspx/208/daypilot_sql_sample_application