Modifies an event property, given an event id, and an event property name and value.
It can also set an array of properties. In this case, a concatonation of event properties is
needed. IE: "property1+propery2" would allow setting of properties property1 and property2.
Namespace:
GrassValley.Mseries.ScheduleEditorAssembly: GrassValley.Mseries.ScheduleEditor (in GrassValley.Mseries.ScheduleEditor.dll) Version: 1.0.0.0
Syntax
C# |
---|
void SetEventProperty( string eventId, string propertySpec, Object property ) |
Visual Basic (Declaration) |
---|
Sub SetEventProperty ( _ eventId As String, _ propertySpec As String, _ property As Object _ ) |
Visual C++ |
---|
void SetEventProperty( String^ eventId, String^ propertySpec, Object^ property ) |
Parameters
- eventId
- Type: System..::.String
The event id.
- propertySpec
- Type: System..::.String
The property spec.
- property
- Type: System..::.Object
The property oject or object array.
Remarks
Following are the property names that can be included in the propertySpec parameter:
- "name"
- "uri"
- "starttypestr"
- "parentid"
- "startdatestr"
- "starttimestr"
- "durationstr"
- "comment"
- "repeatmode"
- "repeatmodestr"
- "repeatdatestr"
- "repeattimestr"
- "repeatenddatestr"
- "repeatendtimestr"
- "purgedatestr"
- "purgetimestr"
- "purgecount"
- "error"
- "layer"
- "markinstr"
- "ismarkinabsolute"
- "alturi"
- "altmarkinstr"
- "isaltmarkinabsolute"
- "username"
- "trafficid"
- "edituid"
- "laststartdatestr"
- "laststarttimestr"
- "lastdurationstr"
- "lasterror"
- "eventhandle"
- "completed"
- "childid"
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 eventID = "some previously inserted event ID"; string strPropertySpec = "comment"; string strComment = "This is a test comment!"; schEditor.SetEventProperty(eventID, strPropertySpec, strComment); Console.WriteLine(result); string resultComment = (string)schEditor.GetEventProperty(eventID, strPropertySpec); Console.WriteLine(strResultComment);