This event is fired just after a data item has been added to the C1 CMS data store. See Add<(Of <<'(TData>)>>)(TData)

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public static event DataEventHandler OnAfterAdd
Visual Basic
Public Shared Event OnAfterAdd As DataEventHandler
Visual C++
public:
static  event DataEventHandler^ OnAfterAdd {
	void add (DataEventHandler^ value);
	void remove (DataEventHandler^ value);
}

Examples

CopyC#
void MyMethod()
{
   DataEvents<IMyDataType>.OnAfterAdd += new DataEventHandler(DataEvents_OnAfterAdd);

   using (DataConnection connection = new DataConnection())
   {
      IMyDataType myDataType = DataConnection.New<IMyDataType>();
      myDataType.Name = "Foo";

      connection.Add<IMyDataType>(myDataType); // This will fire the event!
   }
}


void DataEvents_OnAfterAdd(object sender, DataEventArgs dataEventArgs)
{        
}

See Also