IEnumerable<MemberCls> lst = objMemberCls.GetMemberList().Filter(rule);
public ActionResult Evaluate(MemberCls patient, RuleModel ruleEditor) { ruleEditor.BindSource(typeof(MemberCls)); ruleEditor.SkipNameValidation = true; ViewBag.Rule = ruleEditor; if (ruleEditor.IsEmpty() || !ruleEditor.IsValid(StorageService.LoadRuleXml)) { ViewBag.Message = "The rule is empty or invalid"; return View("Index"); } string rule = ruleEditor.GetRuleXml(); Evaluator<membercls> evaluator = new Evaluator<membercls>(rule, StorageService.LoadRuleXml); bool success = true; Patient objPatient = new Patient(); MemberCls objMemberCls = new MemberCls(); if (success) { IEnumerable<membercls> lst = objMemberCls.GetMemberList().Filter(rule); objPatient.lstMember = lst.ToList(); } ViewBag.Rule = RuleModel.Create(typeof(Patient)); if (!string.IsNullOrWhiteSpace(patient.Output)) ViewBag.Message = patient.Output; else ViewBag.Message = "The current rule evaluated to " + success; return View("Index", objPatient); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)