Пример #1
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFunc", "Setsize()", true);
            int       fellowshipID = Convert.ToInt32(dpFellowship.SelectedValue);
            DataTable dt           = CobcYouthDAL.GetSpiritGrowPlan(fellowshipID);

            GridViewPlan.DataSource = dt;
            GridViewPlan.DataBind();
        }
Пример #2
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            if (!ClientScript.IsStartupScriptRegistered("JsFunc_Setsize"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFunc_Setsize", "Setsize();", true);
            }
            int       fellowshipID = Convert.ToInt32(dpFellowship.SelectedValue);
            DataTable dt           = CobcYouthDAL.GetSpiritGrowPlan(fellowshipID);

            GridViewPlan.DataSource = dt;
            GridViewPlan.DataBind();
            Session["Test_dtmember"] = dt;
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CheckLogin();

            if (!ClientScript.IsStartupScriptRegistered("JsFunc_DefaultSize"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFunc_DefaultSize", "DefaultSize();", true);
            }

            if (!IsPostBack)
            {
                if (Request.UrlReferrer != null)
                {
                    var uri = new Uri(Request.UrlReferrer.ToString());
                    prevPage = uri.GetLeftPart(UriPartial.Path);
                }

                if (Session["Test_dtmember"] != null && prevPage.Contains("/Master/SingleMember.aspx"))
                {
                    if (!ClientScript.IsStartupScriptRegistered("JsFunc_Setsize"))
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFunc_Setsize", "Setsize();", true);
                    }

                    GridViewPlan.DataSource = (DataTable)Session["Test_dtmember"];
                    GridViewPlan.DataBind();
                }

                //Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFun", "DefaultSize()", true);
                DataTable dtFellowship = CobcYouthDAL.GetFellowship();
                dpFellowship.DataSource = dtFellowship;
                dtFellowship.Rows.Add(0, "全部團契");
                dtFellowship.DefaultView.Sort = "FellowshipID";
                dpFellowship.DataValueField   = "FellowshipID";
                dpFellowship.DataTextField    = "name";
                dpFellowship.DataBind();
            }
        }