/// <summary> /// List删除后的处理 /// </summary> /// <param name="e"></param> private void ItemDeleted(ListChangedEventArgs e) { if (InsertList.Contains(_deletedItem)) { InsertList.Remove(_deletedItem); return; } if (UpdateList.Contains(_deletedItem)) { UpdateList.Remove(_deletedItem); } if (!DeleteList.Contains(_deletedItem)) { DeleteList.Add(_deletedItem); } }
/// <summary> /// List内对象属性值变化后的处理 /// </summary> /// <param name="e"></param> private void ItemChanged(ListChangedEventArgs e) { if ("IsChecked".Equals(e.PropertyDescriptor.Name)) { return; } //*************************** //是否要过滤TBModel以外的属性 //*************************** if (!InsertList.Contains(this[e.NewIndex]) && !DeleteList.Contains(this[e.NewIndex]) && !UpdateList.Contains(this[e.NewIndex])) { UpdateList.Add(this[e.NewIndex]); } }