示例#1
0
    protected void BindBPMDataList(int page = 0)
    {
        string user      = GetEmployee().LoginId;
        string proName   = tbxTitle.Text.ToString().Trim();
        string startTime = tbxBeginTime.Value.ToString().Trim();
        string endTime   = tbxEndTime.Value.ToString().Trim();

        int    count     = 0;
        string sourceBPM = "BPM";

        if (page != 0)
        {
            this.AspNetPager2.CurrentPageIndex = page;
        }

        if (user.Contains("\\"))
        {
            int beginIndex = user.LastIndexOf("\\");
            user = user.Substring(beginIndex + 1, user.Length - beginIndex - 1);
        }
        System.Diagnostics.Stopwatch w = new System.Diagnostics.Stopwatch();
        w.Start();
        DataTable dt = BPMHelp.GetArchiveList_bpm(user, sourceBPM, this.AspNetPager2.CurrentPageIndex, this.AspNetPager2.PageSize, proName, startTime, endTime, out count);

        //count = BPMHelp.GetArchiveCount(user, sourceBPM, proName, startTime, endTime);
        w.Stop();
        Trace.Write(w.Elapsed.ToString());
        LoggerR.logger.DebugFormat("1:{0}", w.Elapsed.ToString());
        this.AspNetPager2.RecordCount = count;
        lblBPMList.DataSource         = dt;
        lblBPMList.DataBind();
    }