Esempio n. 1
0
 /// <summary>
 /// 重写过滤条件生成方法,修改LIKE表达式的行为
 /// </summary>
 /// <returns></returns>
 protected override DevExpress.Data.Filtering.CriteriaOperator GetFiltersCriterion()
 {
     DevExpress.Data.Filtering.CriteriaOperator opertor = base.GetFiltersCriterion();
     resetOperandValue(opertor);
     _Opertor = opertor;
     return(opertor);
 }
 protected override CriteriaOperator ConvertGridFilterToDataFilter(DevExpress.Data.Filtering.CriteriaOperator criteria)
 {
     if (!string.IsNullOrEmpty(FindFilterText))
     {
         FindSearchParserResults lastParserResults = new FindSearchParser().Parse(FindFilterText, GetFindToColumnsCollection());
         CriteriaOperator        findCriteria      = CustomCriteriaHelper.Create(lastParserResults, FilterCondition.Contains, IsServerMode);
         return(criteria & findCriteria);
     }
     return(criteria);
 }
 public void OnFilterChanged(DevExpress.Data.Filtering.CriteriaOperator oper)
 {
     foreach (var item in dictionary)
     {
         item.Value.EditValue = null;
     }
     if (oper != null)
     {
         Recursion(oper);
     }
 }
Esempio n. 4
0
    void IListServer.Apply(DevExpress.Data.Filtering.CriteriaOperator filterCriteria, ICollection <ServerModeOrderDescriptor[]> sortInfo, int groupCount, ICollection <ServerModeSummaryDescriptor> groupSummaryInfo, ICollection <ServerModeSummaryDescriptor> totalSummaryInfo)
    {
        isCountDirty  = true;
        isResultDirty = true;
        isKeysDirty   = true;

        count         = -1;
        startKeyIndex = -1;
        startRowIndex = -1;

        this.query = this.origQuery;

        if (sortInfo != null)
        {
            Boolean first = true;
            IOrderedQueryable <Contact> oq = null;

            foreach (ServerModeOrderDescriptor[] info in sortInfo)
            {
                if (info.Length > 1)
                {
                    throw new NotImplementedException("Multi-grouping is not supported by ASPxGridView");
                }
                String propertyName = (info[0].SortExpression as OperandProperty).PropertyName;

                if (first)
                {
                    if (info[0].IsDesc)
                    {
                        oq = LinqHelper.OrderByDescending <Contact>(this.query, propertyName);
                    }
                    else
                    {
                        oq = LinqHelper.OrderBy <Contact>(this.query, propertyName);
                    }

                    first = false;
                }
                else
                {
                    if (info[0].IsDesc)
                    {
                        oq = LinqHelper.ThenByDescending <Contact>(oq, propertyName);
                    }
                    else
                    {
                        oq = LinqHelper.ThenBy <Contact>(oq, propertyName);
                    }
                }
            }

            this.query = oq.AsQueryable <Contact>();
        }
    }
        public override void CustomShowPreview(
            string reportContainerHandle,
            ReportParametersObjectBase parametersObject,
            DevExpress.Data.Filtering.CriteriaOperator criteria,
            bool canApplyCriteria,
            SortProperty[] sortProperty,
            bool canApplySortProperty,
            ShowViewParameters showViewParameters,
            bool isSinglePage)
        {
            IReportContainer reportContainer = ReportDataProvider.ReportsStorage.GetReportContainerByHandle(reportContainerHandle);

            Guard.ArgumentNotNull(reportContainer, "reportContainer");
            Type dataType = GetReportDataSourceObjectType(reportContainer.Report);

            objectSpace = Application.CreateObjectSpace(dataType);
            DetailView            previewDetailView   = new DetailView((IModelDetailView)Application.Model.Views[ReportsAspNetModuleV2.ReportViewDetailViewWebName], objectSpace, null, Application, false);
            ReportViewerContainer reportViewContainer = new ReportViewerContainer(parametersObject, criteria, canApplyCriteria, sortProperty, canApplySortProperty);

            DevExpress.ExpressApp.ReportsV2.Web.ReportViewerDetailItem reportViewer =
                new DevExpress.ExpressApp.ReportsV2.Web.ReportViewerDetailItem(
                    reportContainerHandle,
                    reportViewContainer,
                    "ReportViewer");
            reportViewer.QueryReport            += this.HandleQueryReportEvent;
            reportViewer.CustomParameterEditors += HandleCustomParameterEditorsEvent;
            previewDetailView.AddItem(reportViewer);
            previewDetailView.Caption = reportContainer.Report.DisplayName;

            if (isSinglePage)
            {
                Namoly.Module.Common.Utility.SinglePageHelper.GenerateSinglePageReport(reportContainer.Report, true, 6);
            }

            PreviewReportDialogController windowController = Application.CreateController <PreviewReportDialogController>();

            windowController.AcceptAction.Active["ReportPreview"] = false;
            if (showViewParameters == null)
            {
                showViewParameters = new ShowViewParameters();
                showViewParameters.Controllers.Add(windowController);
                showViewParameters.CreatedView  = previewDetailView;
                showViewParameters.TargetWindow = TargetWindow.NewWindow;
                Application.ShowViewStrategy.ShowView(showViewParameters, new ShowViewSource(Frame, null));
            }
            else
            {
                showViewParameters.Controllers.Add(windowController);
                showViewParameters.CreatedView  = previewDetailView;
                showViewParameters.TargetWindow = TargetWindow.NewWindow;
            }
        }
        System.Linq.Expressions.Expression <System.Func <XPOIssues.Issues.Issue, bool> > MakeFilterExpression(DevExpress.Data.Filtering.CriteriaOperator filter)
        {
            var converter = new DevExpress.Xpf.Data.GridFilterCriteriaToExpressionConverter <XPOIssues.Issues.Issue>();

            return(converter.Convert(filter));
        }
Esempio n. 7
0
 int IListServer.LocateByExpression(DevExpress.Data.Filtering.CriteriaOperator expression, int startIndex, bool searchUp)
 {
     throw new NotImplementedException();
 }
Esempio n. 8
0
 int IListServer.FindIncremental(DevExpress.Data.Filtering.CriteriaOperator expression, string value, int startIndex, bool searchUp, bool ignoreStartRow, bool allowLoop)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 public void ApplyFilter(object collection, DevExpress.Data.Filtering.CriteriaOperator filter)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public void ApplyCriteria(object collection, DevExpress.Data.Filtering.CriteriaOperator criteria)
 {
     DoIfNHCollection(collection, nhc => nhc.Criteria = criteria);
 }
Esempio n. 11
0
        public int GetObjectsCount(Type objectType, DevExpress.Data.Filtering.CriteriaOperator criteria)
        {
            Guard.ArgumentNotNull(objectType, "objectType");

            return(persistenceManager.GetObjectsCount(objectType.AssemblyQualifiedName, criteria.ToString()));
        }
Esempio n. 12
0
 public object CreateServerCollection(Type objectType, DevExpress.Data.Filtering.CriteriaOperator criteria)
 {
     throw new NotImplementedException();
 }