You should take a look at the DemoSQL directory, especially DemoSQL/Default.aspx.cs. You will find a sample TimeRangeSelected handler there:
protected void DayPilotCalendar1_TimeRangeSelected(object sender,
TimeRangeSelectedEventArgs e)
{
using (SqlConnection con
= new SqlConnection(ConfigurationManager.ConnectionStrings["daypilot"].ConnectionString))
{
con.Open();
SqlCommand cmd = new SqlCommand("INSERT INTO [event] (eventstart, eventend, name, allday) VALUES (@start, @end, @name, 0)", con);
cmd.Parameters.AddWithValue("start", e.Start);
cmd.Parameters.AddWithValue("end", e.End);
cmd.Parameters.AddWithValue("name", "New event");
cmd.ExecuteNonQuery();
}
DayPilotCalendar1.DataBind();
DayPilotCalendar1.Update();
}
This demonstrates how to do it for DayPilotCalendar, but DayPilotScheduler works the same way.