コード例 #1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Request.QueryString["todate"]) || string.IsNullOrEmpty(Request.QueryString["fromdate"]))
            {
                Response.Redirect("Participants.aspx?fromdate=" + DateTime.Now.ToShortDateString() + "&todate=" + DateTime.Now.AddMonths(6).ToShortDateString());
            }

            if (string.IsNullOrEmpty(TextBoxToDate.Text))
            {
                ToDateTime = DateTime.Parse(Request.QueryString["todate"]);
            }
            if (string.IsNullOrEmpty(TextBoxFromDate.Text))
            {
                FromDateTime = DateTime.Parse(Request.QueryString["fromdate"]);
            }

            if (string.IsNullOrEmpty(PagingPage.Text))
            {
                PagingPage.Text = "1";
                PagingPage.DataBind();
            }

            PopulateParticipants();

            FormFieldsCheckBoxList.DataSource = FieldsList;
            FormFieldsCheckBoxList.DataBind();
        }
コード例 #2
0
        protected void PagingNext_OnClick(object sender, EventArgs e)
        {
            int i = GetIntSafe(PagingPage.Text);

            if ((double)i < (double)ParticipantsList.Count / double.Parse(PagingPrPaging.SelectedValue))
            {
                i = (i + 1);
            }
            PagingPage.Text = i.ToString();
            PagingPage.DataBind();
            SetupPreviewPropertyControl(ParticipantsList, i, int.Parse(PagingPrPaging.SelectedValue), true);
        }