很多朋友对XAF没有信心,认为他不能实现一些复杂的功能,我首先展示一些我用XAF所实现的,给大家在考虑是否要选择XAF做个参考。
转载请注明出处:http://my.csdn.net/liushitang
首先这个审批流必须实现[会计]、[知会]、[审批]、[加收]、[回退]等功能。 必须按照单据上的所有字段进行设置审批条件。如多少金额必须由谁审批。
必须方便别的单据进行调用。
如下图所示,用户在单据上点审批,就可以弹出一个审批对话框,在这个对话框中,用户选择审批的结果。并且在对话框中显示审批记录,以及该单据的审批流。
调用的话很简单,只需要在类中实现接口IApproval就行。无需多的代码。
public class BorrowVoucher : ZeroVouchBaseObject, IApproval
{
private int _AutoId;
[Key(true),DevExpress.Xpo.DisplayName("自动编码"), Index(0)]
public int AutoId
{
get { return _AutoId;}
set { SetPropertyValue("AutoId", ref _AutoId, value); }
}
private BorrowType _BorrowType;
[DevExpress.Xpo.DisplayName("借款类型"), Index(3)]
[RuleRequiredField("NoNull On BorrowVoucher.BorrowType", DefaultContexts.Save)]
public BorrowType BorrowType
{
get { return _BorrowType; }
set { SetPropertyValue("BorrowType", ref _BorrowType, value); }
}
....
}