Updates an event info using the event’s XML document to initialize event properties.

Namespace:  GrassValley.Mseries.ScheduleEditor
Assembly:  GrassValley.Mseries.ScheduleEditor (in GrassValley.Mseries.ScheduleEditor.dll) Version: 1.0.0.0

Syntax

C#
public void UpdateEventFromXml(
	string eventId,
	string xml,
	string afterEventId
)
Visual Basic (Declaration)
Public Sub UpdateEventFromXml ( _
	eventId As String, _
	xml As String, _
	afterEventId As String _
)
Visual C++
public:
virtual void UpdateEventFromXml(
	String^ eventId, 
	String^ xml, 
	String^ afterEventId
) sealed

Parameters

eventId
Type: System..::.String
The event id.
xml
Type: System..::.String
The XML.
afterEventId
Type: System..::.String
The after event id. Pertains only to follow events.

Implements

IScheduleEditor..::.UpdateEventFromXml(String, String, String)

Remarks

This is a basic sample of the xml.
CopyC#
<?xml version="1.0"?>
<XML xmlns="EventInfo__1.0">
<EventInfo>
<EventData uuid="1a78cf8ed0be43868812f077b965d281" childUuid=""
eventType="Play" channel="0" strUri="edl/cmf//local/C:/default/Clip"
trigger="Absolute" parentUuid="" eventStatus="Ready" error="100"
name="" userName="" trafficId="" startDate="2009-03-27T00:00:00"
startTime="09:20:10:00" duration="00:00:03:00" repeatMode="None"
purgeDate="2019-03-29T00:00:00" purgeTime="00:00:00:00" purgeCount="0"
completed="0"/><PlayEventData markIn="00:00:00:00" isMarkInAbs="FALSE"
altUri="" altMarkIn="00:00:00:00" isAltMarkInAbs="FALSE"/>
</EventInfo>
</XML>

This function will generate a few change notices.

1. If the SetEventPropery function changes the event location, then a NoticeDeleteEvent to show removal of the old event, NoticeInsertEvent to show addition of the new event, and NoticeUpdateEvent for all affected children are published.

2. If the SetEventPropert function does not change the event location, then a simple NoticeUpdateEvent is generated along with updates for all child events.

Examples

CopyC#
//Call helper function CreateIScheduleEditor which creates editor object
IScheduleEditor schEditor = CreateIScheduleEditor();
string eventXML = "some xml"; //see sample xml for formats.
string eventId = schEditor.CreateEventFromXml(eventXML));
string eventXMLReturned = schEditor.GetEventXml(eventId);
//EDIT SOME OF THE VALUES IN THE XML HERE, THEN CALL UpdateEventFromXml()
UpdateEventFromXml(eventId, newUpdateXml, string.Empty);

See Also