예제 #1
0
    protected void ButtonAppendAllCache_Click(object sender, EventArgs e)
    {
        string strError = "";

        if (String.IsNullOrEmpty(sessioninfo.UserID) == true ||
            StringUtil.IsInList("managecache", sessioninfo.RightsOrigin) == false)
        {
            this.SetErrorInfo("当前用户不具备 managecache 权限,不能增补缓存");
            return;
        }

        // TODO: 检查,防止越界
        string strDataFileName = this.BrowseDataFileName.Value;

        int nRet = CacheBuilder.RefreshAll(app,
                                           strDataFileName,
                                           true,
                                           out strError);

        if (nRet == -1)
        {
            this.SetErrorInfo(strError);
            return;
        }

        this.SetErrorInfo("增补成功。共创建了" + nRet.ToString() + "  个新队列事项");
        return;
    }
예제 #2
0
    protected void ButtonRefreshAllCache_Click(object sender, EventArgs e)
    {
        string strError = "";

        if (String.IsNullOrEmpty(sessioninfo.UserID) == true ||
            StringUtil.IsInList("managecache", sessioninfo.RightsOrigin) == false)
        {
            this.SetErrorInfo("当前用户不具备 managecache 权限,不能刷新缓存");
            return;
        }

        // TODO: 检查,防止越界
        string strDataFileName = this.BrowseDataFileName.Value;

        int nRet = CacheBuilder.RefreshAll(app,
                                           strDataFileName,
                                           false,
                                           out strError);

        if (nRet == -1)
        {
            this.SetErrorInfo(strError);
            return;
        }

        this.SetErrorInfo("刷新成功。共创建了" + nRet.ToString() + "  个新队列事项");

        // app.ClearBrowseNodeCount(strDataFileName, "");

        if (string.IsNullOrEmpty(this.TreeView1.SelectedNodePath) == false)
        {
            this.BrowseSearchResultControl1.ResultSetName     = "";
            this.BrowseSearchResultControl1.ResultsetFilename = "";
            this.BrowseSearchResultControl1.ResultCount       = 0;
            this.BrowseSearchResultControl1.StartIndex        = 0;

            this.TreeView1.SelectedNodePath = "";
            this.SelectingNodePath          = "";
            // this.SelectedNodeCaption = "";
            return;
        }

        return;
    }