Share via


LookupTableDataSet.LookupTablesRow.LT_CHECKOUTBY property

Gets or sets the unique identifier of the user who has the lookup table checked out for modification.

Namespace:  WebSvcLookupTable
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

Syntax

'Declaration
Public Property LT_CHECKOUTBY As Guid
    Get
    Set
'Usage
Dim instance As LookupTableDataSet.LookupTablesRow
Dim value As Guid

value = instance.LT_CHECKOUTBY

instance.LT_CHECKOUTBY = value
public Guid LT_CHECKOUTBY { get; set; }

Property value

Type: System.Guid
The GUID of a user.

Remarks

Opening a lookup table in the Edit Lookup Table page of Project Web App checks out the lookup table to the user.

To help understand the LT_CHECKOUTBY property, suppose lut is a LookupTableWS.LookupTableDataSet object that contains one lookup table (LookupTableWS is the name for a reference to the LookupTable Web service). The name of the lookup table is "Location".

If you serialize lut to an XML file, the LookupTables element has the following values.

<LookupTables>
    <LT_UID>5ee9b465-489c-4083-bb26-0694918103f6</LT_UID>
    <LT_NAME>Location</LT_NAME>
    <LT_SORT_ORDER_ENUM>1</LT_SORT_ORDER_ENUM>
    <LT_PRIMARY_LCID>1033</LT_PRIMARY_LCID>
    <LT_FILL_ALL_LEVELS>false</LT_FILL_ALL_LEVELS>
    <LT_CHECKOUTBY>88936e51-dcb3-4953-b191-ce1bfeb92049</LT_CHECKOUTBY>
    <LT_CHECKOUTDATE>2011-08-28T10:19:47.72-07:00</LT_CHECKOUTDATE>
    <MOD_DATE>2011-08-28T10:19:00.59-07:00</MOD_DATE>
</LookupTables>

If the lut.LookupTables[0].LT_CHECKOUTBY value is a null reference (Nothing in Visual Basic), the XML file does not contain the LT_CHECKOUTBY child element.

For more information and examples, see Walkthrough: Creating a Hierarchical Lookup Table.

Examples

The IsLutCheckedOut method shows a message box and returns false if the lookup table is not checked out. LookupTableWS is an arbitrary name for a reference to the LookupTable Web service, and lookupTable is an initialized LookupTableWS.LookupTableobject.

private bool IsLutCheckedOut(Guid lutUid)
{
    bool isCheckedOut = true;
    Guid[] lutUids = { lutUid };

    LookupTableWS.LookupTableDataSet lut = 
        lookupTable.ReadLookupTablesByUids(lutUids, false, 1033);
    if (lut.LookupTables[0].IsLT_CHECKOUTBYNull())
    {
        MessageBox.Show("Lookup table " + lut.LookupTables[0].LT_NAME 
            + " is not checked out.");
        isCheckedOut = false;
    }
    return isCheckedOut;
}

See also

Reference

LookupTableDataSet.LookupTablesRow class

LookupTableDataSet.LookupTablesRow members

WebSvcLookupTable namespace