Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Page.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;
            if (Request.Browser.IsMobileDevice)
            {
                Response.Redirect("mmaster.aspx");
            }
            else
            {
                string val = null;
                if (Request.Cookies["userData"] != null)
                {
                    val = Server.HtmlEncode(Request.Cookies["userData"]["date"]);
                }
                DateTime date = DateTime.MinValue;
                if (!String.IsNullOrEmpty(val))
                {
                    date = new DateTime(long.Parse(val));
                }

                scheduler = new NailScheduler(Settings.Instance.AvailableTimes, DateTimeHelper.getStartOfCurrentWeek(), Mode.User, date);
                scheduler.CreateNailDate += OnCreateNailDate;

                mainPanel.Controls.Add(scheduler);
                Logger.Instance.LogInfo("page loaded");
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;
            int daysShift = int.Parse(Request.Params["addDays"] ?? "0");

            scheduler = new NailScheduler(Settings.Instance.AvailableTimes, DateTimeHelper.getStartOfCurrentWeek().Date.AddDays(daysShift), Mode.Owner, DateTime.MinValue);
            scheduler.NailDateSelected += OnNailDateSeleted;
            scheduler.ReservDate       += OnReservDatePressed;
            mainPanel.Controls.Add(scheduler);
        }