Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region Data loading initialization
        if (Session["DaysModeMonth"] == null)
        {
            Session["DaysModeMonth"] = DataGeneratorScheduler.GetDataDays();
        }
        table = (DataTable)Session["DaysModeMonth"];
        DayPilotScheduler1.DataSource = Session["DaysModeMonth"];
        #endregion

        if (!IsPostBack)
        {
            DateTime start = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            DateTime end   = start.AddMonths(1);
            int      days  = (int)Math.Floor((end - start).TotalDays);

            DayPilotScheduler1.StartDate = start;
            DayPilotScheduler1.Days      = days;

            DayPilotScheduler1.SetScrollX(DayPilotScheduler1.StartDate.Date.AddHours(8));

            DataBind();
        }
    }
Esempio n. 2
0
 /// <summary>
 /// Make sure a copy of the data is in the Session so users can try changes on their own copy.
 /// </summary>
 private void initData()
 {
     if (Session[PageHash] == null)
     {
         Session[PageHash] = DataGeneratorScheduler.GetData();
     }
     table = (DataTable)Session[PageHash];
 }
Esempio n. 3
0
    private void initData()
    {
        string id = Request.QueryString["hash"];

        if (Session[id] == null)
        {
            Session[id] = DataGeneratorScheduler.GetData();
        }
        table = (DataTable)Session[id];
    }
Esempio n. 4
0
    private void initData()
    {
        string id = Request.QueryString["hash"];

        if (Session[id] == null)
        {
            Session[id] = DataGeneratorScheduler.GetData();
            Response.Redirect("login.aspx");
        }
        table = (DataTable)Session[id];
    }