private void OnDocSaved(object sender, Csla.Core.SavedEventArgs e) { if (DocSaved != null) { DocSaved(sender, e); } }
// TODO: edit "CustomerEdit.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: Saved += OnCustomerEditSaved; private void OnCustomerEditSaved(object sender, Csla.Core.SavedEventArgs e) { if (CustomerEditSaved != null) { CustomerEditSaved(sender, e); } }
// TODO: edit "ProductTypeEdit.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: Saved += OnProductTypeEditSaved; private void OnProductTypeEditSaved(object sender, Csla.Core.SavedEventArgs e) { if (ProductTypeEditSaved != null) { ProductTypeEditSaved(sender, e); } }
// TODO: edit "SupplierEdit.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: Saved += OnSupplierEditSaved; private void OnSupplierEditSaved(object sender, Csla.Core.SavedEventArgs e) { if (SupplierEditSaved != null) { SupplierEditSaved(sender, e); } }
/// <summary> /// Handles Saved events of <see cref="CustomerEdit"/>. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <see cref="Csla.Core.SavedEventArgs"/> instance containing the event data.</param> public static void CustomerEditSavedHandler(object sender, Csla.Core.SavedEventArgs e) { foreach (var reference in _references) { if (reference.IsAlive) { ((CustomerList)reference.Target).CustomerEditSavedHandler(sender, e); } } }
/// <summary> /// Handles Saved events of <see cref="ProductTypeEdit"/>. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <see cref="Csla.Core.SavedEventArgs"/> instance containing the event data.</param> public static void ProductTypeEditSavedHandler(object sender, Csla.Core.SavedEventArgs e) { foreach (var reference in _references) { if (reference.IsAlive) { ((ProductTypeUpdatedByRootList)reference.Target).ProductTypeEditSavedHandler(sender, e); } } }
protected void OnSaved(T newObject) { Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject); if (_nonSerializableSavedHandlers != null) { _nonSerializableSavedHandlers.Invoke(this, args); } if (_serializableSavedHandlers != null) { _serializableSavedHandlers.Invoke(this, args); } }
/// <summary> /// Handle Saved events of <see cref="CustomerEdit"/> to update the list of <see cref="CustomerInfo"/> objects. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <see cref="Csla.Core.SavedEventArgs"/> instance containing the event data.</param> internal void CustomerEditSavedHandler(object sender, Csla.Core.SavedEventArgs e) { var obj = (CustomerEdit)e.NewObject; if (((CustomerEdit)sender).IsNew) { IsReadOnly = false; var rlce = RaiseListChangedEvents; RaiseListChangedEvents = true; Add(CustomerInfo.LoadInfo(obj)); RaiseListChangedEvents = rlce; IsReadOnly = true; } else if (((CustomerEdit)sender).IsDeleted) { for (int index = 0; index < this.Count; index++) { var child = this[index]; if (child.CustomerId == obj.CustomerId) { IsReadOnly = false; var rlce = RaiseListChangedEvents; RaiseListChangedEvents = true; this.RemoveItem(index); RaiseListChangedEvents = rlce; IsReadOnly = true; break; } } } else { for (int index = 0; index < this.Count; index++) { var child = this[index]; if (child.CustomerId == obj.CustomerId) { child.UpdatePropertiesOnSaved(obj); #if !WINFORMS var notifyCollectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, child, child, index); OnCollectionChanged(notifyCollectionChangedEventArgs); #else var listChangedEventArgs = new ListChangedEventArgs(ListChangedType.ItemChanged, index); OnListChanged(listChangedEventArgs); #endif break; } } } }
/// <summary> /// Handle Saved events of <see cref="DocumentEdit"/> to update the list of <see cref="DocumentInfo"/> objects. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The <see cref="Csla.Core.SavedEventArgs"/> instance containing the event data.</param> internal void DocumentEditSavedHandler(object sender, Csla.Core.SavedEventArgs e) { var obj = (DocumentEdit)e.NewObject; if (((DocumentEdit)sender).IsNew) { IsReadOnly = false; var rlce = RaiseListChangedEvents; RaiseListChangedEvents = true; Add(DocumentInfo.LoadInfo(obj)); RaiseListChangedEvents = rlce; IsReadOnly = true; } else if (((DocumentEdit)sender).IsDeleted) { for (int index = 0; index < this.Count; index++) { var child = this[index]; if (child.DocumentId == obj.DocumentId) { IsReadOnly = false; var rlce = RaiseListChangedEvents; RaiseListChangedEvents = true; this.RemoveItem(index); RaiseListChangedEvents = rlce; IsReadOnly = true; break; } } } else { for (int index = 0; index < this.Count; index++) { var child = this[index]; if (child.DocumentId == obj.DocumentId) { child.UpdatePropertiesOnSaved(obj); var listChangedEventArgs = new ListChangedEventArgs(ListChangedType.ItemChanged, index); OnListChanged(listChangedEventArgs); break; } } } }
private void Settings_Saved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client and invalidates the SettingList cache //SettingList.InvalidateCache(); }
// TODO: edit "ProductTypeColl.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: Saved += OnProductTypeCollSaved; private void OnProductTypeCollSaved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client ProductTypeCachedList.InvalidateCache(); ProductTypeCachedNVL.InvalidateCache(); }
private void Roles_Saved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client and invalidates // the RoleList cache RoleList.InvalidateCache(); }
private void OnDocTypeEditCollSaved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client DocTypeList.InvalidateCache(); DocTypeNVL.InvalidateCache(); }
private void OnDocClassEditSaved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client DocClassList.InvalidateCache(); DocClassNVL.InvalidateCache(); }
private void OnFolderEditCollectionSaved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client FolderList.InvalidateCache(); FolderNVL.InvalidateCache(); }
private void SortingTaskArrives_Saved(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client and invalidates the SortingTaskArriveList cache //SortingTaskArriveList.InvalidateCache(); }
// TODO: edit "SupplierEdit.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: SupplierEditSaved += SupplierEditSavedHandler; private void SupplierEditSavedHandler(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client SupplierList.InvalidateCache(); }
void List_Saved(object sender, Csla.Core.SavedEventArgs e) { _isListSaved = (e.Error == null && e.NewObject != null); }
void item_Saved(object sender, Csla.Core.SavedEventArgs e) { _itemIsNew = ((ERitem)e.NewObject).IsNew; }
// TODO: edit "ProductTypeDynaItem.cs", uncomment the "OnDeserialized" method and add the following line: // TODO: ProductTypeDynaItemSaved += ProductTypeDynaItemSavedHandler; private void ProductTypeDynaItemSavedHandler(object sender, Csla.Core.SavedEventArgs e) { // this runs on the client ProductTypeCachedList.InvalidateCache(); ProductTypeCachedNVL.InvalidateCache(); }
private void Product_Saved(object sender, Csla.Core.SavedEventArgs e) { ((CslaDataProvider)Resources["ProductList"]).Refresh(); }