This event is fired just before a data item is updated in the C1 CMS data store. See Update<(Of <<'(TData>)>>)(TData)

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

Syntax

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

Examples

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

   using (DataConnection connection = new DataConnection())
   {
      IMyDataType myDataType = 
         (from item in connection.get<IMyDataType>()
          where item.Id == 1
          select item).First();

      myDataType.Name = "Foo";

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


void DataEvents_OnBeforeUpdate(object sender, DataEventArgs dataEventArgs)
{        
}

See Also