'Declaration Public Overridable Sub Update( _ ByVal context As DataContext _ )
public virtual void Update( DataContext context )
Exception | Description |
---|---|
System.ArgumentException | Thrown when context is not a supported DataContext class or subclass. context must be UpdateRemindersContext, UpdateActivityContext, AddActivityContext, RemoveActivityContext, UpdateResourceContext, AddResourceContext, RemoveResourceContext, or UpdateSnoozeContext. |
System.ArgumentNullException | Thrown when the supplied context is null (Nothing in Visual Basic .NET). |
This method implements the Update method of the IDataUpdate interface. The WebScheduleInfo consumes this interface in order to persist changes to Activities and Resources from the WebSchedule data model during postback changes and events.
Web application developers should not call this method directly from their scheduling applications. Instead, they may call the public methods exposed by the WebScheduleDbProvider for adding, editing, and deleting instances of Activities and Resources from the data store.
The base class implementation of Update handles the following operations:
Inheritors developing their own custom data provider should override Update to support additional operations, current operations on different relational database management systems, and data bindings (e.g., to increase the number of types the WebSchedule data model can persist from a scheduling application). Please see the help documentation for further information on extending WebScheduleDbProvider to create a custom data provider.
When extending the WebScheduleDbProvider (additional operations or data bindings), inheritors should first check context to see if it matches one of their extended DataContexts. When it does, the subclass is responsible for dispatching it to a method it implements for handling that operation and/or ScheduleDataBinding subclass. If the context does not match a recognized operation, then call the base implementation of Update to ensure proper dispatch and/or error handling.
When implementing support for a new relational database management system (or other underlying data store), the implementation of methods for standard operations (i.e., "FetchActivities", "AddActivity", etc.) MAY not be compatible with that data technology. When this is the case, the overridden implementation of Fetch in the subclass should handle the standard operation and dispatch it to it's own method supporting the new data platform.
AddActivityUpdateActivityRemoveActivityAddResourceUpdateResourceRemoveResourceTarget Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2