Event Calendar and ModalPopupExtender
Asked by Tolga
10 years ago.
I wonder where is the "DbSelectEvents" function in your tutorial?
Answer posted by Dan Letecky [DayPilot]
10 years ago.
It's omitted from the tutorial text for brevity but you can find it in the downloadable project (in Default.aspx.cs).
This is the source code:
private DataTable DbSelectEvents(DateTime start, DateTime end)
{
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM [event] WHERE NOT (([eventend] <= @start) OR ([eventstart] >= @end))", ConfigurationManager.ConnectionStrings["daypilot"].ConnectionString);
da.SelectCommand.Parameters.AddWithValue("start", start);
da.SelectCommand.Parameters.AddWithValue("end", end);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
Answer posted by Tolga
10 years ago.
thank you sir I am grateful
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.