/// <summary> /// Look up State and set the state name /// </summary> /// <param name="context">Rule context object.</param> protected override void Execute(RuleContext context) { var stateId = (string)context.InputPropertyValues[PrimaryProperty]; var state = StatesNVL.GetNameValueList().Where(p => p.Key == stateId).FirstOrDefault(); context.AddOutValue(StateName, state == null ? "Unknown state" : state.Value); }
public Form1() { InitializeComponent(); var root = Root.NewEditableRoot(); statesNVLBindingSource.DataSource = StatesNVL.GetNameValueList(); countryNVLBindingSource.DataSource = CountryNVL.GetNameValueList(); rootBindingSource.DataSource = root; }