Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }
        //if (Request.QueryString["id"] == null) Response.Redirect("../Err/nonePage.aspx");

        //if (Session["power"] == null) Response.Redirect("../Default.aspx");
        //if (!srrshPage.Level2(Session["power"].ToString())) Response.Redirect("../Err/powerNeed.aspx");//没权限

        //setAutoComplete();
        //commonHis ch = new commonHis();
        //ddldept.DataSource = ch.getDeptList("*");
        //ddldept.DataTextField="deptName";
        //ddldept.DataValueField = "deptName";
        //ddldept.DataBind();

        string    sql = "select largeItemRdn,largeItemName,smallItemRdn,smallItemName,sItemValue,sItemType from JCI_generateTable where tableRdn=" + Request.QueryString["id"].Split(',')[0].ToString();
        DataTable dt  = conn.ExcuteSelect(sql);
        MediTable mt  = new MediTable();

        _ddt = dt;
        mt.generator(dt, GridView1);
        IsDynamicLoadControl = true;
    }
Esempio n. 2
0
 protected override void LoadViewState(object savedState)
 {
     base.LoadViewState(savedState);
     if (IsDynamicLoadControl)
     {
         MediTable mt = new MediTable();
         mt.generator(_ddt, GridView1);
     }
 }