AJAX Calendar/Scheduling Controls
Hi,
I am trying to modify DemoSQL. I am using 3 tier achitecture.How can I use an object to insert the New Event into the database?
Thanks
protected void DayPilotCalendar1_TimeRangeMenuClick(object sender, TimeRangeMenuClickEventArgs e) { if (e.Command == "Insert") { // call your business layer code for inserting a new event events.create(e.Start, e.End, "New event"); // set DataSource if you haven't specified DataSourceID in the .aspx DayPilotCalendar1.DataSource = yourDataSource; // bind the data DayPilotCalendar1.DataBind(); // tell DayPilotCalendar to redraw the events on // the client side (when using CallBack) DayPilotCalendar1.Update(); } }
i have a layered approach and its going great, the only question i have is about the colouring. i am binding the control to a colloction of Events.
these events areeach havean"EventType" (for example sickleave, birthday, bookings etc etc) , but they are all of type Event in the same collection.
is there a way to specify the colours for each type, maybe in the Event constructor, so that all birthdays appear in one colour and the leave appears in a different colour?
DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java