Repository.Crew.AddCrew: Difference between revisions

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


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


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

Revision as of 18:32, 27 February 2014


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

Syntax

  • AddCrew( crew As cCrew )As Boolean

Parameters

crew: The cCrew to add.

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")

Declare a new Crew.

       Dim newCrew As New cCrew("NewCrew1")

Add the Crew to the repository.

       Dim SuccessAddCrew As Boolean
       SuccessAddCrew = MyRepository.AddCrew(newCrew)