Home Unanswered Active Tags New Question

Object Oriented Prgramming

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

Asked by Anonymous 3 years ago.
Replies
DayPilot doesn't impose any specific way of data update. The mechanism for creating a new event (from a context menu invoked on a time range selection) is the following:
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();

}
}
This is a simplified example from Demo/Calendar/EventCreating.aspx.cs.
Comment posted by Dan Letecky 3 years ago.

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?

Comment posted by sp4ceman@gmail.com 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java