IVersionableItem.AutoCheckIn Property

IT Hit WebDAV for .NET

Indicates if item will be checked-in by the engine during the unlock request.

[Visual Basic]
Property AutoCheckIn As Boolean
[C#]
bool AutoCheckIn {get; set;}

Remarks

Before checking-out the engine sets this property. When item is being unlocked engine reads this property and calls CheckIn if necessary. This property is required for auto-versioning.

Example

public bool AutoCheckIn
{
    set
    {
        SqlCommand cmd = fEngine.CreateNewCommand();
        cmd.CommandText = "UPDATE Item"
                          + " SET CheckinDuringUnlock = @CheckinDuringUnlock"
                          + " WHERE ItemId = @ItemId";
        cmd.Parameters.Add("@CheckinDuringUnlock", SqlDbType.Bit).Value = value;
        cmd.Parameters.Add("@ItemId", SqlDbType.UniqueIdentifier).Value = this.fItemId;
        cmd.ExecuteNonQuery();
    }
    get
    {
        bool result = false;

        SqlCommand cmd = fEngine.CreateNewCommand();
        cmd.CommandText = "SELECT CheckinDuringUnlock"
                          + " FROM Item"
                          + " WHERE ItemId = @ItemId";
        cmd.Parameters.Add("@ItemId", SqlDbType.UniqueIdentifier).Value = this.fItemId;
        object obj = cmd.ExecuteScalar();
        if (obj != null)
            result = (bool) obj;

        return result;
    }
}
 

See Also

IVersionableItem Interface | ITHit.WebDAV.Server.DeltaV Namespace