Ejemplo n.º 1
0
 protected void ButtonExport_Click(object sender, EventArgs e)
 {
     Response.Clear();
     Response.ContentType = "image/png";
     Response.AddHeader("Content-Disposition", "attachment;filename=print.png");
     DayPilotCalendar1.DataBind();
     DayPilotCalendar1.Export(ImageFormat.Png).WriteTo(Response.OutputStream);
     Response.End();
 }
Ejemplo n.º 2
0
    protected void ButtonExport_Click(object sender, EventArgs e)
    {
        int hourHeight = DayPilotCalendar1.CellHeight * 60 / DayPilotCalendar1.CellDuration;

        Response.Clear();
        Response.ContentType = "image/png";
        Response.AddHeader("content-disposition", "attachment;filename=print.png");
        MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * hourHeight);

        img.WriteTo(Response.OutputStream);
        Response.End();
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        defineColumns();

        DayPilotCalendar1.StartDate = DayPilot.Utils.Week.FirstDayOfWeek();

        if (Session["AllFeatures"] == null)
        {
            Session["AllFeatures"] = DataGeneratorCalendar.GetData();
        }



        DayPilotCalendar1.DataSource = Session["AllFeatures"];
        DataBind();

        // override the output
        Response.Clear();
        Response.ContentType = "image/png";
        MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png);

        img.WriteTo(Response.OutputStream);
        Response.End();
    }