Click or drag to resize

CustodianManagerByName Method

Retrieves a Custodian by its name

Namespace:  Law.EdaIntegration.Import
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
public Custodian ByName(
	string custodianName
)

Parameters

custodianName
Type: SystemString
The name of the custodian to find

Return Value

Type: Custodian
A list of Custodians
Exceptions
ExceptionCondition
EdaApiExceptionThrown if a custodian cannot be found with the specified name
Examples
The following example demonstrates retrieving a custodian using its name.
C#
using Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Import;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");
        Custodian custodian = edaCase.Custodians.ByName("Custodian 2");
        Console.WriteLine("Id: {0},  Name: {1}", custodian.Id, custodian.Name);
    }
}
/*
This example produces the following results:

Id: 2,  Name: Custodian 2
 */
See Also