Ejemplo n.º 1
0
        private void showQueryParamterInput()
        {
            MB.Util.Model.ModuleCommandInfo commandInfo = this._AsynQueryRule.ModuleTreeNodeInfo.Commands.Find
                                                              (o => string.Compare(o.CommandID, MB.BaseFrame.SOD.MODULE_COMMAND_QUERY, true) == 0);

            Form frm = null;

            if (_QueryFilterForm == null)
            {
                if (commandInfo == null)
                {
                    _QueryFilterForm = new MB.WinClientDefault.QueryFilter.FrmQueryFilterInput(false);
                }
                else
                {
                    _QueryFilterForm = MB.WinClientDefault.UICommand.UICreateHelper.Instance.CreateQueryFilterForm(commandInfo);
                }
                _QueryFilterForm.ClientRuleObject = _AsynQueryRule;
                _QueryFilterForm.ViewGridForm     = this;
                _QueryFilterForm.IniCreateFilterElements();
                _QueryFilterForm.AfterInputQueryParameter += new QueryFilterInputEventHandle(filterForm_AfterInputQueryParameter);
            }


            frm      = _QueryFilterForm as Form;
            frm.Text = this.Text;
            frm.ShowDialog(this);
        }
Ejemplo n.º 2
0
        private void showQueryParamterInput()
        {
            MB.Util.Model.ModuleCommandInfo commandInfo = this._ClientRuleObject.ModuleTreeNodeInfo.Commands.Find
                                                              (o => string.Compare(o.CommandID, MB.BaseFrame.SOD.MODULE_COMMAND_QUERY, true) == 0);

            Form frm = null;


            if (_QueryFilterForm == null)
            {
                if (commandInfo == null)
                {
                    _QueryFilterForm = new MB.WinClientDefault.QueryFilter.FrmQueryFilterInput();
                }
                else
                {
                    _QueryFilterForm = MB.WinClientDefault.UICommand.UICreateHelper.Instance.CreateQueryFilterForm(commandInfo);
                }
                _QueryFilterForm.ClientRuleObject = ClientRuleObject;
                _QueryFilterForm.ViewGridForm     = this;
                _QueryFilterForm.IniCreateFilterElements();
                _QueryFilterForm.AfterInputQueryParameter += new QueryFilterInputEventHandle(filterForm_AfterInputQueryParameter);
            }

            #region 如果是动态聚组的查询,先要判断是否设置了动态聚组条件,如果没有,强制设置
            if (this._IsDynamicGroupIsActive)
            {
                if (_DynamicGroupSettings == null)
                {
                    if (_DynamicGroupSettingUI == null)
                    {
                        _DynamicGroupSettingUI = new FrmDynamicGroupSetting(this, _ClientRuleObject);
                    }
                    _DynamicGroupSettings = _DynamicGroupSettingUI.GetDynamicGroupSetting();
                }
                Util.Model.DynamicGroupSetting dySetting = _DynamicGroupSettings;
                if (dySetting == null || dySetting.DataAreaFields == null || dySetting.DataAreaFields.Count <= 0)
                {
                    MB.WinBase.MessageBoxEx.Show("没有设置聚组列和条件,请设置");
                    if (_DynamicGroupSettingUI == null)
                    {
                        _DynamicGroupSettingUI = new FrmDynamicGroupSetting(this, _ClientRuleObject, _QueryFilterForm);
                    }
                    if (_DynamicGroupSettingUI.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                    {
                        return;
                    }
                }
            }
            #endregion

            frm      = _QueryFilterForm as Form;
            frm.Text = this.Text;
            frm.ShowDialog();
        }
Ejemplo n.º 3
0
        /// <summary>
        ///  创建查询过滤处理接口。
        /// </summary>
        /// <param name="commandInfo"></param>
        /// <returns></returns>
        public MB.WinBase.IFace.IQueryFilterForm CreateQueryFilterForm(MB.Util.Model.ModuleCommandInfo commandInfo)
        {
            string[] formSetting    = commandInfo.UIView.Split(',');
            object[] formCreatePars = null;

            Form winForm = MB.Util.DllFactory.Instance.LoadObject(formSetting[0], formCreatePars, formSetting[1]) as Form;

            MB.Util.TraceEx.WriteIf(winForm != null, string.Format("请检查数据库中该功能模块对应的显示窗口{0},是否设置出错!", commandInfo.UIView), MB.Util.APPMessageType.SysErrInfo);
            MB.WinBase.IFace.IQueryFilterForm filterForm = winForm as MB.WinBase.IFace.IQueryFilterForm;
            if (filterForm == null)
            {
                throw new MB.Util.APPException("所有查询过滤的窗口必须实现 MB.WinBase.IFace.IQueryFilterForm 接口!", MB.Util.APPMessageType.SysFileInfo);
            }
            return(filterForm);
        }