Repository.Crew.UpdateCrew: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
m (Protected "Repository.UpdateCrew" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
Updates the Crew
{{Template:Repository.UpdateCrew.Cmt}} {{Template:BooleanReturn.Cmt}}
== Method Syntax==
{{APIName|'''UpdateCrew'''(}}
{{APIPrefix|ByVal}}
{{APIName|crew}}
{{APIPrefix|As}}
{{APIName|[[cCrew Class|cCrew]])}}
{{APIPrefix|As Boolean}}<br>
{{APIComment|Updates the Crew in the repository.}}


== Parameters ==
==Syntax==
'''crew'''
* UpdateCrew( crew {{APIPrefix|As}} [[cCrew Class|cCrew]] ) {{APIPrefix|As Boolean}}
{{APIComment|The crew to update in the repository.}}
 
Parameters
:''crew'': The [[cCrew Class|cCrew]] to update.


== Usage Example ==
== Usage Example ==

Revision as of 18:35, 27 February 2014


Updates the crew in the repository. Returns True if successful, otherwise returns False.

Syntax

  • UpdateCrew( crew As cCrew ) As Boolean

Parameters

crew: The cCrew to update.

Usage Example

Declare a new repository connection class.

       Private WithEvents MyRepository As New Repository

Connect to the Synthesis repository.

       Dim Success As Boolean = False
       Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")

Get the list of Crews in the connected repository.

       Dim ListOfCrews() As cCrew
       ListOfCrews = MyRepository.GetAllCrews()

After modifying the Crew, Update the repository.

       Dim SuccessUpdateCrew As Boolean = False
       SuccessUpdateCrew = MyRepository.UpdateCrew(ListOfCrews(0))