private void DisplayRules() { ValueListField valueListField = _customModel.NAMECODE; DisplayRule(ref valueListField); valueListField = _customModel.SIMILARADDRESSCODE; DisplayRule(ref valueListField); valueListField = _customModel.UNSIMILARADDRESSCODE; DisplayRule(ref valueListField); valueListField = _customModel.NEWADDRESSPRIMARYCODE; DisplayRule(ref valueListField); valueListField = _customModel.DIFFERENTPHONECODE; DisplayRule(ref valueListField); valueListField = _customModel.NEWPHONEPRIMARYCODE; DisplayRule(ref valueListField); valueListField = _customModel.DIFFERENTEMAILCODE; DisplayRule(ref valueListField); valueListField = _customModel.NEWEMAILPRIMARYCODE; DisplayRule(ref valueListField); }
private static void DisplayRule(ref ValueListField field) { System.Collections.IEnumerator enumerator = field.DataSourceBase.GetEnumerator(); try { while (enumerator.MoveNext()) { object objectValue = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(enumerator.Current); ValueListItem valueListItem = objectValue as ValueListItem; valueListItem.Visible = Operators.ConditionalCompareObjectEqual(field.ValueObject, valueListItem.ValueObject, false); } } finally { if (enumerator is System.IDisposable) { (enumerator as System.IDisposable).Dispose(); } } }
public ExchangeRateRefreshProcessAddEditHandler(ExchangeRateRefreshProcessAddEditHandlerArgs args) { if (args == null) { throw new ArgumentNullException("args"); } if (args.DateCode == null) { throw new ArgumentException("You must provide a date code field."); } if (args.HistoricalDate == null) { throw new ArgumentException("You must provide a historical date field."); } _dateCode = args.DateCode; _historicalDate = args.HistoricalDate; _dateCode.ValueChanged += _dateCode_ValueChanged; }