[This is preliminary documentation and is subject to change.]

Inserts a new department for an organization in the OfficeClip database.

Namespace:  OfficeClip.DBLayer.Account
Assembly:  OfficeClip.DBLayer (in OfficeClip.DBLayer)
Version: 8.1.1.0

Syntax

C#
public int AddDepartment(
	string deptName,
	int orgId,
	int userId
)
Visual Basic (Declaration)
Public Function AddDepartment ( _
	deptName As String, _
	orgId As Integer, _
	userId As Integer _
) As Integer
Visual C++
public:
int AddDepartment(
	String^ deptName, 
	int orgId, 
	int userId
)

Parameters

deptName
Type: System..::.String
The name of the new department
orgId
Type: System..::.Int32
The GroupId of the organization to which this department belongs.
userId
Type: System..::.Int32
The unique id of the current user

Return Value

0 when successful, -1 when the Id passed for the Parent organization is not really an organization i.e. it could be of a group or of another department.

See Also