protected void Next_OnClick(object sender, EventArgs e) { int currentPage = int.Parse(Session["CurrentPage"].ToString()); _surveysListResult = SearchFeedback(currentPage + 1); if (_surveysListResult.Items.Any()) { Session["CurrentPage"] = currentPage + 1; RptFeedback.DataSource = _surveysListResult.Items; RptFeedback.DataBind(); } }
protected void Page_Init(object sender, EventArgs e) { Session["Active"] = "CustomerInsight"; IsAdmin = PublicCustomerInfos != null && PublicCustomerInfos.IsSuperAdmin; if (!IsPostBack) { SelectedFilterBy.Text = SelectedFilterDdl.Text; Session["CurrentPage"] = 1; _surveysListResult = _surveyRepository.SearchSurveys(PublicHotel.HotelId, null, null); RptFeedback.DataSource = _surveysListResult.Items; RptFeedback.DataBind(); } }
protected void Search_OnClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(DateFrom.Text) || string.IsNullOrEmpty(DateTo.Text)) { ErrorMessageLabel.Text = "Please enter From and To date."; return; } DateTime startDate; DateTime endDate; DateTime.TryParseExact(DateFrom.Text, "MM/dd/yyyy", null, DateTimeStyles.None, out startDate); DateTime.TryParseExact(DateTo.Text, "MM/dd/yyyy", null, DateTimeStyles.None, out endDate); _surveysListResult = _surveyRepository.SearchSurveys(PublicHotel.HotelId, startDate, endDate); Session["CurrentPage"] = 1; RptFeedback.DataSource = _surveysListResult.Items; RptFeedback.DataBind(); }
protected void BindFeedback(ListResult <Surveys> surveys) { RptFeedback.DataSource = surveys.Items; RptFeedback.DataBind(); }