Пример #1
0
 protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
 {
     e.InnerHTML = string.Format("<b>{0}</b><br />Start: {1} <br/>End: {2}<br/>Event description.",
                                 e.Text,
                                 TimeFormatter.GetHourMinutes(e.Start, DayPilotCalendar1.TimeFormat),
                                 TimeFormatter.GetHourMinutes(e.End, DayPilotCalendar1.TimeFormat));
 }
    protected void DayPilotScheduler1_TimeHeaderClick(object sender, TimeHeaderClickEventArgs e)
    {
        DayPilotScheduler1.DataSource = new DataManager().GetAssignments(DayPilotScheduler1);
        DayPilotScheduler1.DataBind();

        JsonData time = new JsonData();

        time["name"]  = "Time";
        time["value"] = String.Format("{0} - {1}", TimeFormatter.GetHourMinutes(e.Start, DayPilotScheduler1.TimeFormat), TimeFormatter.GetHourMinutes(e.End, DayPilotScheduler1.TimeFormat));
        time["start"] = e.Start.ToString("s");
        time["end"]   = e.End.ToString("s");

        if (DayPilotScheduler1.ClientState["filter"] == null)
        {
            DayPilotScheduler1.ClientState["filter"] = new JsonData();
        }
        DayPilotScheduler1.ClientState["filter"]["time"] = time;

        LoadResources();
        LoadSeparators();

        DayPilotScheduler1.Update();
    }