#副標=商務處理流程與整合(4) #大標=商務規則引擎應用 #眉標=BizTalk Server 2006 #作者=文/彭靖灝 ===============box 程式1============= _ Public Class SimpleRuleObject Private _SeedNumber As Integer Public Property SeedNumber() As Integer Get Return _SeedNumber End Get Set(ByVal value As Integer) _SeedNumber = value End Set End Property Private _RiskFactor As Single Public Property RiskFactor() As Single Get Return _RiskFactor End Get Set(ByVal value As Single) _RiskFactor = value End Set End Property Public Sub New(ByVal SeedNumber As Integer) _SeedNumber = SeedNumber _RiskFactor = SeedNumber * 0.15 / 2 End Sub End Class ====================end================== ==============box 程式2=========== objSampleRule=new MySimpleRule.SimpleRuleObject(ProfileMessage.Revenue); =====================end================== ================box 程式3============= objSqlConn.ConnectionString="Data Source=(local);Initial Catalog=MicExercise;Integrated Security=SSPI"; objDataConn= new Microsoft.RuleEngine.DataConnection("MicExercise", "Customers", objSqlConn); =============================end==========================