Пример #1
0
 protected override void setFeedback()
 {
     base.setFeedback();
     CheckInOutFilterModel.SetFeedback();
     FilterModel.SetFeedback();
     DateRangeModel.SetFeedback();
 }
Пример #2
0
        public override void Initialise(Page p)
        {
            base.Initialise(p);
            bool dateSet = false;

            UpdateStatistic(ReportStatistics.ReportName.PoolingReservations);
            if (p.Request.Params["__EVENTTARGET"] == Textboxpostbackname)
            {
                UpdateView();
            }
            if (!String.IsNullOrEmpty(p.Session["ResFilterDropDownValue"] as string))
            {
                _resTopicFilterService.SetTopic((p.Session["ResFilterDropDownValue"] as string));
                var resDataClicked = new DateTime(long.Parse(p.Session["ResDateClicked"].ToString()));
                p.Session["ResFilterDropDownValue"] = null;
                p.Session["ResDateClicked"]         = null;
                DateRangeModel.StartDateModel.Text  = resDataClicked.ToShortDateString();
                DateRangeModel.EndDateModel.Text    = resDataClicked.ToShortDateString();
                dateSet = true;
            }

            if (p.IsPostBack)
            {
                return;
            }
            Modal.Visible = false;
            CheckInOutFilterModel.FirstItem = "";
            CheckInOutFilterModel.bind();
            FilterModel.bind();
            FilterModel.FilterDropDownList.Items.RemoveAt(0);
            PagerMaxModel.bind();
            if (ComparisonTopicSelected != string.Empty)
            {
                FilterModel.SelectedValue = ComparisonTopicSelected;
                ComparisonTopicSelected   = null;
            }
            HeadingModel.setText(Enums.Headers.reservationDetails);

            int timeSlot;

            int.TryParse(p.Request.Params["q1"], out timeSlot);
            DateTime lastRequestDate;

            if (!DateTime.TryParse(p.Request.Params["q3"], out lastRequestDate))
            {
                lastRequestDate = DateTime.Now;
            }
            Enums.DayActualTime dayActualTime;
            Enum.TryParse(p.Request.Params["q4"], out dayActualTime);

            if (!dateSet)
            {
                SetStartAndEndDate(lastRequestDate, timeSlot, dayActualTime);
            }


            GetSession();
            UpdateView();
        }