Click here to Skip to main content
11,639,765 members (59,888 online)
Click here to Skip to main content
Add your own
alternative version

Custom Rule Engine in WPF - MVVM

, 11 Sep 2010 CPOL 38.4K 999 92
Custom Rule Engine approach which can evaluate complex combinations of business rules. A sample application is provided in WPF following the MVVM pattern.
-----------------------------------------------------------------Stored Procedure----------------------------------------------------------------------------------
CREATE PROCEDURE dbo.SelectRules
@screenID INT
AS
	SELECT        CD.ScreenID, CD.ResultText, R.CodeLHS, R.Operator, R.ValueRHS, R.Source,RGR.RuleGroupID, RGR.RuleJoinOperator, RGR.RuleSeqNum, RGGR.RuleGroupJoinOperator, 
                         RGGR.RuleGroupSeqNum, R.RuleDescription
FROM            CountryDetails AS CD INNER JOIN
                         RulesGroupGroupingRelations AS RGGR ON CD.RuleGroupGroupingID = RGGR.RuleGroupGroupingID INNER JOIN
                         RulesGroupRelations AS RGR ON RGGR.RuleGroupID = RGR.RuleGroupID INNER JOIN
                         Rules AS R ON R.RuleID = RGR.RuleID WHERE CD.ScreenID = @screenID 
ORDER BY RGGR.RuleGroupGroupingID, RGGR.RuleGroupSeqNum, RGR.RuleGroupID, RGR.RuleSeqNum 

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Renil Joy, Bangalore
Software Developer (Senior) CA-CIB
Singapore Singapore
I am a .Net developer, currently working in Singapore worked wiith Societe Generale Global Solution Centre, Bangalore and was previously with Cognizant.I have more than 8 years of .Net experience in BFSI domain. I am an experienced developer in C#, VB.Net, Silverlight, WPF, WCF, LINQ, Entity Framework, SSIS, NHibernate, ASP.Net and SQL Server.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150731.1 | Last Updated 12 Sep 2010
Article Copyright 2010 by Renil Joy, Bangalore
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid