zoukankan      html  css  js  c++  java
  • XAF 中如何存储筛选条件

    代码
    using System;
    using System.Collections.Generic;
    using System.Text;
    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.SystemModule;
    using DevExpress.ExpressApp.Actions;

    namespace Solution1.Module {
        
    public class FilterControllerExtender : Controller {
            
    protected override void OnFrameAssigned() {
                
    base.OnFrameAssigned();
                Frame.GetController
    <FilterController>().FullTextFilterAction.Executed += new EventHandler<DevExpress.ExpressApp.Actions.ActionBaseEventArgs>(FullTextFilterAction_Executed);
                Frame.GetController
    <FilterController>().Activated += new EventHandler(FilterControllerExtender_Activated);
            }

            
    void FilterControllerExtender_Activated(object sender, EventArgs e) {
                
    string currentValue = Frame.GetController<FilterController>().FullTextFilterAction.Value as string;
                Frame.GetController
    <FilterController>().FullTextFilterAction.DoExecute(
                    Frame.View.Info.GetAttributeValue(
    "FilterByText_CurrentFilter", currentValue));
            }

            
    void FullTextFilterAction_Executed(object sender, DevExpress.ExpressApp.Actions.ActionBaseEventArgs e) {
                
    string currentValue = ((ParametrizedAction)e.Action).Value as string;
                
    if(Frame.View != null) {
                    Frame.View.Info.SetAttribute(
    "FilterByText_CurrentFilter", currentValue);
                }
            }
        }
    }

    欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/

  • 相关阅读:
    Linux ps 命令获取查询结果中的单列信息
    nowcoder(牛客网)普及组模拟赛第一场 解题报告
    Subway Pursuit (二分)(交互题)
    nowcoder(牛客网)OI测试赛2 解题报告
    NOIP提高组题目归类+题解摘要(2008-2017)
    CYJian的水题大赛2 解题报告
    数独问题
    题解 UVA11300 【Spreading the Wealth】
    实验吧web题:
    简单的sql语句
  • 原文地址:https://www.cnblogs.com/Tonyyang/p/1625265.html
Copyright © 2011-2022 走看看