Beispiel #1
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        recid = NetReusables.TimeId.GetCurrentMilliseconds().ToString();

        LoadScript("");
        keyWordValue = Request.QueryString["key"];

        // 通过参数关键字获取对象
        SysSettings sys = Common.GetSysSettingsByENKey(keyWordValue);

        oUserInfo = CurrentUser;
        if (sys != null)
        {
            ResID = sys.ResID.ToString();
            if (sys.FilterCondtion != "" && sys.FilterCondtion != null)
            {
                UserDefinedSql = Server.UrlEncode(sys.FilterCondtion);
            }
            if (Request.QueryString["SearchType"] != null)
            {
                SearchType = Request.QueryString["SearchType"].ToString();
            }
            if (Request.QueryString["NodeID"] != null)
            {
                NodeID = Request.QueryString["NodeID"].ToString();
            }
            if (Request.QueryString["MenuResID"] != null)
            {
                MenuResID = Request.QueryString["MenuResID"].ToString();
            }

            if (Request.QueryString["ParentResID"] != null)
            {
                ParentResID = Request.QueryString["ParentResID"].ToString();
            }
            if (Request.QueryString["ParentRecID"] != null)
            {
                ParentRecID = Request.QueryString["ParentRecID"].ToString();
            }
        }
        WebServices.Services Resource = new WebServices.Services();


        DataTable dt = new DataTable();

        if (CurrentUser.DepartmentName.Trim() == CommonProperty.ManageDepartmentName.Trim())
        {
            dt = Resource.GetAllPortalChildResourceList(keyWordValue);
        }
        else
        {
            dt = Resource.GetPortalChildResourceList(CurrentUser.ID, keyWordValue);
        }
        if (dt.Rows.Count == 0)
        {
            IsChild = false;
        }
        RepTabList.DataSource = dt;
        RepTabList.DataBind();
    }