protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();

            View.Items.Where(i => i.Control is MRUEdit).ToList().ForEach(i =>
            {
                XafDataView xpDataView = ObjectSpace.CreateDataView(i.ObjectType, i.Id, null, null) as XafDataView;
                if (xpDataView != null)
                {
                    ((MRUEdit)i.Control).Properties.Items.AddRange(xpDataView.Cast <XpoDataViewRecord>().Where(r => r[i.Id] != null && !string.IsNullOrWhiteSpace(r[i.Id].ToString())).Select(r => r[i.Id]).Distinct().ToList());
                }
            });
        }
示例#2
0
 public NHDataViewRecord(XafDataView dataView, object obj)
     : base(dataView, null)
 {
     this.obj = obj;
 }