using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; using System.Windows.Media; namespace UIComposition.Views.SpinningReserveCasesView { class DuplicateAreaConverter:IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) return Binding.DoNothing; try { string d = value.ToString(); if (d == "RTO-R|RTO-SR") { d = "false"; // Here I want to modify the associated or current record. //decimal currentUnit = SpinningReserveDislpayHelper._units[1].UnitID.Value; // Now, send back or refresh the record so the view sees the change. // I may need to create a new record here to split duplicates. } else { d = "true"; } return d; } catch {return Binding.DoNothing;} } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return Binding.DoNothing; } #endregion } }