[原] XAF 如何基于业务规则禁用属性
How to: Disable Property Editors Based on a Business Rule
// Developer Express Code Central Example:
// How to: Disable Property Editors Based on a Business Rule
//
// This example demonstrates how to hide and disable property editors via the
// Conditional Appearance module (the obsolete Conditional Editor State module is
// used in versions prior to 11.2). The complete description is available in the
// How to: Disable Property Editors Based on a Business Rule
// (ms-help://DevExpress.Xaf/CustomDocument3221.htm) help topic.
//
// You can find sample updates and versions for different programming languages here:
// http://www.devexpress.com/example=E1672 using System;
using System.ComponentModel;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using DevExpress.ExpressApp.ConditionalAppearance;
using DevExpress.ExpressApp.Editors; namespace EditorStateExample.Module {
[DefaultClassOptions]
[ImageName("BO_Person")]
public class Contact : BaseObject {
public Contact(Session session) : base(session) { }
public string Name {
get { return GetPropertyValue<string>("Name"); }
set { SetPropertyValue<string>("Name", value); }
}
[ImmediatePostData]
public bool IsMarried {
get { return GetPropertyValue<bool>("IsMarried"); }
set { SetPropertyValue<bool>("IsMarried", value); }
}
[Appearance("Single", Visibility = ViewItemVisibility.Hide, Criteria = "!IsMarried", Context="DetailView")]
public string SpouseName {
get { return GetPropertyValue<string>("SpouseName"); }
set { SetPropertyValue<string>("SpouseName", value); }
}
[ImmediatePostData]
public string Address1 {
get { return GetPropertyValue<string>("Address1"); }
set { SetPropertyValue<string>("Address1", value); }
}
[Appearance("AddressOneIsEmpty", Enabled = false, Criteria = "IsNullOrEmpty(Address1)")]
public string Address2 {
get { return GetPropertyValue<string>("Address2"); }
set { SetPropertyValue<string>("Address2", value); }
}
}
}
[原] XAF 如何基于业务规则禁用属性的更多相关文章
- XAF 如何基于业务规则禁用属性
// Developer Express Code Central Example: // How to: Disable Property Editors Based on a Business R ...
- 基于RulesEngine的业务规则实现
规则引擎由推理引擎发展而来,是一种嵌入在应用程序中的组件,实现了将业务决策从应用程序代码中分离出来,并使用预定义的语义模块编写业务决策.接受数据输入,解释业务规则,并根据业务规则做出业务决策.比较常见 ...
- 【java规则引擎】一个基于drools规则引擎实现的数学计算例子
最近在研究JBPM工作流引擎,发现JBPM是基于Drools的,官方文档查看得知Drools是一款规则引擎.兴趣之下,仔细了解了下 Drools,Drools作为JBoss出品的一款开源推理和规则引擎 ...
- SpringBoot2 整合 Drools规则引擎,实现高效的业务规则
本文源码:GitHub·点这里 || GitEE·点这里 一.Drools引擎简介 1.基础简介 Drools是一个基于java的规则引擎,开源的,可以将复杂多变的规则从硬编码中解放出来,以规则脚本的 ...
- (十五)整合 Drools规则引擎,实现高效的业务规则
整合 Drools规则引擎,实现高效的业务规则 1.Drools引擎简介 1.1 规则语法 2.SpringBoot整合Drools 2.1 项目结构 2.2 核心依赖 2.3 配置文件 3.演示案例 ...
- BizTalk动手实验(九)业务规则引擎使用
1 课程简介 通过本课程熟悉业务规则引擎(BRE)的使用(本环境为Windows 2008 32位操作系统环境 + Visual Studio 2010 + BizTalk 210) 2 准备工作 1 ...
- Asp.net 面向接口可扩展框架之业务规则引擎扩展组件
随着面向接口可扩展框架的继续开发,有些功能开发出现了"瓶颈",有太多的东西要写死才好做.但写死的代码扩展性是非常的不好,迷茫中寻找出入... 进而想到我以前开发的好几个项目,都已有 ...
- 基于NXBRE规则引擎实现的柔性折扣策略
规则引擎由推理引擎发展而来,是一种嵌入在应用程序中的组件,实现了将业务决策从应用程序代码中分离出来,并使用预定义的语义模块编写业务决策.接受数据输入,解释业务规则,并根据业务规则做出业务决策.应用背景 ...
- C语言实现基于投票规则的细胞自动机
算法介绍 首先我们先看一下“基于投票规则的细胞自动机”的定义: 基于投票规则的细胞自动机,实际上是具有如下限定条件的一种细胞自动机: 状态:0或1: 邻居:中心的3*3邻居: 规则:计数p表示中心的3 ...
随机推荐
- C#通过安全证书生成签名和验签辅助类
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net ...
- SqlDataReader的使用
1.建立数据库连接: 2.设置数据库指令: 3.数据拾取器接收输出的数据: 4.遍历打印数据: using System; using System.Collections.Generic; usin ...
- DescriptionResourcePathLocationType Dynamic Web Module 3.0 requires Java
先保证ide的所有jdk都在1.6及以上,如果还是错就试试下面的 在<build></build>中添加 <plugins> <plugin> < ...
- 解决阿里云数据库RDS报错The table '/home/mysql/data3015/tmp/#sql_13975_23' is full
查询任何一条语句都显示 The table '/home/mysql/data3015/tmp/#sql_13975_23' is full 查看了下数据库利用磁盘空间没有满, 阿里云的处理方式: 1 ...
- SVD++:推荐系统的基于矩阵分解的协同过滤算法的提高
1.背景知识 在讲SVD++之前,我还是想先回到基于物品相似的协同过滤算法.这个算法基本思想是找出一个用户有过正反馈的物品的相似的物品来给其作为推荐.其公式为:
- Apache(ApacheHaus)安装配置教程
1,Apache下载 选择一个版本,点击Download 点击File For Microsoft Windows 由于Apache HTTP Server官方不提供二进制(可执行)的发行版,所以我们 ...
- 在django中使用自定义标签实现分页功能
效果演示: github地址:https://github.com/mncu/django_projects/tree/master/django_projects/pagination_test 本 ...
- 为图片添加九宫格信息-UI界面编辑器(SkinStudio)教程
1.1. 为图片添加九宫格信息 在UI编辑器中添加一张图片 使用Photoshop打开这张图片 放大这张图片,使用切片工具,选取LeftTop(左上角固定不变的位置) 双击切片,找到尺寸信息 将尺 ...
- python计算机视觉——黑板客老师课程学习
机器学习的一个应用方向,是如何让机器去理解图像.包括对图像里物体的识别,跟踪和测量. 能做什么——无人驾驶汽车.人脸识别.车牌识别手势识别(游戏方向) PIL静态的库 OpenCV 动态的库 impo ...
- C#中dataGridView用法集
SqlConnection conn = new SqlConnection('Server=(local);DataBase=test;User=sa;Pwd=sa'); SqlDataAdapte ...