Example #1
0
        private void FrmQueryFilterInput_Load(object sender, EventArgs e)
        {
            if (!_IsPageSettingPanelVisiable)
            {
                mpanFilterTop.Visible = false;
            }

            //add by aifang
            if (string.IsNullOrEmpty(_DataFilterElementsName))
            {
                _DataFilterElementsName = DATA_FILTER_MAIN_CFG_NAME;
            }
            _DataElementCfgs = MB.WinBase.LayoutXmlConfigHelper.Instance.GetDataFilterCfgElements(_ClientRuleObject.ClientLayoutAttribute.UIXmlConfigFile, _DataFilterElementsName);
            if (_DataElementCfgs == null || _DataElementCfgs.Count == 0)
            {
                throw new MB.Util.APPException("该对象在对应的XML配置文件中没有配置查询项!", MB.Util.APPMessageType.DisplayToUser);
            }

            _Columns = _ClientRuleObject.UIRuleXmlConfigInfo.GetDefaultColumns();

            #region 设置过滤框的长度与宽度
            if (_DataElementCfgs.Width > 0)
            {
                this.Width = _DataElementCfgs.Width;
            }
            if (_DataElementCfgs.Height > 0)
            {
                this.Height = _DataElementCfgs.Height;
            }
            #endregion

            //增加判断,如果主窗口中的不是GridView,则不加载高级查询
            var gridControl = _ViewGridForm.GetCurrentMainGridView(true) as DevExpress.XtraGrid.GridControl;
            if (gridControl != null)
            {
                tPageAdvanceFilter.PageVisible = true;
                showAdvanceFilter();
            }
            else
            {
                tPageAdvanceFilter.PageVisible = false;
            }

            //判断大数据查询是否被激活
            IViewGridFormWithGreatData viewWithGreatData = _ViewGridForm as IViewGridFormWithGreatData;
            this.cbQueryAll.Visible = (viewWithGreatData != null && _DataElementCfgs.AllowQueryAll);
            this.cbQueryAll.Checked = false;


            bool isDynamicGroupEnabled = false;
            IViewDynamicGroupGridForm dynamicGroupView = _ViewGridForm as IViewDynamicGroupGridForm;
            if (dynamicGroupView != null)
            {
                isDynamicGroupEnabled = dynamicGroupView.IsDynamicGroupIsActive;
            }

            this.lnkDynamaicSetting.Visible = (_ClientRuleObject.ClientLayoutAttribute.LoadType == ClientDataLoadType.ReLoad && !isDynamicGroupEnabled);
            this.cbShowTotalPage.Visible    = !isDynamicGroupEnabled;
            this.cbQueryAll.Visible         = !isDynamicGroupEnabled;
        }
Example #2
0
        /// <summary>
        /// 大数据查询激活勾选框
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cbQueryAll_CheckedChanged(object sender, EventArgs e)
        {
            if (cbQueryAll.Checked)
            {
                cbShowTotalPage.Checked = false;
            }
            cbShowTotalPage.Enabled = !cbQueryAll.Checked;
            nubMaxShotCount.Enabled = !cbQueryAll.Checked;
            IViewGridFormWithGreatData viewWithGreatData = _ViewGridForm as IViewGridFormWithGreatData;

            if (viewWithGreatData != null)
            {
                viewWithGreatData.IsQueryAll = cbQueryAll.Checked;
            }
        }