示例#1
0
        void button_Click(object sender, EventArgs e)
        {
            HiddenField value = (HiddenField)this.FindControl("selected-data");

            if (this.TreeItemClick != null)
            {
                TreeItemClickEventArgs e1 = new TreeItemClickEventArgs();
                e1.Url = value.Value;
                this.TreeItemClick(this, e1);
            }
        }
示例#2
0
        void button_Click(object sender, EventArgs e)
        {
            HiddenField value = (HiddenField)this.FindControl("selected-data");

            if (this.TreeItemClick != null)
            {
                TreeItemClickEventArgs e1 = new TreeItemClickEventArgs();
                e1.Url = value.Value;
                this.TreeItemClick(this, e1);
            }
        }
示例#3
0
    protected void TreeView1_TreeItemClick(object sender, TreeItemClickEventArgs e)
    {
        string strDate = e.Url;

        string strError = "";
        if (string.IsNullOrEmpty(strDate) == false)
        {
            int nRet = GetResult(strDate,
                false,
                out strError);
            if (nRet == -1)
                goto ERROR1;
        }
        return;
    ERROR1:
        this.Page.Response.Write(HttpUtility.HtmlEncode(strError));
        this.Page.Response.End();
        return;

    }
示例#4
0
    // 观看二级节点的其他片断
    protected void filter_TreeItemClick(object sender, TreeItemClickEventArgs e)
    {
        string strError = "";
        string strResultsetName = this.filter.ResultSetName;
        FilterTask t = app.FindFilterTask(strResultsetName);    // Task对象是利用Session内结果集名来进行管理的
        if (t == null)
        {
            strError = "结果集名 '" + strResultsetName + "' 没有找到对应的任务对象";
            goto ERROR1;
        }
        if (t.TaskState == TaskState.Processing)
        {
            strError = "任务对象 '" + strResultsetName + "' 正在创建过程中,请稍后再访问";
            goto ERROR1;
        }

        string strParameters = this.filter.SelectedNodePath;
        string[] parameters = strParameters.Split(new char[] { ',' });
        string strNode = "";
        int nStart = 0;
        if (parameters.Length >= 1)
            strNode = parameters[0];
        if (parameters.Length >= 2)
            Int32.TryParse(parameters[1], out nStart);

        int nRet = ResultsetFilter.SwitchPage(ref t.ResultItems,
            strNode,
            nStart,
            out strError);
        if (nRet == -1)
            goto ERROR1;

        // 确保上一级被选定。但此时和右边的 browselist 内容就不对应了
        this.filter.SelectedNodePath = GetParentResultsetName(this.filter.SelectedNodePath) + "/nav";
        return;
    ERROR1:
        Response.Write(HttpUtility.HtmlEncode(strError));
        Response.End();
    }