예제 #1
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();
        }
예제 #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="setting"></param>
 public DynamicGroupBuilder(Util.Model.DynamicGroupSetting setting)
 {
     _DynamicGroupSettings = setting;
 }