Exemplo n.º 1
0
		public void RaiseSaved(SavedEventArgs args)
		{
			if (Saved != null)
			{
				Saved(this, args);
			}
		}
Exemplo n.º 2
0
 protected virtual void OnSaved(T newObject, Exception e, object userState)
 {
     Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject, e, userState);
     if (_savedEvent != null)
     {
         _savedEvent.Invoke(this, args);
     }
 }
Exemplo n.º 3
0
 protected virtual void OnSaved(T newObject, Exception e, object userState)
 {
   Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject, e, userState);
   if (_nonSerializableSavedHandlers != null)
     _nonSerializableSavedHandlers.Invoke(this, args);
   if (_serializableSavedHandlers != null)
     _serializableSavedHandlers.Invoke(this, args);
 }
Exemplo n.º 4
0
 protected void OnSaved(T newObject, Exception e)
 {
     Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject, e, null);
     if (_nonSerializableSavedHandlers != null)
     {
         _nonSerializableSavedHandlers.Invoke(this, args);
     }
     if (_serializableSavedHandlers != null)
     {
         _serializableSavedHandlers.Invoke(this, args);
     }
 }
Exemplo n.º 5
0
        void obj_Saved(object sender, Csla.Core.SavedEventArgs e)
        {
            IsBusy = false;
            if (e.Error != null)
            {
                Error = e.Error;
            }
            else
            {
                ObjectInstance = e.NewObject;
            }

            OnSaved(e.NewObject, e.Error, e.UserState);
        }
Exemplo n.º 6
0
        protected virtual void OnSaved(T newObject, Exception e, object userState)
        {
            Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject, e, userState);
#if !SILVERLIGHT && !NETFX_CORE
            if (_nonSerializableSavedHandlers != null)
            {
                _nonSerializableSavedHandlers.Invoke(this, args);
            }
            if (_serializableSavedHandlers != null)
            {
                _serializableSavedHandlers.Invoke(this, args);
            }
#else
            if (Saved != null)
            {
                Saved(this, args);
            }
#endif
        }
Exemplo n.º 7
0
 private void Lineage_SaveCompleted(object sender, SavedEventArgs eventArgs)
 {
     DataSource = (Lineage)eventArgs.NewObject;
     SetPanelMode(PanelModeEnum.LineageDisplay);
     IsBusy = false;
     if (Saved != null)
         Saved(this, new LineageEventArgs(DataSource));
 }
Exemplo n.º 8
0
 private void Lineage_DeleteCompleted(object sender, SavedEventArgs e)
 {
     IsBusy = false;
     SetPanelMode(PanelModeEnum.LineageDisplay);
     if (Deleted != null)
         Deleted(this, new LineageEventArgs(DataSource));
 }