本文整理汇总了C#中Event.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Event.Save方法的具体用法?C# Event.Save怎么用?C# Event.Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Event
的用法示例。
在下文中一共展示了Event.Save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
private void Create(Event eventItem, EventList calendar, BranchItem branch)
{
if (eventItem != null || calendar != null)
{
Item root = StaticSettings.EventTargetDatabase.GetItem(calendar.ID);
if (root == null || SecurityManager.CanWrite(root) != true)
{
return;
}
Item parent = StaticSettings.EventTargetDatabase.GetItem(calendar.ID);
if (parent != null)
{
parent = Utilities.CreateDatePath(parent, eventItem.StartDate);
}
if (SecurityManager.CanWrite(parent) != true || parent == null)
{
return;
}
Item child = parent.Add(Utilities.Sanitize(eventItem.Title), branch);
eventItem.ID = child.ID.ToString();
eventItem.Save();
PublishUtil.Publishing(eventItem.GetTargetItem(), true, false);
}
}
示例2: SaveEvent
public static Event SaveEvent(Event evt)
{
evt.Save();
return evt;
}
示例3: _newRootRundown
private void _newRootRundown(object o)
{
Event newEvent = new Event(_engine);
newEvent.EventType = TEventType.Rundown;
newEvent.EventName = Properties.Resources._title_NewRundown;
newEvent.Duration = TimeSpan.Zero;
newEvent.StartType = TStartType.Manual;
newEvent.ScheduledTime = _engine.CurrentTime;
_engine.RootEvents.Add(newEvent);
newEvent.Save();
}
示例4: _newContainer
private void _newContainer(object o)
{
Event newEvent = new Event(_engine);
newEvent.EventType = TEventType.Container;
newEvent.EventName = Properties.Resources.TEventType_Container;
newEvent.StartType = TStartType.None;
_engine.RootEvents.Add(newEvent);
newEvent.Save();
}