//加载对象数据
        private void loadObjectData(MB.Util.Model.QueryParameterInfo[] queryParams)
        {
            if (_AsynQueryRule == null)
            {
                throw new MB.Util.APPException("在加载浏览窗口<DefaultViewForm>时 需要配置对应的ClientRule 类!");
            }

            if (!tabCtlMain.SelectedTab.Equals(tPageDynamicGroup))
            {
                //在非动态聚组查询的条件下

                //特殊说明 2009-02-20 在这里需要增加 RefreshLookupDataSource 以便在加载数据ID 时能得到对应的描述信息。
                using (MB.Util.MethodTraceWithTime timeTrack = new MethodTraceWithTime(null)) {
                    using (MB.WinBase.WaitCursor cursor = new MB.WinBase.WaitCursor(this)) {
                        using (AsynLoadDataHelper asynCall = new AsynLoadDataHelper(_AsynQueryRule, this.IsTotalPageDisplayed, _IsQueryAll)) {
                            asynCall.WorkerCompleted += new EventHandler <RunWorkerCompletedEventArgs>(asynCall_WorkerCompleted);
                            asynCall.RunLoad(this, queryParams);
                        }
                    }
                    _ExcuteTime = timeTrack.GetExecutedTimes();
                }
            }
            else
            {
                var dynamicGroupSetting = _DynamicGroupSettings;
                if (dynamicGroupSetting == null)
                {
                    throw new APPException("动态聚组查询,聚组条件不能为空");
                }
                DataSet ds = _AsynQueryRule.GetDynamicGroupQueryData(dynamicGroupSetting, queryParams);
                ucDynamicGroupResultInQuery.BindDynamicResultQueryResult(ds, _AsynQueryRule.ClientLayoutAttribute.UIXmlConfigFile);
            }
        }
        private void exportAllMenuItem_Click(object sender, EventArgs e)
        {
            _AsynQueryRule.CurrentQueryBehavior.PageIndex = 0;
            _AsynQueryRule.CurrentQueryBehavior.PageSize  = Int32.MaxValue;

            using (MB.Util.MethodTraceWithTime timeTrack = new MethodTraceWithTime(null)) {
                using (MB.WinBase.WaitCursor cursor = new MB.WinBase.WaitCursor(this)) {
                    using (AsynLoadDataHelper asynCall = new AsynLoadDataHelper(_AsynQueryRule, this.IsTotalPageDisplayed, _IsQueryAll)) {
                        asynCall.WorkerCompleted += new EventHandler <RunWorkerCompletedEventArgs>(asynCall_WorkerCompleted_ExportAll);
                        asynCall.RunLoad(this, _QueryParamsFromQueryFilterForm);
                    }
                }
                double excuteTime = timeTrack.GetExecutedTimes();
                MB.Util.TraceEx.Write("导出全部使用的时间是 (毫秒): {0}", excuteTime.ToString());
            }
        }
Beispiel #3
0
        //加载对象数据
        private void loadObjectData(MB.Util.Model.QueryParameterInfo[] queryParams)
        {
            if (_AsynQueryRule == null)
            {
                throw new MB.Util.APPException("在加载浏览窗口<DefaultAsynCustomQueryView>时 需要配置对应的ClientRule 类!");
            }

            //特殊说明 2009-02-20 在这里需要增加 RefreshLookupDataSource 以便在加载数据ID 时能得到对应的描述信息。
            using (MB.Util.MethodTraceWithTime timeTrack = new MethodTraceWithTime(null)) {
                using (MB.WinBase.WaitCursor cursor = new MB.WinBase.WaitCursor(this)) {
                    using (AsynLoadDataHelper asynCall = new AsynLoadDataHelper(_AsynQueryRule, this.IsTotalPageDisplayed, _IsQueryAll)) {
                        asynCall.WorkerCompleted += new EventHandler <RunWorkerCompletedEventArgs>(asynCall_WorkerCompleted);
                        asynCall.RunLoad(this, queryParams);
                    }
                }
                _ExcuteTime = timeTrack.GetExecutedTimes();
            }
        }