Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 初始化
            //Login(Request.RawUrl);
            WebForAnalyse.Master.AdminMaster m_master = (WebForAnalyse.Master.AdminMaster) this.Master;
            m_master.PageName = "八字组合设置";
            m_master.SetCate(WebForAnalyse.Master.AdminMaster.CateType.BaZi3);
            #endregion
            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                sysno = int.Parse(Request.QueryString["id"]);
            }
            if (!IsPostBack)
            {
                drpType.DataSource     = AppEnum.GetBaZiLogicType();
                drpType.DataTextField  = "value";
                drpType.DataValueField = "key";
                drpType.DataBind();
                drpType.Items.Insert(0, new ListItem("请选择", "-1"));

                if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
                {
                    PrepareForm();
                }

                int total = 0;
                LogicList = RSH_BaziLogicBll.GetInstance().GetList(1000, 1, "", sysno, ref total);

                DataTable m_dt = new DataTable();
                m_dt.Columns.Add("id");
                for (int i = 0; i < 50; i++)
                {
                    DataRow m_dr = m_dt.NewRow();
                    m_dr["id"] = i;
                    m_dt.Rows.Add(m_dr);
                }
                Repeater1.DataSource = m_dt;
                Repeater1.DataBind();

                //this.ClientScript.RegisterStartupScript(this.GetType(), "", "show(0);", true);
            }
            string jsstr = "";
            for (int i = 0; i <= int.Parse(HiddenField1.Value); i++)
            {
                jsstr += "show(" + i + ");";
            }
            string[] tmpstrs = HiddenField2.Value.Substring(1).Split(new char[] { '|' });
            for (int i = 0; i < tmpstrs.Length; i++)
            {
                jsstr += "convert(" + tmpstrs[i] + ");";
            }
            ScriptManager.RegisterStartupScript(UpdatePanel2, UpdatePanel2.GetType(), "", jsstr, true);
        }